How can I use an Amazon Simple Storage Service (Amazon S3) bucket as the target for AWS Database Migration Service (AWS DMS) for resources that are in the same account?
Short description
After you create a replication instance, you can use an S3 bucket as your target endpoint for AWS DMS by following these steps:
- Create an S3 bucket
- Create an AWS Identity and Access Management (IAM) policy
- Create a role
- Create your target endpoint
For more information, see Using Amazon S3 as a target for AWS Database Migration Service.
Resolution
Create an S3 bucket
1. Open the Amazon S3 console, and then create a bucket.
2. Select the bucket that you created, and then choose Create folder.
3. Enter a folder name, and then choose Save.
Create an IAM policy
1. Open the IAM console, and then choose Policies from the navigation pane.
2. Choose Create policy, and then choose JSON.
3. Add an IAM policy similar to the following:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::bucketname*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bucketname*"
]
}
]
}
Note: Update the policy to refer to your bucket name.
4. Choose Review policy, enter a Name and Description, and then choose Create policy.
Create a role
1. Open the IAM console, and then choose Roles from the navigation pane.
2. Choose Create role, choose DMS, and then choose Next: Permissions.
3. In the Create role pane, in the Search field, choose the policy that you created, and then choose Next: tags.
4. Choose Next: Review.
5. Enter a Role name and a Role description.
6. Choose Create role.
Create your target endpoint
1. Open the AWS DMS console, and then choose Endpoints from the navigation pane.
2. Choose Create endpoint, and then select Target endpoint.
3. Enter the Endpoint identifier, and then choose S3 as the Target engine.
4. Paste the Role ARN that you copied into the Service Access Role ARN field.
5. Enter a Bucket name and Bucket folder.
6. Under Endpoint-specific settings, add your Extra connection attributes, if you have any.
7. (Optional) Under Test endpoint connection, select your VPC and Replication instance, and then choose Run test.
8. Choose Create endpoint.
Related information
Using Amazon S3 as a source for AWS DMS
Working with an AWS DMS replication instance
Troubleshooting migration tasks in AWS Database Migration Service