I want to copy(not share) EC2 AMI and RDS snapshot from one account to another account.
I also want to automate this process.
Help will appreciated.
I want to copy(not share) EC2 AMI and RDS snapshot from one account to another account.
I also want to automate this process.
Help will appreciated.
The process would need to be:
The 'share' step is required to grant access to the other AWS Account.
You could automate this with code, but the code would need the ability to access both AWS Accounts since the 'share' step needs to be done in the source account and the 'copy' step needs to be done in the target account. This could be done by creating an IAM Role in the target account that can be assumed by your code.
You could potentially go one step further and have the code run in an AWS Lambda function that is automatically triggered by EventBridge whenever a new snapshot is generated. This can be done by triggering off an "RDS DB Snapshot Event", but I can't see an event that would trigger after an AMI is created.