Question: How do I share WorkSpaces images or BYOL images with other AWS accounts?

I want to share an Amazon WorkSpaces image or a WorkSpaces bring your own license (BYOL) image to another Amazon Web Services (AWS) account in the same AWS Region. How can I do that?ResolutionYou can share custom WorkSpaces images across AWS accounts within the same Region. After a WorkSpaces image is shared, the recipient account can copy the image to other Regions as needed. You can self-manage WorkSpaces image transfers using the WorkSpaces console or the AWS Command Line Interface (AWS CLI).BYOL images can be shared only with other accounts with the same AWS payer account ID. To copy a BYOL image to another Region, the destination Region must be set up for BYOL images.Share an image using the WorkSpaces consoleYou can use the WorkSpaces console to share or unshare an image with other accounts in the same Region. For instructions, see Share or unshare a custom WorkSpaces image.Share an image using the AWS CLIYou can share or unshare images programmatically using API calls and the AWS CLI.Important: The commands in the following process require version 2 of the AWS CLI. For installation instructions, see Installing or updating the latest version of the AWS CLI.To copy a WorkSpaces image to a different account within the same Region, follow these steps:1.    From the source account, identify the image ID for the source image. Run the following command, replacing region-code with the WorkSpaces Region code:aws workspaces describe-workspace-images --region region-codeThen, note the ImageId from the output.2.    From the source account, call the UpdateWorkspaceImagePermission API to share the source image with the target account. Run the following command, replacing ImageId with the output from step 1, region-code with the WorkSpaces Region code, and target-account with the target account number:aws workspaces update-workspace-image-permission --image-id ImageId --region region-code --shared-account-id target-account --allow-copy-image3.    (Optional) From the source account, call the DescribeWorkspaceImagePermissions API to see the permissions and verify that the image is shared with the target account. Run the following command, replacing ImageId and region-code with your values:aws workspaces describe-workspace-image-permissions --image-id ImageId --region region-code4.    (Optional) From the target account, call the DescribeWorkspaceImages API to see the shared image. Run the following command, replacing ImageId and region-code with your values:aws workspaces describe-workspace-images --image-ids ImageId --region region-code --image-type SHARED5.    From the target account, call the CopyWorkspaceImage API to copy the shared image. Run the following command, replacing ImageId and region-code with your values. Also, replace new-image-name with the name that you want to use for the image on the target account:aws workspaces copy-workspace-image --source-image-id ImageId --source-region region-code --name new-image-name --region region-codeThe target account can now see the new image in the WorkSpaces console. The image state moves from Pending to Available after the workflow is complete, which typically takes about 15 minutes.

Related informationHow do I create a WorkSpaces image?Copy a custom WorkSpaces image