You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the CloudFront Console, it is possible to add AWS CloudWatch logs as a standard log destination by navigating to Distributions >> Clicking on the ID >> Selecting the 'Logging' tab >> Under the 'Standard log destinations' pane, clicking the Add button and choosing Amazon CloudWatch logs.
From the CFN documentation, there doesn't seem to be a way to natively achieve this as the AWS::CloudFront::Distribution Logging property allows you specify the S3 bucket to store the access logs in and the AWS::CloudFront::RealtimeLogConfig EndPoints property is for the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration. I do not see a property that allows you to add CloudWatch logs as a standard log destination.
Name of the resource
AWS::CloudFront::Distribution
Resource name
No response
Description
Hello,
In the CloudFront Console, it is possible to add AWS CloudWatch logs as a standard log destination by navigating to Distributions >> Clicking on the ID >> Selecting the 'Logging' tab >> Under the 'Standard log destinations' pane, clicking the Add button and choosing Amazon CloudWatch logs.
From the CFN documentation, there doesn't seem to be a way to natively achieve this as the AWS::CloudFront::Distribution Logging property allows you specify the S3 bucket to store the access logs in and the AWS::CloudFront::RealtimeLogConfig EndPoints property is for the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration. I do not see a property that allows you to add CloudWatch logs as a standard log destination.
As a workaround, there is the blog below where the CFN template creates a Lambda function to write CloudFront logs in S3 to a CloudWatch log group:
https://aws.amazon.com/blogs/mt/sending-cloudfront-standard-logs-to-cloudwatch-logs-for-analysis/
Hoping to add CW as a destination via CFN or understand if there is a better workaround than the one mentioned above for the meantime.
Other Details
No response
The text was updated successfully, but these errors were encountered: