amazon web services - Using a private AMI in CloudFormation script -



amazon web services - Using a private AMI in CloudFormation script -

i have private ami created using own account. ami want other people utilize (using cloudformation script have written) stand own ec2 instances. cannot create ami public, should available designated 100 people.

this can done manually giving access aws business relationship number mentioned in link here 100 people fiddly.

http://docs.aws.amazon.com/awsec2/latest/userguide/sharingamis-explicit.html

my question is, there way provide aws accounts' aws_access_key_id , aws_secret_access_key on cloudformation script create able utilize private ami?

if question asking if give access keys 100 people , somehow utilize these keys access ami, no not possible. when other people run cloudformation template in business relationship beingness run in context of user associated account. if used credentials this, effort create cloudformation stack in account.

it seems best alternative max suggested, write simple script share ami 100 accounts have. here simple illustration using aws cli, assuming have file each business relationship number on separate line.

#!/bin/bash ami="ami-11235813" file="accounts.txt" while read -r line account="${line}" aws ec2 modify-image-attribute --image-id ${ami} --launch-permission "{\"add\":[{\"userid\":\"${ami}\"}]}" done < "${file}"

amazon-web-services amazon-ec2 amazon-cloudformation

Comments

Popular posts from this blog

java - Bypassing "final local variable defined in an enclosing type" -

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -