I want to use an Amazon Simple Storage Service (Amazon S3) bucket as the target for AWS Database Migration Service (AWS DMS). How can I use an S3 bucket as the DMS target for resources in the same account?

After you create a replication instance, you can use an S3 bucket as your target endpoint for DMS by following these steps:

  1. Create an S3 bucket
  2. Create an AWS Identity and Access Management (IAM) policy
  3. Create a role
  4. Create your target endpoint

For more information, see Using Amazon S3 as a Target for AWS Database Migration Service.

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.    Type 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, choose JSON, and then 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.

3.    Choose Review policy, type 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.    Choose Next: Review.

4.    Type a Role name and a Role description.

5.    Choose Create role.

6.    Under Roles, select the role that you created, choose Permissions, and then choose Attach policy.

7.    Choose the policy that you want to attach to the IAM role, and then choose Attach policy.

Create your target endpoint

1.    Open the DMS console, and then choose Endpoints from the navigation pane.

2.    Choose Create endpoint, and then select Target.

3.    Type 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.    Type a Bucket name and a Bucket folder.

6.    Under Advanced, 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.


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2018-07-03