![](/img/trans.png)
[英]AWS Authorization In Code - {“message”: “The security token included in the request is invalid.” }
[英]aws sam invalid token included in the request is invalid
我正在使用 aws sam 以及何时尝试进行 sam 部署。 我收到此错误:
Error: Failed to create managed resources: An error occurred (InvalidClientTokenId) when calling the CreateChangeSet operation: The security token included in the request is invalid.
我已经从.aws 更改了我的凭据,并使用命令 aws configure 更改了它们。 当我尝试在线访问任何内容时,我也会收到错误消息,例如我尝试将文件上传到 S3 存储桶。
Error: botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the UpdateItem operation: The security token included in the request is invalid.
有任何想法吗?
您需要检查是否在~/.aws/credentials文件中设置了默认凭据,如果您有多个并且没有在共享凭据文件中指定默认值,而且您在环境 sam cli 中没有设置任何内容将因上述消息而失败。
您使用此文档来设置它们
当我收到“请求中的令牌无效”时,我的具体解决方案是:
我猜您的凭据没问题,但是请再次检查您是否指向正确的region
。 那确实是我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.