Assign the Permissions Policy to the IAM Role for Amazon RDS for SQL Server

Choose an authentication method and assign the permissions policy to the IAM role based on the authentication method.

  • IAM Role: In the AWS Console, create an IAM role and attach the IAM role to the instance that acts as the access node, which is a Windows SQL EC2 client.

    Note

    If IAM Role authentication is selected for the Amazon client, but an access node that is not associated with the IAM role is used for the backup or restore, the operation fails.

    The IAM role must have appropriate permissions, which can be any of the following:

  • Access and Secret Key: Obtain the key pair (access key and secret key) from the Amazon EC2 Web site under Security Credentials.

    When configuring the backup and restore support, verify that the IAM role that is associated with the option group has the AWS permission policy to the S3 bucket or object with the following permissions:

    • List (ListBucket)

    • Read (GetBucketLocation, GetObject, ListMultipartUploadParts)

    • Write (AbortMultipartUpload, PutObject)

      The following sample script assigns the permissions policy to the IAM role for a root user:

      "Statement":[
          {
              "Effect":"Allow",
              "Action":[
              "s3:ListBucket",
              "s3:GetBucketLocation",
              ],
              "Resource":[
                  "arn:aws:s3:::bucket_name"
              ]       
          },
          {
              "Effect":"Allow",
              "Action":[
                  "s3:ListBucket",
                  "s3:GetBucketLocation",
                  "s3:GetObject",
                  "s3:PutObject",
                  "s3:ListMultipartUploadParts",
                  "s3:AbortMultipartUpload"
              ],
              "Resource":[
                  "arn:aws:s3:::bucket_name/*"
              ]
          }
      ]
      }

      For a non-root user, use the following script to create the policy and assign the permissions to the IAM role.

      {
          "Version": "2012-10-17",
          "Statement": [
              {
                  "Effect": "Allow",
                  "Action": [
                      "s3:ListBucket",
                      "s3:GetBucketLocation"
                  ],
                  "Resource": [
                      "arn:aws:s3:::bucketname"
                  ]
              },
              {
                  "Effect": "Allow",
                  "Action": [
                      "s3:GetObjectMetaData",
                      "s3:GetObject",
                      "s3:PutObject",
                      "s3:DeleteObject",
                      "s3:ListMultipartUploadParts",
                      "s3:AbortMultipartUpload"
                  ],
                  "Resource": [
                      "arn:aws:s3:::bucketname/*"
                  ]
              },
              {
                  "Effect": "Allow",
                  "Action": "rds:*",
                  "Resource": "*"
              }
          ]
      }
  • STS Assume Role with IAM Policy: To use an Security Token Service (STS) assume role with IAM policy, obtain the STS Amazon Resource Name (ARN) from the Amazon EC2 website section on IAM roles.

Loading...