Configure the Target S3 Bucket


In this section, we create an Amazon S3 bucket to use as the target destination for our data. Amaozn S3 is a highly available, durable, and scalable object storage built to store and retrieve any amount of data from anywhere cost-effectively.

  1. Open the Amazon S3 console, and then Click on Create bucket.

    \[SQLServer-S3-02\]

  2. S3 bucket names must be unique accross all Amazon S3. Name your bucket dmstargetbucket-YourInitial-RandomNumber, where “YourInitial” is the first letter of your first and last name in lowercase, and “RandomNumber” is any 4 digit random number you want to pick. For example: dmstargetbucket-xy-1234. Leave all other setting as default.

    \[SQLServer-S3-03\]

  3. Navigate to the bucket that you just created, and then choose Create folder. Name the folder dmstargetfolder, then choose Save.

    \[SQLServer-S3-04\]

Next, you need to Create an AWS IAM policy that gives access to the S3 bucket that you just created.

  1. Navigate to the IAM console, and then choose Policies from the navigation pane.

    \[SQLServer-S3-05\]

  2. Choose Create policy , and then choose JSON. Copy following JSON code to the IAM policy editor in the console. Update the resource section of the policy where it says “REPLACE-WITH-YOUR-BUCKET-NAME”, with the name of your bucket. Make sure to keep the * at the end of the name. Click on Review policy.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::REPLACE-WITH-YOUR-BUCKET-NAME*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::REPLACE-WITH-YOUR-BUCKET-NAME*"
            ]
        }
    ]
}

\[SQLServer-S3-06\]

  1. In the Name field, enter DMS-LAB-S3-Access-Policy, and then click Create policy.

    \[SQLServer-S3-07\]

Next, you need to reate an AWS IAM role usesing the IAM policy we just created. AWS DMS will assume this role in order to have premissions to put objects in the target Amazon S3 bucket.

  1. Open the IAM console, and then go to Roles from the navigation pane.

    \[SQLServer-S3-08\]

  2. Click on Create role, choose DMS, and then click on Next: Permissions.

    \[SQLServer-S3-09\]

  3. In the search bar, find the policy that you created earlier by typing in DMS-LAB-S3-Access-Policy. Click on the checkbox to the left of the policy, then choose Next: Tags.

    \[SQLServer-S3-10\]

  4. Choose Next: Review.

  5. In the Role name field, enter DMS-LAB-Role. Click on Create role.

    \[SQLServer-S3-11\]

  6. After the role is created, type in DMS-LAB-Role in the search bar, and click on the role you just created.

    \[SQLServer-S3-12\]

  7. the Role ARN from Summary page into your notepad.

    \[SQLServer-S3-13\]