· 7 years ago · Apr 23, 2018, 07:14 PM
1env | grep -i aws | cut -c -18 # output is truncated for obvious reasons
2AWS_ACCESS_KEY=AKI
3AWS_SECRET_KEY=zza
4
5
6
7
8{
9 "variables": {
10 "access_key": "{{env `AWS_ACCESS_KEY`}}",
11 "secret_key": "{{env `AWS_SECRET_KEY`}}"
12 },
13 "builders": [{
14 "type": "amazon-ebs",
15 "access_key": "{{user `access_key`}}",
16 "secret_key": "{{user `secret_key`}}",
17 "region": "us-east-1",
18 "source_ami_filter": {
19 "filters": {
20 "virtualization-type": "hvm",
21
22
23
24packer build template.json
25amazon-ebs output will be in this color.
26
27Build 'amazon-ebs' errored: No valid credential sources found for AWS Builder. Please see https://www.packer.io/docs/builders/amazon.html#specifying-amazon-credentials for more information on providing credentials for the AWS Builder.