Skip to content

Commit

Permalink
fix: Fix AWS partition reference in APIGW CloudWatch role setup
Browse files Browse the repository at this point in the history
Addresses issue mentioned in #7100
  • Loading branch information
medikoo committed Dec 18, 2019
1 parent bce8300 commit fc74c28
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ module.exports = memoize(provider =>
{
Effect: 'Allow',
Resource: {
'Fn::Join': [':', ['arn:aws:iam:', { Ref: 'AWS::AccountId' }, 'role/*']],
'Fn::Join': [
':',
['arn', { Ref: 'AWS::Partition' }, 'iam:', { Ref: 'AWS::AccountId' }, 'role/*'],
],
},
Action: [
'iam:AttachRolePolicy',
Expand All @@ -41,7 +44,9 @@ module.exports = memoize(provider =>
},
{
Effect: 'Allow',
Resource: 'arn:aws:apigateway:*::/account',
Resource: {
'Fn::Join': [':', ['arn', { Ref: 'AWS::Partition' }, 'apigateway:*::/account']],
},
Action: ['apigateway:GET', 'apigateway:PATCH'],
},
]);
Expand Down

0 comments on commit fc74c28

Please sign in to comment.