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

Manage global CloudWatch logs for Lambda@Edge #305

Open
ofhouse opened this issue Apr 25, 2022 · 0 comments
Open

Manage global CloudWatch logs for Lambda@Edge #305

ofhouse opened this issue Apr 25, 2022 · 0 comments

Comments

@ofhouse
Copy link
Member

ofhouse commented Apr 25, 2022

Motivation

Lambda@Edge creates new CloudWatch LogGroups in each region where it is deployed to.
But Terraform only creates a single LogGroup in the main region.
So no retention policy is assigned to all but the initial region where Terraform is run from.

Idea

Since it requires a lot of configuration overhead to perform resource creation across multiple AWS regions in Terraform, we should use a hybrid solution for this.
CloudFormation Stacks are capable of replicate resources across different AWS regions:

  • Create CloudFormation template that contains the original CloudWatch Log Group
  • Use CloudFormation Stacks to replicate the CloudWatch LogGroup (+Settings) across multiple regions.
  • Provide preselection of regionsÏ based on the CloudFront PriceClass property (Price Class All ,Price Class 100, Price Class 200)

Goals

  • Pre create CloudWatch Log Groups in different AWS regions for Lambda@Edge
  • Destroy all created CloudWatch Log Groups in different regions on terraform destroy
  • Create standalone Terraform module for it, that can be used with others, like AWS Lambda Terraform module

Resources

Related Issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant