lambda-action
lambda-action copied to clipboard
ResourceConflictException: … An update is in progress for resource
We have received for all deploys (new and old lambdas) this error, maybe related to this:
https://forums.aws.amazon.com/thread.jspa?threadID=346005
We have received for all deploys (new and old lambdas) this error, maybe related to this:
https://forums.aws.amazon.com/thread.jspa?threadID=346005
We experience the same.
- name: default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: id
aws_secret_access_key: key
aws_region: eu-west-1
runtime: nodejs14.x
function_name: #LAMBDA#
zip_file: lambdas/#LAMBDA#/bundle.zip
publish: true
2021/11/23 09:00:17 ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:xxxxxxxxxxxxx:function:lambdafunction
{
RespMetadata: {
StatusCode: 409,
RequestID: "93137e18-d549-4074-b7da-3c4ef46fae6f"
},
Message_: "The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:xxxxxxxxxxxxx:function:lambdafunction",
Type: "User"
}
This is obviously due to the change described here: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/
If you specify multiple properties (like image_uri
and memory_size
) the tool probably internally issues multiple subsequent requests which fail due to the new InProgress
status.
Yes, Understand that, on my YML, I have multiple updates (description, handler, environments, etc) all of thems was updated without error, but the process fail updating the zip with code.
I Understand the article, but can see how can Solve the error.
El mar., 23 de noviembre de 2021 4:34 a. m., Marc R. Hoffmann < @.***> escribió:
This is obviously due to the change described here: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/
If you specify multiple properties (like image_uri and memory_size) the tool probably internally issues multiple subsequent requests which fail due to the new InProgress status.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appleboy/lambda-action/issues/46#issuecomment-976332550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM534HJPMFMR2UQXXD6CCVTUNNN3RANCNFSM5ISDBU6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Sorry, I try Say:
I can't see how solve the error
El mar., 23 de noviembre de 2021 7:34 a. m., Antonio León < @.***> escribió:
Yes, Understand that, on my YML, I have multiple updates (description, handler, environments, etc) all of thems was updated without error, but the process fail updating the zip with code.
I Understand the article, but can see how can Solve the error.
El mar., 23 de noviembre de 2021 4:34 a. m., Marc R. Hoffmann < @.***> escribió:
This is obviously due to the change described here: https://aws.amazon.com/blogs/compute/coming-soon-expansion-of-aws-lambda-states-to-all-functions/
If you specify multiple properties (like image_uri and memory_size) the tool probably internally issues multiple subsequent requests which fail due to the new InProgress status.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/appleboy/lambda-action/issues/46#issuecomment-976332550, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM534HJPMFMR2UQXXD6CCVTUNNN3RANCNFSM5ISDBU6A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I've been talking with AWS tech support and this is what they have to say:
"I dug into the CloudTrail events for the Lambda service and found that each ‘UpdateFunctionCode’ call that failed with an ‘update in progress’ message was accompanied by a successful ‘UpdateFunctionConfiguration’ call at the same timestamp [1]. Both of these API calls can create the ‘inProgress’ Lambda State [2]. Please verify if the automated update system calls both of these APIs in quick succession. In this case, a loop to check for the ‘inProgress’ state would need to be implemented for the ‘UpdateFunctionCode’ call to allow a delay for the ‘UpdateFunctionConfiguration’ action to complete."
Is that maybe what's causing the issue? If properties being set in the YML are causing the issue it seems like this is a good place to look to resolve it.
Have the same issue, watching cloud trail it's trying to create the function besides being already created, and update the code at the same time.
I have the same issue , cloud trail shows updatefunctionconfiguration
and updatefunctioncode
both events triggered at the same time.
same thing here, hopefully this repo is still properly managed. @appleboy @szunami @filipebarros @DmytroSH
The only way to work around this issue currently is to remove all the properties that cause an UpdateFunctionConfiguration API call to AWS. https://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionConfiguration.html
In my case, I had to comment out the description field and it went through.
I noticed there is an open PR on the upstream repo that contains the logic: https://github.com/appleboy/drone-lambda/pull/12, I think if that was merged and this repo pointed to the new version it would be fixed.
I noticed there is an open PR on the upstream repo that contains the logic: appleboy/drone-lambda#12, I think if that was merged and this repo pointed to the new version it would be fixed.
Can we get some feedback on if this is being handled or if this has been abandoned? Just want to know if I need to just build my own service.
I was able fix this from comment https://github.com/claudiajs/claudia/issues/226#issuecomment-973321034
i.e update description: "aws:states:opt-out"
example:
name: deploy to lambda
on: [push]
jobs:
deploy_source:
name: deploy lambda from source
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout@v1
- name: default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: gorush
source: example/index.js
description: "aws:states:opt-out"
According to this post aws:states:opt-out
shouldn't be working as a workaround anymore (as of "October 01 2021 – End of Delayed Update"). 🤷♂️
Right, but is working
Well, actually no, my bad: There's an update at the top of that page:

So, apparently, this should've broken as of only few days… 🙄 Maybe this explains yesterday's AWS outage?! 😛
Again you are right, maybe this explain downtime on services
Maybe the update was done on services, but the problem persists.
I was doing a test right now, performing a deploy with an existent lambda (previously deployed with aws:states:opt-out label), deleting label and redeploy, and failed the deploy. Restoring the label the deployment finish successfully.
I don't understand the AWS logic, but using the label aws:states:opt-out on lambdas can complete deploy.
Starting today, the problem appears again. Before I was solved adding on description of lambda aws:states:opt-out, but now this is not working. Someone can help me?
I have the same problem even using "aws:states:opt-out" I have got problems. Does anyone have any ideas? This was already updated since when aws recommended it, it was working, but yesterday it didn't!
Same problem here, would really appreciate a fix soon. We had same error in powershell scripts when calling Publich-LMVersion straight after a call to Update-LMFunctionCode. We fixed it by adding a waiting loop (not shown) in between those calls, with a timeout (not shown), something like:
$getFunctionResponse = Get-LMFunction -FunctionName $FunctionName
if ($getFunctionResponse.Configuration.LastUpdateStatus -eq 'Successful') {
# continue normal execution here
}
I have the same issue but only on node lambda's.. My go lambda's are deploying fine..
Anyone solved this issue? Adding description: "aws:states:opt-out"
doesn't work for me unfortuantely.
FYI; Since then we've migrated to AWS CLI (i.e. aws lambda update-function-code ...
)
@exalted Thanks for letting me know. So I guess this repository is no longer (actively) maintained then?
I'm facing this problem in deploy step:
2023/02/10 14:40:33 ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:***:****:function:account-transfers-lambda
{
RespMetadata: {
StatusCode: 409,
RequestID: "11040c97-d69c-43d3-a19a-b"
},
Message_: "The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:***:***",
Type: "User"
}
This is my config:
- name: default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: account-transfers-lambda
zip_file: package/function.zip
handler: lambda_function.lambda_handler
runtime: python3.8
I wouldn't recommend using this package as it doesn't seem to be maintained anymore. I was able to deploy my go function with the aws-actions/setup-sam@v1
action.
I will take it.
I wouldn't recommend using this package as it doesn't seem to be maintained anymore. I was able to deploy my go function with the
aws-actions/setup-sam@v1
action.
How can I apply this action? I could use same yml or need other configuration? Sorry by ask about that, I'm not expert on deploy with github actions
fix in https://github.com/appleboy/lambda-action/releases/tag/v0.1.6
Hello @appleboy , it's still not working on my end.