6
6
use AsyncAws \Core \AwsError \AwsErrorFactoryInterface ;
7
7
use AsyncAws \Core \AwsError \JsonRestAwsErrorFactory ;
8
8
use AsyncAws \Core \Configuration ;
9
+ use AsyncAws \Core \Exception \UnsupportedRegion ;
9
10
use AsyncAws \Core \RequestContext ;
10
11
use AsyncAws \Core \Result ;
11
12
use AsyncAws \Lambda \Enum \Architecture ;
@@ -366,14 +367,6 @@ protected function getEndpointMetadata(?string $region): array
366
367
}
367
368
368
369
switch ($ region ) {
369
- case 'cn-north-1 ' :
370
- case 'cn-northwest-1 ' :
371
- return [
372
- 'endpoint ' => "https://lambda. $ region.amazonaws.com.cn " ,
373
- 'signRegion ' => $ region ,
374
- 'signService ' => 'lambda ' ,
375
- 'signVersions ' => ['v4 ' ],
376
- ];
377
370
case 'us-iso-east-1 ' :
378
371
case 'us-iso-west-1 ' :
379
372
return [
@@ -389,6 +382,132 @@ protected function getEndpointMetadata(?string $region): array
389
382
'signService ' => 'lambda ' ,
390
383
'signVersions ' => ['v4 ' ],
391
384
];
385
+ case 'af-south-1 ' :
386
+ return [
387
+ 'endpoint ' => 'https://lambda.af-south-1.amazonaws.com ' ,
388
+ 'signRegion ' => 'af-south-1 ' ,
389
+ 'signService ' => 'lambda ' ,
390
+ 'signVersions ' => ['v4 ' ],
391
+ ];
392
+ case 'ap-east-1 ' :
393
+ return [
394
+ 'endpoint ' => 'https://lambda.ap-east-1.amazonaws.com ' ,
395
+ 'signRegion ' => 'ap-east-1 ' ,
396
+ 'signService ' => 'lambda ' ,
397
+ 'signVersions ' => ['v4 ' ],
398
+ ];
399
+ case 'ap-northeast-1 ' :
400
+ return [
401
+ 'endpoint ' => 'https://lambda.ap-northeast-1.amazonaws.com ' ,
402
+ 'signRegion ' => 'ap-northeast-1 ' ,
403
+ 'signService ' => 'lambda ' ,
404
+ 'signVersions ' => ['v4 ' ],
405
+ ];
406
+ case 'ap-northeast-2 ' :
407
+ return [
408
+ 'endpoint ' => 'https://lambda.ap-northeast-2.amazonaws.com ' ,
409
+ 'signRegion ' => 'ap-northeast-2 ' ,
410
+ 'signService ' => 'lambda ' ,
411
+ 'signVersions ' => ['v4 ' ],
412
+ ];
413
+ case 'ap-northeast-3 ' :
414
+ return [
415
+ 'endpoint ' => 'https://lambda.ap-northeast-3.amazonaws.com ' ,
416
+ 'signRegion ' => 'ap-northeast-3 ' ,
417
+ 'signService ' => 'lambda ' ,
418
+ 'signVersions ' => ['v4 ' ],
419
+ ];
420
+ case 'ap-south-1 ' :
421
+ return [
422
+ 'endpoint ' => 'https://lambda.ap-south-1.amazonaws.com ' ,
423
+ 'signRegion ' => 'ap-south-1 ' ,
424
+ 'signService ' => 'lambda ' ,
425
+ 'signVersions ' => ['v4 ' ],
426
+ ];
427
+ case 'ap-southeast-1 ' :
428
+ return [
429
+ 'endpoint ' => 'https://lambda.ap-southeast-1.amazonaws.com ' ,
430
+ 'signRegion ' => 'ap-southeast-1 ' ,
431
+ 'signService ' => 'lambda ' ,
432
+ 'signVersions ' => ['v4 ' ],
433
+ ];
434
+ case 'ap-southeast-2 ' :
435
+ return [
436
+ 'endpoint ' => 'https://lambda.ap-southeast-2.amazonaws.com ' ,
437
+ 'signRegion ' => 'ap-southeast-2 ' ,
438
+ 'signService ' => 'lambda ' ,
439
+ 'signVersions ' => ['v4 ' ],
440
+ ];
441
+ case 'ap-southeast-3 ' :
442
+ return [
443
+ 'endpoint ' => 'https://lambda.ap-southeast-3.amazonaws.com ' ,
444
+ 'signRegion ' => 'ap-southeast-3 ' ,
445
+ 'signService ' => 'lambda ' ,
446
+ 'signVersions ' => ['v4 ' ],
447
+ ];
448
+ case 'ca-central-1 ' :
449
+ return [
450
+ 'endpoint ' => 'https://lambda.ca-central-1.amazonaws.com ' ,
451
+ 'signRegion ' => 'ca-central-1 ' ,
452
+ 'signService ' => 'lambda ' ,
453
+ 'signVersions ' => ['v4 ' ],
454
+ ];
455
+ case 'cn-north-1 ' :
456
+ return [
457
+ 'endpoint ' => 'https://lambda.cn-north-1.amazonaws.com.cn ' ,
458
+ 'signRegion ' => 'cn-north-1 ' ,
459
+ 'signService ' => 'lambda ' ,
460
+ 'signVersions ' => ['v4 ' ],
461
+ ];
462
+ case 'cn-northwest-1 ' :
463
+ return [
464
+ 'endpoint ' => 'https://lambda.cn-northwest-1.amazonaws.com.cn ' ,
465
+ 'signRegion ' => 'cn-northwest-1 ' ,
466
+ 'signService ' => 'lambda ' ,
467
+ 'signVersions ' => ['v4 ' ],
468
+ ];
469
+ case 'eu-central-1 ' :
470
+ return [
471
+ 'endpoint ' => 'https://lambda.eu-central-1.amazonaws.com ' ,
472
+ 'signRegion ' => 'eu-central-1 ' ,
473
+ 'signService ' => 'lambda ' ,
474
+ 'signVersions ' => ['v4 ' ],
475
+ ];
476
+ case 'eu-north-1 ' :
477
+ return [
478
+ 'endpoint ' => 'https://lambda.eu-north-1.amazonaws.com ' ,
479
+ 'signRegion ' => 'eu-north-1 ' ,
480
+ 'signService ' => 'lambda ' ,
481
+ 'signVersions ' => ['v4 ' ],
482
+ ];
483
+ case 'eu-south-1 ' :
484
+ return [
485
+ 'endpoint ' => 'https://lambda.eu-south-1.amazonaws.com ' ,
486
+ 'signRegion ' => 'eu-south-1 ' ,
487
+ 'signService ' => 'lambda ' ,
488
+ 'signVersions ' => ['v4 ' ],
489
+ ];
490
+ case 'eu-west-1 ' :
491
+ return [
492
+ 'endpoint ' => 'https://lambda.eu-west-1.amazonaws.com ' ,
493
+ 'signRegion ' => 'eu-west-1 ' ,
494
+ 'signService ' => 'lambda ' ,
495
+ 'signVersions ' => ['v4 ' ],
496
+ ];
497
+ case 'eu-west-2 ' :
498
+ return [
499
+ 'endpoint ' => 'https://lambda.eu-west-2.amazonaws.com ' ,
500
+ 'signRegion ' => 'eu-west-2 ' ,
501
+ 'signService ' => 'lambda ' ,
502
+ 'signVersions ' => ['v4 ' ],
503
+ ];
504
+ case 'eu-west-3 ' :
505
+ return [
506
+ 'endpoint ' => 'https://lambda.eu-west-3.amazonaws.com ' ,
507
+ 'signRegion ' => 'eu-west-3 ' ,
508
+ 'signService ' => 'lambda ' ,
509
+ 'signVersions ' => ['v4 ' ],
510
+ ];
392
511
case 'fips-us-east-1 ' :
393
512
return [
394
513
'endpoint ' => 'https://lambda-fips.us-east-1.amazonaws.com ' ,
@@ -431,6 +550,20 @@ protected function getEndpointMetadata(?string $region): array
431
550
'signService ' => 'lambda ' ,
432
551
'signVersions ' => ['v4 ' ],
433
552
];
553
+ case 'me-south-1 ' :
554
+ return [
555
+ 'endpoint ' => 'https://lambda.me-south-1.amazonaws.com ' ,
556
+ 'signRegion ' => 'me-south-1 ' ,
557
+ 'signService ' => 'lambda ' ,
558
+ 'signVersions ' => ['v4 ' ],
559
+ ];
560
+ case 'sa-east-1 ' :
561
+ return [
562
+ 'endpoint ' => 'https://lambda.sa-east-1.amazonaws.com ' ,
563
+ 'signRegion ' => 'sa-east-1 ' ,
564
+ 'signService ' => 'lambda ' ,
565
+ 'signVersions ' => ['v4 ' ],
566
+ ];
434
567
case 'us-east-1 ' :
435
568
return [
436
569
'endpoint ' => 'https://lambda.us-east-1.amazonaws.com ' ,
@@ -475,11 +608,6 @@ protected function getEndpointMetadata(?string $region): array
475
608
];
476
609
}
477
610
478
- return [
479
- 'endpoint ' => "https://lambda. $ region.amazonaws.com " ,
480
- 'signRegion ' => $ region ,
481
- 'signService ' => 'lambda ' ,
482
- 'signVersions ' => ['v4 ' ],
483
- ];
611
+ throw new UnsupportedRegion (sprintf ('The region "%s" is not supported by "Lambda". ' , $ region ));
484
612
}
485
613
}
0 commit comments