Skip to content

Commit

Permalink
standard logging for s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
rrigato committed May 15, 2024
1 parent f39dc05 commit 5f3a315
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion templates/prod_homepage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Resources:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub '${ProjectName}-logging'
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerPreferred


WebsiteBucket:
Condition: RetainResourcesCreated
Expand Down Expand Up @@ -126,7 +130,6 @@ Resources:
###########################
#Content delivery network
#for the static (html/css/js) content
#TODO - add Logging property for s3 bucket
##########################
StaticWebpageCdn:
DependsOn: CloudFrontOai
Expand All @@ -146,6 +149,10 @@ Resources:
- - 'www'
- !Ref BucketName
Enabled: true
Logging:
Bucket: !GetAtt ApplicationLogBucket.DomainName
IncludeCookies: false
Prefix: cdnlogs/
DefaultCacheBehavior:
ForwardedValues:
QueryString: true
Expand Down

0 comments on commit 5f3a315

Please sign in to comment.