Packer Operations: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
=Build an Amazon EC2 AMI= | =Build an Amazon EC2 AMI= | ||
==Credentials== | |||
Amazon credentials can be provided in the template (not recommended) or as environment variables in the context packer is executed: | |||
<syntaxhighlight lang='bash'> | |||
export AWS_ACCESS_KEY_ID="anaccesskey" | |||
$ export AWS_SECRET_ACCESS_KEY="asecretkey" | |||
$ export AWS_DEFAULT_REGION="us-west-2" | |||
</syntaxhighlight> | |||
then | |||
<syntaxhighlight lang='bash'> | |||
packer build ... | |||
</syntaxhighlight> | |||
==Build== | |||
packer build <''template-name''>.json | packer build <''template-name''>.json |
Revision as of 01:19, 15 November 2019
Internal
Build an Amazon EC2 AMI
Credentials
Amazon credentials can be provided in the template (not recommended) or as environment variables in the context packer is executed:
export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"
$ export AWS_DEFAULT_REGION="us-west-2"
then
packer build ...
Build
packer build <template-name>.json