Packer: Error "MissingRegion: could not find region configuration" for amazon-ebs builder

Created on 19 Oct 2018  ·  11Comments  ·  Source: hashicorp/packer

Packer version: v1.3.2-dev

Packer builder: amazon-ebs

AWS authentication: Environment variables

$ export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"

Debug log output from PACKER_LOG=1 packer build template.json:

2018/10/19 03:43:20 Build 'amazon-ebs-ecs' prepare failure: 3 error(s) occurred:
3 error(s) occurred:


* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
2018/10/19 03:43:20 ui error: 3 error(s) occurred:

* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
* error validating region: MissingRegion: could not find region configuration
buildeamazon need-more-info

All 11 comments

Please supply the information requested in the issue template:

  • Packer version (packer version)
  • Host platform (uname -a etc.)
  • Debug log output from PACKER_LOG=1 packer build template.json.
    Please paste this in a gist.
  • The _simplest example template and scripts_ needed to reproduce the bug.
    Include these in your gist.

@niusmallnan have you figured this out? We can't help without further information.

Sorry for the late reply, I have been unable to reply yesterday because of Github was down. 😂

The template: https://gist.github.com/niusmallnan/93cfd5b1ca8ce45f8a88119c42ae1f65

I just run this command:

AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx packer build <that-template>

If I roll back packer to v1.3.1, there is no problem.
It seems to be a problem caused by the recent upgrade of the AWS SDK in packer.

I can't reproduce with the master branch; what commit are you on? I do see that you've got a typo in that build. You're listing the region us-west-1 both as the build region and as a region to copy the ami to.

          "region": "us-west-1",
            "ami_regions": [
                "us-west-1"
            ],

I'm guessing you want it to read:

          "region": "us-west-1",
            "ami_regions": [
                "eu-west-1"
            ],

Does the problem still occur for you if you fix that? If you still have an issue can you please share a gist containing the entire debug log so I have a better idea of _where_ in the build process this error occurs?

I am experiencing the same issue with the latest version of packer

Fyi reverting to 1.3.1 worked successfully for me too, so it was not just a typo on your behalf.

Does this build work for you?

linux build:
packer.zip

osx build:
packer.zip

@SwampDragons After using the latest master code, this problem has disappeared.

I think we can close this issue.

Thank you @swampdragons

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

craigsimon picture craigsimon  ·  3Comments

wduncanfraser picture wduncanfraser  ·  3Comments

mushon4 picture mushon4  ·  3Comments

sourav82 picture sourav82  ·  3Comments

brettswift picture brettswift  ·  3Comments