7

I'm trying to copy an AMI from one account A but owned by another account B. I have previously built this AMI. The account A has launch permissions on the AMI, but when I copy I got this error message : Images from AWS Marketplace cannot be copied to another AWS account.

So, I make a DescribeImage and I got this :


productCodes
 item
            productCode 7w73f3XXXXXXXXXXXXXX /productCode
            type marketplace /type
/item
/productCodes

I think that my issue come from the productCode & type. Therefore my question, how can I remove productCode and type please ?

Best regards,

Alan Francis
  • 1,249
  • 11
  • 17
willyRG
  • 83
  • 1
  • 8

2 Answers2

3

This is because the AMI in question is licensed from the marketplace; that is, the author doesn't want it simply given away / copied to anyone. Please visit the Marketplace and license the AMI.

CodeShane
  • 6,480
  • 1
  • 18
  • 24
  • 1
    I have started out with a community AMI in one account, enhanced it with extra features and made an AMI that I want to use in another account. I'm not trying to circumvent the license of the original AMI, but I do want to avoid having to do my enhancements again (installing Oracle Grid, configuring ASM and importing a DB baseline dataset) – klang May 23 '16 at 08:36
  • Since it's a community AMI, mind sharing the ami id? – CodeShane May 23 '16 at 09:35
  • More generally though, if you want freedom to copy AMIs you need to start with one of the base images provided by Amazon. – CodeShane May 23 '16 at 09:36
  • my bad .. not a community AMI, but [one from the AWSMarkedplace](https://aws.amazon.com/marketplace/ordering?productId=09f042dd-a73d-47dd-bacb-79627f014808&ref_=dtl_psb_continue&region=us-east-1) .. started up in one account where I made an AMI of the baseline installation. – klang May 23 '16 at 13:13
  • Yeah, that makes more sense. The Marketplace AMIs have 'billing codes' associated with them, dealing with licenses and the like. You can't "copy" the AMI to another region, but I seem to recall having bypassed this restriction (for backup purposes) by launching the AMI in another region and creating a new AMI from it. – CodeShane May 23 '16 at 14:11
  • I presume your customization was done via SSH? if so, depending on how complex it was, you may find most of the commands still in your `history`. – CodeShane May 23 '16 at 14:12
  • Yep, done via SSH and fully documented. The process just takes some time that I wanted to avoid spending again, for the next project, hence the need to store an AMI with the baseline state of the machine. Working in that way IS actually possible, if you DO NOT start from a MarkedPlace AMI. Live and learn. :-) – klang May 24 '16 at 12:44
2

solution Images from AWS Marketplace cannot be copied to another AWS account error

1 - Launch the shared AMI

1b - if you not "subscribed" to the product already it will first throw an error, go to the link it tells you and subscribe to the product:

Spot Request Failed In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit:

2 - When your ec2 is running, create and AMI from the running ec2... done you have the AMI owned by your AWS account.

wiseon
  • 21
  • 1