gpt4 book ai didi

amazon-web-services - 如何解决运行 aws iam upload-server-certificate 时出现的错误 "The security token included in the request is invalid"?

转载 作者:行者123 更新时间:2023-12-03 07:19:14 24 4
gpt4 key购买 nike

cd 进入所有 pem/key 文件所在的目录并运行以下命令:

aws iam upload-server-certificate 
--server-certificate-name certificate_name
--certificate-body file://webservercertificate.pem
--private-key file://server.key
--certificate-chain file://certificate_chain_file.pem

我收到以下错误:

A client error (InvalidClientTokenId) occurred when calling the UploadServerCertificate operation: The security token included in the request is invalid.

我在“用户”中有 1 个“用户”。该用户已被分配以下权限:

IAMFullAccess IAMReadOnlyAccess IAMUserSSHKeys

我已下载该用户的凭据并将其放入我的用户变量中

AWS_ACCESS_KEY ****
AWS_SECRET_KEY ****

我的 Elastic beanstalk 上有 1 个角色 aws-elasticbeanstalk-ec2-role

最佳答案

即使在重新运行 aws configure 并输入新的 AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEY 后,我也遇到了同样的错误。

为我解决这个问题的方法是删除我的 ~/.aws/credentials 文件并重新运行 aws configure

我的 ~/.aws/credentials 文件似乎有一个附加值:aws_session_token,这导致了错误。使用命令 aws configure 删除并重新创建 ~/.aws/configure 后,现在只有 aws_access_key_id 的值>aws_secret_access_key

关于amazon-web-services - 如何解决运行 aws iam upload-server-certificate 时出现的错误 "The security token included in the request is invalid"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34582318/

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