简体   繁体   中英

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

I'm attempting to publish a message to an SNS topic via a local Python program, working to learn Boto3. I'm getting the error: An error occurred (InvalidClientTokenId) when calling the GetSessionToken operation: The security token included in the request is invalid.

This is occurring even after generating new access credentials and updating my AWS config file with the new access and secret keys. It seems I need a session token, but even the request to get a session token is met with the error that I need a session token. I'm just spinning in circles at this point, and can't figure out how to get this to move forward.

Found the problem. Windows Environment Variables were overriding my aws Config and Credential files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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