Skip to content

[Enhancement]: Handle Lambda@Edge cloud watch shared configuration #36705

Open
@npenin

Description

@npenin

Description

When setting up a lambda@edge and we want to customize the cloudwatch, we have to declare the various region the lambda might run in and create as many cloudwatch configurations as regions. This is violating all DRY principle

Affected Resource(s) and/or Data Source(s)

  • aws_lambda_function
  • aws_cloudfront_distribution
  • aws_cloudwatch_log_group

Potential Terraform Configuration

resource aws_cloudwatch_global_log_group "logs"
{
  name              = "/aws/lambda/us-east-1.my-function-name"
  retention_in_days = 5
}

References

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/edge-functions-logs.html

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequests to existing resources that expand the functionality or scope.service/cloudfrontIssues and PRs that pertain to the cloudfront service.service/cloudwatchIssues and PRs that pertain to the cloudwatch service.service/lambdaIssues and PRs that pertain to the lambda service.service/logsIssues and PRs that pertain to the logs service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions