Skip to content

Commit 2a207e7

Browse files
Merge pull request #216 from horike37/feature/fix_service_endpoint
fix: fix incorrect ServiceEndpoint
2 parents b073bea + edc71f0 commit 2a207e7

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/deploy/events/apiGateway/deployment.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ module.exports = {
2727
[
2828
'https://',
2929
this.provider.getApiGatewayRestApiId(),
30-
`.execute-api.${this.options.region}.`,
30+
'.execute-api.',
31+
{ Ref: 'AWS::Region' },
32+
'.',
3133
{ Ref: 'AWS::URLSuffix' },
32-
`/${this.options.stage}`,
34+
`/${this.provider.getStage()}`,
3335
],
3436
],
3537
},

lib/deploy/events/apiGateway/deployment.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ describe('#compileDeployment()', () => {
5959
[
6060
'https://',
6161
{ Ref: serverlessStepFunctions.apiGatewayRestApiLogicalId },
62-
'.execute-api.us-east-1.',
62+
'.execute-api.',
63+
{ Ref: 'AWS::Region' },
64+
'.',
6365
{ Ref: 'AWS::URLSuffix' },
6466
'/dev',
6567
],

0 commit comments

Comments
 (0)