繁体   English   中英

使用 Boto3 时出错:请求中包含的安全令牌无效

[英]Error using Boto3: The security token included in the request is invalid

我正在尝试通过本地 Python 程序向 SNS 主题发布消息,努力学习 Boto3。 我收到错误消息: An error occurred (InvalidClientTokenId) when calling the GetSessionToken operation: The security token included in the request is invalid.

即使在生成新的访问凭证并使用新的访问密钥和密钥更新我的 AWS 配置文件之后,也会发生这种情况。 看来我需要一个 session 令牌,但即使是获取 session 令牌的请求也会遇到我需要 session 令牌的错误。 在这一点上,我只是在原地打转,不知道如何让它向前发展。

发现了问题。 Windows 环境变量覆盖了我的 aws 配置和凭证文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM