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

Error when trying to delete a version that was replicated to other regions #42

Open
bitle opened this issue Dec 7, 2021 · 1 comment

Comments

@bitle
Copy link

bitle commented Dec 7, 2021

I found that lambda-janitor function has been in our us-east-1 region. After looking at CloudWatch Logs, I can see that the janitor is failing when trying to delete an older version that's still associated with a CloudFront distribution. This association to the older version is caused by a mistake on our end.

It looks like that the lambda-janitor fails after encountering this error message and fails to clean up any other versions.
Expected behavior will be to highlight this error and continue with the clean up.

Error message from CloudWatch Logs:

{
    "errorType": "InvalidParameterValueException",
    "errorMessage": "Lambda was unable to delete arn:aws:lambda:us-east-1:1234567890:function:lambda-foo:12 because it is a replicated function. Please see our documentation for Deleting Lambda@Edge Functions and Replicas.",
    "code": "InvalidParameterValueException",
    "message": "Lambda was unable to delete arn:aws:lambda:us-east-1:1234567890:function:lambda-foo:12 because it is a replicated function. Please see our documentation for Deleting Lambda@Edge Functions and Replicas.",
    "time": "2021-12-07T10:00:07.356Z",
    "requestId": "59ea2895-ffa7-4e0e-9489-5ebc7fd6edbf",
    "statusCode": 400,
    "retryable": false,
    "retryDelay": 99.4330057833587,
    "stack": [
        "InvalidParameterValueException: Lambda was unable to delete arn:aws:lambda:us-east-1:1234567890:function:lambda-foo:12 because it is a replicated function. Please see our documentation for Deleting Lambda@Edge Functions and Replicas.",
        "    at Object.extractError (/var/task/node_modules/aws-sdk/lib/protocol/json.js:52:27)",
        "    at Request.extractError (/var/task/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)",
        "    at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:106:20)",
        "    at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:78:10)",
        "    at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:688:14)",
        "    at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)",
        "    at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)",
        "    at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10",
        "    at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)",
        "    at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:690:12)"
    ]
}
@taranpreetnatt12
Copy link

I am having the same problem.

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

No branches or pull requests

2 participants