Amazon-EBS builder is failing to read a file from an S3 bucket during the provision process.

77 views
Skip to first unread message

Steven Stratis

unread,
Sep 14, 2018, 6:25:29 PM9/14/18
to Packer
I'm using packer to build out Windows AMIs. It works great up until the point that I need to download a file from an S3 bucket using powershell. When the powershell script is run it can't seem to connect to the bucket. I'm providing the script the proper bucket name, keys, etc.. and it's using the correct region for my credentials and for the bucket and yet I still get the following errors. 

 VERBOSE: Invoking Amazon S3 object download APIs in region 'eu-west-1'
 
Read-S3Object : Name resolution failure attempting to reach service in region
 eu
-west-1 (as supplied to the -Region parameter or from configured shell default)
 
Unable to connect to the remote server
    amazon
-ebs: Possible causes:
    amazon
-ebs:     - The region may be incorrectly specified (did you specify an availability
    amazon
-ebs: zone?).
    amazon
-ebs:     - The service may not be available in the region.
    amazon
-ebs:     - No network connectivity.

Since it says a possible cause is no network connectivity is it possible the gateway or nic for the builder isn't functioning properly. If so, is that something that can be fixed from the script itself? I don't have this issue using a different AWS account but with the same Bucket roles and rules. 

Thanks!

Megan Marsh

unread,
Sep 14, 2018, 6:27:45 PM9/14/18
to packe...@googlegroups.com
>I don't have this issue using a different AWS account but with the same Bucket roles and rules. 

That makes it sound to me like this may be an AWS permissions issue based on your particular user. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/8e93a9d5-8ebb-40ea-963d-5a0cc3e6093f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Stratis

unread,
Sep 14, 2018, 6:31:37 PM9/14/18
to Packer
That's what I thought as well, but I gave my AWS account that I'm using with Packer permissions for S3 access and still didn't have nay luck. Is there another set of permissions that would control something like this?

Megan Marsh

unread,
Sep 14, 2018, 6:34:51 PM9/14/18
to packe...@googlegroups.com
What about permissions on the actual file you're trying to download? Are they scoped for only the originating user to access?
Reply all
Reply to author
Forward
0 new messages