File tree Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## NOT RELEASED
4
4
5
+ ### Added
6
+
7
+ - AWS api-change: Restrict the list of available regions.
8
+
5
9
## 1.7.0
6
10
7
11
### Added
Original file line number Diff line number Diff line change 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,6 +367,37 @@ protected function getEndpointMetadata(?string $region): array
366
367
}
367
368
368
369
switch ($ region ) {
370
+ case 'af-south-1 ' :
371
+ case 'ap-east-1 ' :
372
+ case 'ap-northeast-1 ' :
373
+ case 'ap-northeast-2 ' :
374
+ case 'ap-northeast-3 ' :
375
+ case 'ap-south-1 ' :
376
+ case 'ap-southeast-1 ' :
377
+ case 'ap-southeast-2 ' :
378
+ case 'ap-southeast-3 ' :
379
+ case 'ca-central-1 ' :
380
+ case 'eu-central-1 ' :
381
+ case 'eu-north-1 ' :
382
+ case 'eu-south-1 ' :
383
+ case 'eu-west-1 ' :
384
+ case 'eu-west-2 ' :
385
+ case 'eu-west-3 ' :
386
+ case 'me-central-1 ' :
387
+ case 'me-south-1 ' :
388
+ case 'sa-east-1 ' :
389
+ case 'us-east-1 ' :
390
+ case 'us-east-2 ' :
391
+ case 'us-gov-east-1 ' :
392
+ case 'us-gov-west-1 ' :
393
+ case 'us-west-1 ' :
394
+ case 'us-west-2 ' :
395
+ return [
396
+ 'endpoint ' => "https://lambda. $ region.amazonaws.com " ,
397
+ 'signRegion ' => $ region ,
398
+ 'signService ' => 'lambda ' ,
399
+ 'signVersions ' => ['v4 ' ],
400
+ ];
369
401
case 'cn-north-1 ' :
370
402
case 'cn-northwest-1 ' :
371
403
return [
@@ -433,11 +465,6 @@ protected function getEndpointMetadata(?string $region): array
433
465
];
434
466
}
435
467
436
- return [
437
- 'endpoint ' => "https://lambda. $ region.amazonaws.com " ,
438
- 'signRegion ' => $ region ,
439
- 'signService ' => 'lambda ' ,
440
- 'signVersions ' => ['v4 ' ],
441
- ];
468
+ throw new UnsupportedRegion (sprintf ('The region "%s" is not supported by "Lambda". ' , $ region ));
442
469
}
443
470
}
You can’t perform that action at this time.
0 commit comments