vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

How does one get the aws session token?

Open waygee opened this issue 9 years ago • 6 comments

Not sure how to get the aws session token mentioned in the example. Can someone provide any assistance here? Is it a necessary setting?

waygee avatar Aug 12 '15 14:08 waygee

ok, found my own answer.

  1. Download and install the Amazon Command Line Interface http://docs.aws.amazon.com/cli/latest/userguide/installing.html
  2. Configure the command line interface http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html $aws configure
  3. Request the session token $aws sts get-session-token --duration-seconds 129600 (enter your own duration)

waygee avatar Aug 12 '15 15:08 waygee

I entered the SecretAccessKey, Session Token, and AccessKeyId from the get-session-token request I made earlier, and now I am getting this error message:

$ vagrant up --provider=aws Bringing machine 'default' up with 'aws' provider... ==> default: Warning! The AWS provider doesn't support any of the Vagrant ==> default: high-level network configurations (config.vm.network). They ==> default: will be silently ignored. ==> default: Launching an instance with the following settings... ==> default: -- Type: m3.medium ==> default: -- AMI: ami-7747d01e ==> default: -- Region: us-east-1 ==> default: -- Keypair: dev ==> default: -- Block Device Mapping: [] ==> default: -- Terminate On Shutdown: false ==> default: -- Monitoring: false ==> default: -- EBS optimized: false ==> default: -- Assigning a public IP address in a VPC: false There was an error talking to AWS. The error message is shown below:

UnauthorizedOperation => You are not authorized to perform this operation. Encoded authorization failure message

waygee avatar Aug 12 '15 15:08 waygee

ok, I had to make sure the Amazon IAM user had the correct group access. I used AmazonEC2FullAccess

waygee avatar Aug 12 '15 15:08 waygee

@waygee thank you.

dimitardanailov avatar Oct 23 '15 21:10 dimitardanailov

btw in testing, and by convention, an aws Session Token is not a requirement.

denzuko avatar Aug 19 '16 04:08 denzuko

Since Session Token is not required (and I can verify this, having spun up a machine without a Session Token), shouldn't the reference to a Session Token be removed from the Readme? Or shouldn't the Readme at least say that the Session Token is not required?

Alternatively or additionally, is there some reason for using a Session Token that should be explained somewhere?

bhagerty avatar Oct 08 '16 21:10 bhagerty