is there any boto3 API available to share the appstream image between the AWS accounts.

0

we have the appstream image in one account and we want to share this appstream image across the other aws accounts we have under the root OU.

is there any boto3 API available to share the appstream image between the AWS accounts?

2 Antworten
2
  • thanks for sharing it. i tested it, it is working fine. but with this, i can share the image to only one account. is there is any way to share the image with multiple accounts at a time.

  • The method only takes one account ID. You will have to loop or iterate through and make the call with each account ID

  • For example here is some pseudocode:

    accounts = [11111111111111, 22222222222222, 33333333333333]

    client = boto3.client('appstream')

    def share_image(account): client.update_image_permissions( Name='string', SharedAccountId=account, ImagePermissions={ 'allowFleet': True|False, 'allowImageBuilder': True|False } )

    for account in accounts: share_image(account)

1

You can use the AppStream 2.0 UpdateImagePermissions API (Boto3 doc) to add permissions for another AWS account ID to access the image, either with image builder permissions, fleet permissions, or both. This allows you to share an image within the same region with another AWS account.

You can learn more about the specific permissions in the Administrator Guide - Administer your Amazon AppStream 2.0 Images.

Hope this helps.

EXPERTE
beantwortet vor 2 Jahren
  • hi Murali,

    thanks for sharing it. i tested it, it is working fine. but with this, i can share the image to only one account. is there is any way to share the image with multiple accounts at a time.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen