I want to generate pre-signed S3 URLs using temporary security credentials (my program is running on an EC2 host that has an IAM role attached with the policies I want).
I saw on the docs for how to create a signed request that I am supposed to provide the session token as part of the pre-signed URL. Is this safe to expose to the public?
The docs on how to use temporary credentials say that "AWS uses the session token to validate the temporary security credentials," but can someone use the access key and session token from the temporary security credentials (both of which are visible in the pre-signed URL) to do anything malicious?
In short, my question is: how secret is the session token from AWS temporary security credentials? Is it dangerous to reveal by itself? What about if I reveal it with the associated access key?
Thanks in advance! I've been scratching my head about this since the STS docs aren't super clear on how secret this session token is, and I definitely want to be doing The Right Thing security-wise.