Skip to content

Commit 938d011

Browse files
authored
Merge pull request #308 from jmb12686/master
fix: partition parsing of apigateway arn for events in govcloud region
2 parents 01e7765 + 02f50d8 commit 938d011

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/deploy/events/apiGateway/methods.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ module.exports = {
166166
'Fn::Join': [
167167
'',
168168
[
169-
'arn:aws:apigateway:',
169+
'arn:',
170+
{
171+
Ref: 'AWS::Partition',
172+
},
173+
':apigateway:',
170174
{
171175
Ref: 'AWS::Region',
172176
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('#methods()', () => {
138138

139139
expect(serverlessStepFunctions.getMethodIntegration('stateMachine', 'custom', {
140140
action: 'DescribeExecution',
141-
}).Properties.Integration.Uri['Fn::Join'][1][2])
141+
}).Properties.Integration.Uri['Fn::Join'][1][4])
142142
.to.equal(':states:action/DescribeExecution');
143143
});
144144

0 commit comments

Comments
 (0)