Skip to content

Commit

Permalink
allow public access added to s3 template
Browse files Browse the repository at this point in the history
  • Loading branch information
philip-ellis-sp committed Sep 6, 2024
1 parent 1c3018a commit 7da06f4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ Resources:
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: 404.html
PublicAccessBlockConfiguration:
BlockPublicAcls: false
BlockPublicPolicy: false
IgnorePublicAcls: false
RestrictPublicBuckets: false
DeveloperSailpointWebSiteBucketPolicy:
Type: "AWS::S3::BucketPolicy"
Properties:
Expand All @@ -153,6 +158,12 @@ Resources:
Condition:
StringEquals:
"AWS:SourceArn": !Join [ "", [ "arn:aws:cloudfront::", !Ref "AWS::AccountId", ":distribution/", !Ref DeveloperSailpointCloudFrontDistribution ] ]
- Sid: "PublicReadGetObject"
Effect: "Allow"
Principal: "*"
Action:
- "s3:GetObject"
Resource: !Join [ "", [ "arn:aws:s3:::", !Ref DeveloperSailpointWebSiteBucket, "/*" ] ]
# CloudFront Distribution for hosting the single page app website
DeveloperSailpointCloudFrontDistribution:
Type: "AWS::CloudFront::Distribution"
Expand Down

0 comments on commit 7da06f4

Please sign in to comment.