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

chalice deploy command failing with ResourceConflictException UpdateFunctionConfiguration exception #1872

Closed
kraj007 opened this issue Jan 20, 2022 · 2 comments

Comments

@kraj007
Copy link

kraj007 commented Jan 20, 2022

i am deploying the api gateway using chalice command. Its failing with error
"botocore.errorfactory.ResourceConflictException: An error occurred (ResourceConflictException) when calling the UpdateFunctionConfiguration operation: The operation cannot be performed at this time. An update is in progress for resource".

command : chalice deploy --stage staging --profile staging --no-autogen-policy

'Creating deployment package.\n2022-01-20 13:30:17,341 - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials\n/usr/lib64/python3.7/zipfile.py:1506: UserWarning: Duplicate name: 'chalice/init.py'\n return self._open_to_write(zinfo, force_zip64=force_zip64)\n/usr/lib64/python3.7/zipfile.py:1506: UserWarning: Duplicate name: 'chalice/app.py'\n return self._open_to_write(zinfo, force_zip64=force_zip64)\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/site-packages/chalice/deploy/deployer.py", line 376, in deploy\n return self._deploy(config, chalice_stage_name)\n File "/usr/local/lib/python3.7/site-packages/chalice/deploy/deployer.py", line 392, in _deploy\n self._executor.execute(plan)\n File "/usr/local/lib/python3.7/site-packages/chalice/deploy/executor.py", line 43, in execute\n self._default_handler)(instruction)\n File "/usr/local/lib/python3.7/site-packages/chalice/deploy/executor.py", line 55, in _do_apicall\n result = method(**final_kwargs)\n File "/usr/local/lib/python3.7/site-packages/chalice/awsclient.py", line 881, in update_function\n layers=layers\n File "/usr/local/lib/python3.7/site-packages/chalice/awsclient.py", line 953, in _update_function_config\n max_attempts=self.LAMBDA_CREATE_ATTEMPTS\n File "/usr/local/lib/python3.7/site-packages/chalice/awsclient.py", line 1841, in _call_client_method_with_retries\n response = method(**kwargs)\n File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call\n return self._make_api_call(operation_name, kwargs)\n File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 676, in _make_api_call\n raise error_class(parsed_response, operation_name)\nbotocore.errorfactory.ResourceConflictException: An error occurred (ResourceConflictException) when calling the UpdateFunctionConfiguration operation: The operation cannot be performed at this time. An update is in progress for resource : arn:aws:lambda:us-west-2:XXXXXXXXXX:function:staging-lambda-staging

This seems to be some internal issue with chalice command.
Chalice is trying to create lambda and while updating few configurations its failing stating lambda function already in progress.

We cant have any control here as its failing in chalice deploy command.

@jamesls
Copy link
Member

jamesls commented Jan 20, 2022

Looks like you are using an older version of Chalice. This was fixed in #1732 which was first released in version 1.23.0 of Chalice, so if you upgrade to the latest version this should resolve your issue.

@jamesls jamesls closed this as completed Jan 20, 2022
@kraj007
Copy link
Author

kraj007 commented Jan 21, 2022

Hello @jamesls I am already using chalice==1.26.4 in my deployments which is latest than 1.23.0. Still facing this issue. Do you have any idea why this is happening with this version ? We normally don't have control once use chalice deploy command as chalice internally creating the lambda and updating the function.

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