diff --git a/template-codepipeline.yaml b/template-codepipeline.yaml index ec7168c..2d80d71 100644 --- a/template-codepipeline.yaml +++ b/template-codepipeline.yaml @@ -15,6 +15,11 @@ Resources: WebsiteConfiguration: IndexDocument: index.html ErrorDocument: error.html + PublicAccessBlockConfiguration: + BlockPublicAcls: false + BlockPublicPolicy: false + IgnorePublicAcls: false + RestrictPublicBuckets: false WebsiteBucketPolicy: Type: AWS::S3::BucketPolicy @@ -31,6 +36,12 @@ Resources: - s3:PutObject - s3:DeleteObject Resource: !Sub "arn:aws:s3:::${WebsiteBucket}/*" + - Sid: PublicReadGetObject + Effect: Allow + Principal: "*" + Action: + - s3:GetObject + Resource: !Sub "arn:aws:s3:::${WebsiteBucket}/*" CodeBuildServiceRole: Type: AWS::IAM::Role