bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

Grant AMI to organization and/or organization units

Open samjo-nyang opened this issue 3 years ago • 1 comments

What I'd like: I'd like to share AMIs with organizations and/or organization units.

  • https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/share-amis-with-organizations-and-OUs.html

It would be nice if it supports the following (or similar) commands:

cargo make -e GRANT_TO_ORG_ARNS=arn:aws:organizations::123456789012:organization/o-123example grant-ami

I think that changing this file will work, but I didn't test it.

Any alternatives you've considered:

samjo-nyang avatar Feb 16 '22 10:02 samjo-nyang

Here we can see the API that you are referring to: https://docs.aws.amazon.com/cli/latest/reference/ec2/modify-image-attribute.html

[--organization-arns <value>]
[--organizational-unit-arns <value>]

However, we are using Rusoto and I'm not seeing organizations in the ModifyImageAttributesRequest. https://rusoto.github.io/rusoto/rusoto_ec2/struct.ModifyImageAttributeRequest.html

If we look at the new Rust SDK, we do see the necessary fields available. https://docs.rs/aws-sdk-ec2/0.6.0/aws_sdk_ec2/input/struct.ModifyImageAttributeInput.html

So, unfortunately, if I'm reading these sources correctly, it looks like we may need to switch from rusoto to the AWS SDK to do this.

webern avatar Feb 22 '22 00:02 webern

Hi @samjo-nyang!, I think we will punt this to the following release (1.11)

arnaldo2792 avatar Oct 06 '22 16:10 arnaldo2792