Using the API keys

To use the API keys in the easiest way, you can export variables in your shell that will get picked up by the tooling; however, you will need to do this on every Terminal where you are working with AWS APIs:

$ export AWS_ACCESS_KEY_ID="AKIABCDEFABCDEF"
$ export AWS_SECRET_ACCESS_KEY="123456789ABCDEF123456789ABCDEF"
$ export AWS_REGION="us-west-1"

Alternatively, if you have the awscli tool installed (sudo apt-get install awscli), you can just run aws configure:

$ aws configure
AWS Access Key ID [None]: AKIABCDEFABCEF
AWS Secret Access Key [None]: 123456789ABCDEF123456789ABCDEF
Default region name [None]: us-west-1
Default output format [None]: json

There are many other ways to set your credentials as well through things like profiles but it really all depends on your expected usage case. For more information on these options,  you can refer to the official documentation at https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.

So with the key available and configured for CLI use, we can now proceed onto building custom AMI images with Packer. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset