AWS SESSION TOKEN - AWS ElasticBeanStalk

Hi
I am trying to use Amazon AWS-Educate account with Travis. I am using elasticbeanstalk with travis to deploy my web application. The thing with AWS Educate account is that they provide temporary credentials to access your account which includes a session-token. .Travis.yml configuration file for elasticbeanstalk only contains options to enter access_key_id and secret_access_key. I want to ask if there is a way to add session_token as well. Because otherwise if I enter my credentials without the session token, I get a build error that my access_key_id does not exist.

2 Likes

Any news for Amazon AWS-Educate and aws_session_token?

1 Like

Any news about aws-educate plz…

I’ve added code to support a session token. Please test it by adding the following to the deployment clause:

edge:
  source: 'native-api/dpl'
  branch: 'ebs_session_token'

Please also test it without the token.

The token needs to be specified with session_token:.

I had the same issue as the original post and found this through a search. I can confirm that this fix works for me. I also have an AWS account that doesn’t allow IAM Users with permanent keys. I have to grab my temporary credentials, put them into Travis env variables and then everything works as expected. Here is my full deploy statement for reference:

deploy:
  edge:
    source: 'native-api/dpl'
    branch: 'ebs_session_token'
  provider: elasticbeanstalk
  region: "us-east-1"
  app: jeff-docker-react
  env: Jeffdockerreact-env
# To find bucket_name, search S3 buckets, look for "elasticbeanstalk"  
# Every time you update this codebase you need to grab temporary credentials (~/.aws/credentials)
#  and update env variables in the Travis CI repo Settings:
#  (AWS_ACCESS_KEY,AWS_SECRET_KEY,AWS_SESSION_TOKEN) 
  bucket_name: "elasticbeanstalk-us-east-1-1234567890"
  bucket_path: "jeff-docker-react"
  on:
    branch: master
  access_key_id: $AWS_ACCESS_KEY
  secret_access_key: "$AWS_SECRET_KEY"
  session_token: "$AWS_SESSION_TOKEN"
1 Like