gpt4 book ai didi

python - 使用 awsebcli 部署 Elastic Beanstalk 应用程序时出现“操作被拒绝”错误

转载 作者:太空狗 更新时间:2023-10-29 23:57:49 25 4
gpt4 key购买 nike

我第一次尝试将 Django 应用程序部署到 Elastic Beanstalk 上。我一直在学习两个教程 herehere寻求帮助,但我遇到了教程似乎没有涵盖的问题。

到目前为止,我遵循的步骤是将 awsebcli 安装到 Python3.4 虚拟环境中,然后 cd 到我的项目目录。然后调用 eb init。然后系统会提示我输入我的访问 key 。我已将它们保存到一个文本文件中,因此我只需将我的 key (确保没有尾随空格)复制并粘贴到终端中。

问题是返回了一个错误:

ERROR: Operation Denied. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

奇怪的是,在随后的尝试中,在我为我的部署输入区域编号后,更早的时候弹出了一个错误。但它仍然提示我输入 key :

ERROR: The current user does not have the correct permissions. Reason: Operation Denied. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

这是 eb init --debug 的完整输出:

e$ eb init -- debug

Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-south-1 : Asia Pacific (Mumbai)
7) ap-southeast-1 : Asia Pacific (Singapore)
8) ap-southeast-2 : Asia Pacific (Sydney)
9) ap-northeast-1 : Asia Pacific (Tokyo)
10) ap-northeast-2 : Asia Pacific (Seoul)
11) sa-east-1 : South America (Sao Paulo)
12) cn-north-1 : China (Beijing)
(default is 3): 3
ERROR: The current user does not have the correct permissions. Reason: Operation Denied. The security token included in the request is invalid.
You have not yet set up your credentials or your credentials are incorrect
You must provide your credentials.
(aws-access-id): xxxxxxxxxxxxxxxxxxxxx
(aws-secret-key): xxxxxxxxxxxxxxxxxxxxxxxxxxx
ERROR: Operation Denied. The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

The Canonical String for this request should have been
'POST
/

host:elasticbeanstalk.us-west-2.amazonaws.com
x-amz-content-sha256:2dc533b6c6fe3c628385d2b22bfa9e25e75730ee05f85d3b1ce7bacddc535e27
x-amz-date:20160719T134302Z

host;x-amz-content-sha256;x-amz-date
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

The String-to-Sign should have been
'AWS4-HMAC-SHA256
20160719T134302Z
20160719/us-west-2/elasticbeanstalk/aws4_request
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

最佳答案

原来问题是我的安全 key “过时了”。这是因为我的 IAM 权限在第一组 key 的生成和尝试部署我的应用程序之间发生了变化。

生成一组新的 key 解决了这个问题。

关于python - 使用 awsebcli 部署 Elastic Beanstalk 应用程序时出现“操作被拒绝”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38460457/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com