export AWS_ACCESS_KEY_ID="<YOUR_AWS_ACCESS_KEY_ID>"
export AWS_SECRET_ACCESS_KEY="<YOUR_AWS_SECRET_ACCESS_KEY>"
packer init .
packer build aws-ubuntu.pkr.hcl
# ...
# ==> Wait completed after 5 minutes 15 seconds
# ==> Builds finished. The artifacts of successful builds are:
# --> learn-packer.amazon-ebs.ubuntu: AMIs were created:
# us-west-2: ami-xxxxyyyyzzzztttt
us-west-2
(The region we build packer AMI): https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#Images:visibility=owned-by-melearn-packer-linux-aws-redis-<timestamp>