How can I use Amazon Redshift as the target endpoint for my AWS DMS task?

3 分的閱讀內容
0

I want to use Amazon Redshift as the target for my AWS Database Migration Service (AWS DMS) task.

Short description

You can use any of the supported resources to set an Amazon Redshift database the target for an AWS DMS task. When you migrate to Amazon Redshift, AWS DMS first moves the data to an Amazon Simple Storage Service (Amazon S3) bucket. Then, the data is transferred to the tables in the target Amazon Redshift cluster. The S3 bucket is created in the same AWS Region as Amazon Redshift database. For this reason, your Amazon Redshift cluster must be in the same account and same AWS Region as the replication instance. For more information, see Limitations on using Amazon Redshift as a target for AWS Database Migration Service.

Note: For AWS DMS version 3.4.7 and later: VPC endpoints in the route tables that the AWS DMS replication instance uses need to access the S3 target. Or, you need an internet gateway route in the route tables the AWS DMS replication instance uses to access the Amazon S3 target. VPC endpoints powered by AWS PrivateLink allow you to connect directly and privately to AWS services from within your VPC. This includes services like Amazon S3.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

Before you begin, provide the security group, subnet CIDR range, or replication instance IP address to the inbound rules of the Amazon Redshift cluster security group. The AWS DMS replication instance must have network connectivity to the Amazon Redshift endpoint (hostname and port) that the cluster uses. Also, make sure that AWS DMS has permissions to create the S3 bucket. AWS DMS uses Amazon S3 as the medium to transfer the data into an Amazon Redshift cluster. AWS DMS requires the dms-access-for-endpoint AWS Identity and Access Management (IAM) role. For more information, see the Prerequisites for using an Amazon Redshift database as a target for AWS Database Migration Service.

  1. Open the AWS DMS console, and choose the AWS Region that your Amazon Redshift cluster is in.
  2. From the navigation pane, choose Endpoints.
  3. Choose Create endpoint.
  4. From Endpoint type, choose Target endpoint.
  5. Enter your Endpoint identifier, and then choose Redshift as your Target engine.
  6. For Server name, enter your Amazon Redshift endpoint.
  7. Enter your Port number.
    Note: The default port for Amazon Redshift is 5439.
  8. Enter your Amazon Redshift User name, Password, and Database name.
  9. (Optional) Add extra connection attributes from the Endpoint-specific settings.
  10. From the Test endpoint connection section, choose the VPC that the replication instance is in. Then, choose the Replication instance.
  11. Choose Run test, and then wait for the status to be successful.
  12. Choose Create endpoint.

If you use the AWS DMS console to create the endpoint, then DMS creates the required IAM roles and policies automatically. If you use the AWS CLI or the AWS DMS API, then you must manually create the IAM roles and policies. For more information, see Creating the IAM roles to use with the AWS CLI and AWS DMS API.

Related information

Using Amazon S3 as a target for AWS Database Migration Service

Working with AWS DMS endpoints

VPC endpoint considerations for upgrading or creating AWS DMS version 3.4.7 or higher

AWS 官方
AWS 官方已更新 4 個月前