Zappa部署到AWS lambda-调用UpdateStack操作时发生错误(ValidationError)

时间:2020-03-13 09:29:43

标签: python flask aws-lambda zappa

虽然使用Zappa在AWS lambda上部署Flask应用程序,但长期以来,我一直陷于这一错误。

botocore.exceptions.ClientError:调用UpdateStack操作时发生错误(ValidationError):Stack:arn:aws:cloudformation:ap-south-1:432995435807:stack / recommendation-service-dev / 75e35800-636d-11ea -bd07-0aa7e2913d94处于DELETE_FAILED状态,无法更新。

可笑的是zappa update dev的输出是-

Important! A new version of Zappa is available!
Upgrade with: pip install zappa --upgrade
Visit the project page on GitHub to see the latest changes: https://github.com/Miserlou/Zappa
Calling update for stage dev..
Downloading and installing dependencies..
 - sqlite==python36: Using precompiled lambda package
Packaging project as gzipped tarball.
  Could not find a version that satisfies the requirement toml==0.9.3 (from versions: 0.6.0, 0.6.5, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 0.9.0, 0.9.1, 0.9.2, 0.9.3.1, 0.9.4, 0.9.6, 0.10.0)
No matching distribution found for toml==0.9.3
Downloading and installing dependencies..
 - sqlite==python36: Using precompiled lambda package
Packaging project as zip.
Uploading recommendation-service-dev-1584090599.tar.gz (73.2MiB)..
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 76.7M/76.7M [00:11<00:00, 6.77MB/s]
Uploading handler_recommendation-service-dev-1584090790.zip (245.9KiB)..
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 252K/252K [00:00<00:00, 1.38MB/s]
Updating Lambda function code..
Updating Lambda function configuration..
Uploading recommendation-service-dev-template-1584090804.json (1.6KiB)..
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.68K/1.68K [00:00<00:00, 19.8KB/s]
Oh no! An error occurred! :(

==============

Traceback (most recent call last):
  File "/var/lang/lib/python3.6/site-packages/zappa/cli.py", line 2610, in handle
    sys.exit(cli.handle())
  File "/var/lang/lib/python3.6/site-packages/zappa/cli.py", line 505, in handle
    self.dispatch_command(self.command, stage)
  File "/var/lang/lib/python3.6/site-packages/zappa/cli.py", line 549, in dispatch_command
    self.update(self.vargs['zip'], self.vargs['no_upload'])
  File "/var/lang/lib/python3.6/site-packages/zappa/cli.py", line 968, in update
    disable_progress=self.disable_progress)
  File "/var/lang/lib/python3.6/site-packages/zappa/core.py", line 1800, in update_stack
    Tags=tags)
  File "/var/lang/lib/python3.6/site-packages/botocore/client.py", line 314, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/var/lang/lib/python3.6/site-packages/botocore/client.py", line 612, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the UpdateStack operation: Stack:arn:aws:cloudformation:ap-south-1:432995435807:stack/recommendation-service-dev/75e35800-636d-11ea-bd07-0aa7e2913d94 is in DELETE_FAILED state and can not be updated.

==============

0 个答案:

没有答案