Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWS::CloudFront::Distribution] - [Logging] - Feature request to allow the adding of Amazon CloudWatch logs as a Standard log destination #2204

Open
Waqiah opened this issue Nov 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Waqiah
Copy link

Waqiah commented Nov 27, 2024

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

@Waqiah Waqiah added the enhancement New feature or request label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant