Is it possible to set an IAM role for my packer builder instance

1,392 views
Skip to first unread message

erich oliphant

unread,
Dec 21, 2015, 4:30:17 PM12/21/15
to Packer
Hi, I have some large files I need to pull into my build, and rather than doing that from the local machine, I want my packer script to pull the files from S3.  I see stuff in the docs about roles, etc, but it's really not clear to me, how I'd have my "packer builder' instance use a role I specify that say has access to the s3 bucket in question.   I'd thought it would be something like an entry in the json file but I see no option for this.  I've added 'passrole' to the user that the build executes as but that doesnt' seem to help either.

Fraser Goffin

unread,
Dec 22, 2015, 3:59:06 PM12/22/15
to Packer
Certainly can using 'iam_instance_profile' (fed from a variable if you wish as below :-

"builders": [
        {
            "type": "amazon-ebs",
             ...
            "iam_instance_profile": "{{user `iam_instance_profile`}}",

HTHs

Fraser.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages