templates/codebuild-deploy.yaml [410:434]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        BucketEncryption:
          ServerSideEncryptionConfiguration:
            - ServerSideEncryptionByDefault:
                SSEAlgorithm: AES256

    WebAppBucketOriginAccessIdentity:
        Type: AWS::CloudFront::CloudFrontOriginAccessIdentity
        Properties:
          CloudFrontOriginAccessIdentityConfig:
            Comment: !Sub "access-identity-${WebAppBucket}"

    WebAppBucketBucketPolicy:
        Type: "AWS::S3::BucketPolicy"
        Properties:
          Bucket:
            Ref: "WebAppBucket"
          PolicyDocument:
            Statement:
              - Effect: "Allow"
                Action:
                  - "s3:GetObject"
                Resource:
                  - !Sub "arn:aws:s3:::${WebAppBucket}/*"
                Principal:
                  CanonicalUser: !GetAtt WebAppBucketOriginAccessIdentity.S3CanonicalUserId
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/pipeline.yaml [316:340]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            BucketEncryption:
              ServerSideEncryptionConfiguration:
                - ServerSideEncryptionByDefault:
                    SSEAlgorithm: AES256
                
    WebAppBucketOriginAccessIdentity:
        Type: AWS::CloudFront::CloudFrontOriginAccessIdentity
        Properties:
          CloudFrontOriginAccessIdentityConfig:
            Comment: !Sub "access-identity-${WebAppBucket}"

    WebAppBucketBucketPolicy:
        Type: "AWS::S3::BucketPolicy"
        Properties:
          Bucket:
            Ref: "WebAppBucket"
          PolicyDocument:
            Statement:
              - Effect: "Allow"
                Action:
                  - "s3:GetObject"
                Resource:
                  - !Sub "arn:aws:s3:::${WebAppBucket}/*"
                Principal:
                  CanonicalUser: !GetAtt WebAppBucketOriginAccessIdentity.S3CanonicalUserId
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



