When using software such as s3tools or Amazon EC2 API Tools in RightScripts (or standard shell scripts) or Chef Recipes on servers/instances, AWS and/or EC2 credentials are required to be set in the shell environment.
Create a New RightScript with the attachment (see below) and when identifying the inputs, assign the appropriate credential to each input:
Add it to your ServerTemplate or simply run it as an operational script. When running the script (RightScript / Chef Recipe), assign the input values to the credentials of the same name as shown:
The result is your AWS and EC2 credentials are stored in /root/aws-creds
and can be sourced with BASH using source /root/bin/aws-ec2-env.bash
. This source-able script will also conveniently set EC2_HOME.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.