Skip to content

Commit

Permalink
fix(AWS Websocket): Fix AWS partition support (#7430)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinjalexander committed Mar 8, 2020
1 parent 7310782 commit 9b627fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
const websocketsPolicy = {
Effect: 'Allow',
Action: ['execute-api:ManageConnections'],
Resource: ['arn:aws:execute-api:*:*:*/@connections/*'],
Resource: [{ 'Fn::Sub': 'arn:${AWS::Partition}:execute-api:*:*:*/@connections/*' }],
};

this.serverless.service.provider.compiledCloudFormationTemplate.Resources[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ describe('#compileApi()', () => {
{
Action: ['execute-api:ManageConnections'],
Effect: 'Allow',
Resource: ['arn:aws:execute-api:*:*:*/@connections/*'],
Resource: [
{ 'Fn::Sub': 'arn:${AWS::Partition}:execute-api:*:*:*/@connections/*' },
],
},
],
},
Expand Down

0 comments on commit 9b627fb

Please sign in to comment.