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

Slow execution of aws lambda update-function-code #6585

Closed
2 tasks done
ugofc81 opened this issue Dec 1, 2021 · 2 comments
Closed
2 tasks done

Slow execution of aws lambda update-function-code #6585

ugofc81 opened this issue Dec 1, 2021 · 2 comments
Assignees
Labels
guidance Question that needs advice or information. lambda service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@ugofc81
Copy link

ugofc81 commented Dec 1, 2021

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Calls to aws lambda update-function-code althought immediately execute take unusual time for the LastUpdateStatus

SDK version number

Platform/OS/Hardware/Device
Debian GNU/Linux 10 (buster)

To Reproduce (observed behavior)
Executing
aws lambda update-function-code --function-name "${FUNCTION_NAME}" --zip-file "fileb://build/${FUNCTION_NAME}.zip"
twice at a short interval.

(instead of executing twice the same command, it happened also executing another lambda command, e.g.:
aws lambda publish-version --function-name "${FUNCTION_NAME}")

The second aws lambda call fails, with message for instance
An error occurred (ResourceConflictException) when calling the PublishVersion operation: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:...

Expected behavior
no failure

Logs/output
An error occurred (ResourceConflictException) when calling the PublishVersion operation: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:...

Additional context
The script worked for years with no particular issue, since one week it started generating this error.
We made a workaround, but maybe the behavior is a sign of an issue in the backend

@ugofc81 ugofc81 added the needs-triage This issue or PR still needs to be triaged. label Dec 1, 2021
@kdaily kdaily self-assigned this Dec 1, 2021
@kdaily kdaily added investigating This issue is being investigated and/or work is in progress to resolve the issue. lambda service-api This issue is due to a problem in a service API, not the SDK implementation. guidance Question that needs advice or information. and removed needs-triage This issue or PR still needs to be triaged. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 1, 2021
@kdaily
Copy link
Member

kdaily commented Dec 1, 2021

Hi @ugofc81,

It looks like this is related to the following change to AWS Lambda, announced in July 2021:

https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/

Specifically this section seems relevant to you:

Nothing is changing about how functions are created, updated, or operate as part of this. However, this change may impact certain workflows that attempt to invoke or modify a function shortly after a create or an update action. Before making API calls to a function that was recently created or modified, confirm it is first in the Active state, and that the LastUpdateStatus is Successful.

There isn't anything to change for the AWS CLI as this is the behavior of the API. If you have further questions about Lambda execution, please check out the AWS Developer Forums for Lambda:

https://forums.aws.amazon.com/forum.jspa?forumID=186&start=0

@kdaily kdaily closed this as completed Dec 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information. lambda service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants