Skip to content

Do not try to delete lambda@edge functions with replicas #1721

Closed
@rarguelloF

Description

@rarguelloF

Terraform fails to delete lambda@edge functions that were already replicated, as AWS just doesn't let it.

From http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html:

When you create a trigger, Lambda replicates the function to AWS Regions and CloudFront edge locations around the globe. Note that replicas can't be edited or deleted.

Terraform Version

Terraform v0.10.6

Affected Resource(s)

  • aws_lambda_function

Expected Behavior

Terraform should not fail and should give you some kind of warning that it couldn't delete the resource because AWS just doesn't let you.

Actual Behavior

Terraform fails as it's trying to delete lambda function and AWS doesn't allow it.

Steps to Reproduce

  1. Create some configuration file with a lambda@edge function.
  2. Associate it to a cloudfront distribution and let it get replicated.
  3. Remove the lambda from your configuration.
  4. terraform apply

Metadata

Metadata

Assignees

Labels

bugAddresses a defect in current functionality.service/lambdaIssues and PRs that pertain to the lambda service.upstreamAddresses functionality related to the cloud provider.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions