File tree Expand file tree Collapse file tree 1 file changed +6
-28
lines changed Expand file tree Collapse file tree 1 file changed +6
-28
lines changed Original file line number Diff line number Diff line change 44
55use AsyncAws \Core \AbstractApi ;
66use AsyncAws \Core \Configuration ;
7- use AsyncAws \Core \Exception \UnsupportedRegion ;
87use AsyncAws \Core \RequestContext ;
98use AsyncAws \Lambda \Enum \InvocationType ;
109use AsyncAws \Lambda \Enum \LogType ;
@@ -131,32 +130,6 @@ protected function getEndpointMetadata(?string $region): array
131130 }
132131
133132 switch ($ region ) {
134- case 'af-south-1 ' :
135- case 'ap-east-1 ' :
136- case 'ap-northeast-1 ' :
137- case 'ap-northeast-2 ' :
138- case 'ap-south-1 ' :
139- case 'ap-southeast-1 ' :
140- case 'ap-southeast-2 ' :
141- case 'ca-central-1 ' :
142- case 'eu-central-1 ' :
143- case 'eu-north-1 ' :
144- case 'eu-south-1 ' :
145- case 'eu-west-1 ' :
146- case 'eu-west-2 ' :
147- case 'eu-west-3 ' :
148- case 'me-south-1 ' :
149- case 'sa-east-1 ' :
150- case 'us-east-1 ' :
151- case 'us-east-2 ' :
152- case 'us-west-1 ' :
153- case 'us-west-2 ' :
154- return [
155- 'endpoint ' => "https://lambda. $ region.amazonaws.com " ,
156- 'signRegion ' => $ region ,
157- 'signService ' => 'lambda ' ,
158- 'signVersions ' => ['v4 ' ],
159- ];
160133 case 'cn-north-1 ' :
161134 case 'cn-northwest-1 ' :
162135 return [
@@ -231,6 +204,11 @@ protected function getEndpointMetadata(?string $region): array
231204 ];
232205 }
233206
234- throw new UnsupportedRegion (sprintf ('The region "%s" is not supported by "Lambda". ' , $ region ));
207+ return [
208+ 'endpoint ' => "https://lambda. $ region.amazonaws.com " ,
209+ 'signRegion ' => $ region ,
210+ 'signService ' => 'lambda ' ,
211+ 'signVersions ' => ['v4 ' ],
212+ ];
235213 }
236214}
You can’t perform that action at this time.
0 commit comments