I'm trying to run a Packer template to build a basic AWS EBS based instance. I keep getting the following error however.
==> amazon-ebs: Error querying AMI: NoCredentialProviders: no valid providers in chain. Deprecated.
==> amazon-ebs: For verbose messaging see aws.Config.CredentialsChainVerboseErrors
Build 'amazon-ebs' errored: Error querying AMI: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
I've got my credentials pulling from environment variables like this in the template.
{
"type": "amazon-ebs",
"access_key": "{{user `AWS_ACCESS_KEY_ID`}}",
"secret_key": "{{user `AWS_SECRET_ACCESS_KEY`}}",
"region": "us-east-1",
"source_ami": "ami-fce3c696",
"instance_type": "t2.micro",
"ssh_username": "broodadmin",
"ami_name": "broodbox"
}
I pulled the key and secret from AWS, and have setup the permissions for the group per instructions in the docs here. I've also insured the user is in the group that has all of these permissions set.
Seen this?
This is more of the template with the other google compute and variables in the template listed...
{
"variables": {
"account_json": "../../../secrets/account.json",
"instance_name": "broodbox",
"image_name": "broodbox"
},
"builders": [
{
"type": "googlecompute",
"account_file": "{{user `account_json`}}",
"project_id": "that-big-universe",
"source_image": "debian-8-jessie-v20160923",
"zone": "us-west1-a",
"instance_name": "{{user `instance_name`}}",
"image_name": "{{user `image_name`}}",
"image_description": "Node.js Server.",
"communicator": "ssh",
"ssh_username": "broodadmin"
},
{
"type": "amazon-ebs",
"access_key": "{{user `AWS_ACCESS_KEY_ID`}}",
"secret_key": "{{user `AWS_SECRET_ACCESS_KEY`}}",
"region": "us-east-1",
"source_ami": "ami-fce3c696",
"instance_type": "t2.micro",
"ssh_username": "broodadmin",
"ami_name": "broodbox"
}
],
"provisioners": [
The full template is here https://github.com/Adron/multi-cloud/blob/master/ecosystem/packer/nodejs_server.json
The repo is a mult-cloud repo I'm working on https://github.com/Adron/multi-cloud