Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

409 "An update is in progress for resource" when uploading Lambda #242

Open
jcblancomartinez opened this issue Nov 19, 2021 · 5 comments
Open

Comments

@jcblancomartinez
Copy link

Hi,

I'm getting the following exception when uploading the Lambda using aws-toolkit-eclipse

Failed to upload project to Lambda
The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:XXX:function:YYY (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: ZZZ; Proxy: null)

It seems related to a change in the lifecycle management of Lambdas.

UpdateFunctionCode call failed after calling UpdateFunctionConfiguration.

It seems a GetFunctionConfiguration call is required to only make a call to UpdateFunctionCode after the Lambda has moved from Pending to Active.

eclipse.buildId=4.21.0.I20210906-0500
java.version=11.0.11
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

com.amazonaws.eclipse.lambda
Error
Fri Nov 19 18:48:04 CET 2021
Failed to upload project to Lambda

com.amazonaws.eclipse.core.exceptions.AwsActionException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:981027387926:function:UpdateResourceHandlerV1 (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: 4e6265c8-6eb7-484e-9a40-10934d4c933d; Proxy: null)
at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:115)
at com.amazonaws.eclipse.core.plugin.AbstractAwsJobWizard$1.run(AbstractAwsJobWizard.java:35)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: com.amazonaws.services.lambda.model.ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:eu-west-1:XXX:function:YYY (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: ZZZ; Proxy: null)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1819)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1403)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1372)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530)
at com.amazonaws.services.lambda.AWSLambdaClient.doInvoke(AWSLambdaClient.java:4710)
at com.amazonaws.services.lambda.AWSLambdaClient.invoke(AWSLambdaClient.java:4677)
at com.amazonaws.services.lambda.AWSLambdaClient.invoke(AWSLambdaClient.java:4666)
at com.amazonaws.services.lambda.AWSLambdaClient.executeUpdateFunctionCode(AWSLambdaClient.java:4468)
at com.amazonaws.services.lambda.AWSLambdaClient.updateFunctionCode(AWSLambdaClient.java:4437)
at com.amazonaws.eclipse.lambda.upload.wizard.util.UploadFunctionUtil.performFunctionUpload(UploadFunctionUtil.java:134)
at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:111)
... 2 more

Thanks.

@abhimanyuraj
Copy link

I am getting the same issue. Did you able to solve it?

@jcblancomartinez
Copy link
Author

@abhimanyuraj As a workaround, I suggest you still use the plugin to generate the ZIP and then you upload it using Lambda console.

If you take a look at your IDE's logs, you should see something like "Project exported to /tmp/XXXLambda-lambda14198574752301205500.zip".

Regards.

@abhimanyuraj
Copy link

@jcblancomartinez Thanks for the help. Tried your approach and it worked. Also figured out another approach using S3, as it uploads the zip to S3 and then to Lambda.

@triton3
Copy link

triton3 commented Dec 15, 2021

Same issue here. Is there anybody at AWS working on the eclipse toolkit update? Haven't seen any response from them

@sambojuravi
Copy link

@triton3 , deleting the temp folder under AppData, where it exports the lambda.zip file, will solve the issue.

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

No branches or pull requests

4 participants