Skip to content

How do I troubleshoot connectivity failure and errors for an AWS DMS task that uses Amazon Redshift as the target endpoint?

4 minute read
0

I want to troubleshoot connectivity failure and errors for an AWS Database Migration Service (AWS DMS) task that uses Amazon Redshift as the target endpoint.

Short description

Make sure that you complete the prerequisites to use an Amazon Redshift database as a target for AWS DMS. If you don't complete the prerequisites, then connectivity to an Amazon Redshift endpoint can fail.

Also, if you don't correctly set up the network configuration of your AWS DMS task, then a connectivity test can fail. To troubleshoot endpoint connectivity errors, see How do I troubleshoot AWS DMS endpoint connectivity failures?

Resolution

Resolve "Role 'dms-access-for-endpoint' is not configured properly" error

If you don't create and configure the required AWS Identity and Access Management (IAM) role for the endpoint Amazon Resource Name (ARN) in use, then you receive this error.

Note: If you use the AWS DMS console, then AWS DMS automatically creates the required IAM role. If you use the AWS DMS API or the AWS Command Line Interface (AWS CLI), then AWS DMS doesn't automatically create the role.

To resolve this error, confirm that you created and correctly configured the required dms-access-for-endpoint IAM role.

Resolve "Unable to create S3 bucket for Redshift. Bucket Name for endpoint ARN is in use" error

If you don't correctly attach an Amazon managed policy to the dms-access-for-endpoint IAM role, then you might receive the following error:

"Unable to create S3 bucket for Redshift. Bucket Name for endpoint ARN is in use."

You might also receive the preceding error for the following reasons:

  • The dms-access-for-endpoint IAM role policy has an explicit deny for Amazon Simple Storage Service (Amazon S3).
  • You modified the Amazon S3 bucket policy that AWS DMS automatically created and associated with the Amazon Redshift endpoint with explicit restriction.

To resolve this error, attach the default managed policy (AmazonDMSRedshiftS3Role) or a similar custom policy to the dms-access-for-endpoint IAM role. Then, confirm that the default S3 bucket policy that AWS DMS associated with the endpoint doesn't have explicit restriction. For more information, see Amazon S3 bucket settings.

Migrate data to an Amazon Redshift endpoint

When you migrate data to an Amazon Redshift target endpoint, AWS DMS uses a default S3 bucket as intermediate task storage. Then, AWS DMS copies the migrated data to Amazon Redshift. When you run the test connection for the target Amazon Redshift endpoint, this automatically creates an S3 bucket with the name dms-'Redshift endpoint ARN'.

You can choose a custom S3 bucket for this intermediate storage. For more information, see Using an Amazon Redshift database as a target for AWS DMS.

Resolve "Amazon S3; Status Code: 400; Error Code: TooManyBuckets" error

If your AWS account reaches the quota for Amazon S3, then you receive an error similar to the following when you test your endpoint:

"Service: Amazon S3; Status Code: 400; Error Code: TooManyBuckets; Request ID: #######; S3 Extended Request ID: xxxxxxxxxxxxxx; Proxy: null"

To resolve this error, delete unused buckets from your account, and then test the endpoint again.

Resolve "<NoSuchBucket> The specified bucket does not exist" error

If you delete an S3 bucket that AWS DMS creates during task migration, then you receive the following error in the task logs:

"<NoSuchBucket> The specified bucket does not exist."

To resolve this error, test the connection for your Amazon Redshift endpoint, and then restart or resume the task. If you configured your endpoint for use as a custom bucket, then make sure that it's available in Amazon S3 before you restart the task.

AWS OFFICIALUpdated 6 months ago