Skip to content

Commit

Permalink
websockets: fix passing log group ARN
Browse files Browse the repository at this point in the history
The log group ARN contains a trailing ":*" that seems to cause
deployment to fail. Instead, generate the ARN with the trailing
wildcard.

fixes #6304
  • Loading branch information
christophgysin committed Jun 27, 2019
1 parent 9b9c9e2 commit 6b00ef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
Object.assign(stageResource.Properties, {
AccessLogSettings: {
DestinationArn: {
'Fn::GetAtt': [logGroupLogicalId, 'Arn'],
'Fn::Sub': `arn:aws:logs:\${AWS::Region}:\${AWS::AccountId}:log-group:\${${logGroupLogicalId}}`,
},
Format: [
'$context.identity.sourceIp',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ describe('#compileStage()', () => {
Description: 'Serverless Websockets',
AccessLogSettings: {
DestinationArn: {
'Fn::GetAtt': [logGroupLogicalId, 'Arn'],
'Fn::Sub':
'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:${WebsocketsLogGroup}',
},
Format: [
'$context.identity.sourceIp',
Expand Down

0 comments on commit 6b00ef5

Please sign in to comment.