Skip to content

Commit

Permalink
Add region to OriginAccessControl name
Browse files Browse the repository at this point in the history
The OAC name is unique across all
regions in an account.
A stackname is not unique across all regions in an account.
Combining with the region overcomes this
  • Loading branch information
ConnorKirk committed Aug 10, 2023
1 parent 5341430 commit 74fe81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/cloudfront-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Resources:
Type: AWS::CloudFront::OriginAccessControl
Properties:
OriginAccessControlConfig:
Name: !Sub 'oac-${AWS::StackName}'
Name: !Sub 'oac-${AWS::StackName}-${AWS::Region}'
OriginAccessControlOriginType: s3
SigningBehavior: always
SigningProtocol: sigv4
Expand Down

0 comments on commit 74fe81c

Please sign in to comment.