如果您在使用 AWS DMS Terraform 模块时,它似乎无法读取您的 Kinesis 设置,请按照以下步骤操作:
resource "aws_dms_endpoint" "source" {
endpoint_id = "source"
endpoint_type = "source"
engine_name = "aurora"
database_name = "your-db"
server_name = "your-server"
extra_connection_attributes = "jdbc:mysql://your-server.your-region.rds.amazonaws.com:3306/your-db"
kinesis_settings {
service_access_role_arn = "arn:aws:iam::123456789012:role/dms-kinesis-replication-role"
stream_arn = "arn:aws:kinesis:us-west-2:123456789012:stream/your-stream"
message_format = "JSON"
include_partition_value = true
include_table_alterations = false
}
}
resource "aws_dms_replication_task" "example" {
replication_instance_arn = aws_dms_replication_instance.example.arn
source_endpoint_arn = aws_dms_endpoint.source.arn
target_endpoint_arn = aws_dms_endpoint.target.arn
migration_type = "full-load-and-cdc"
table_mappings = "${file("table-mappings.json")}"
}
如果您还是无法读取 Kinesis 设置,您可能需要检查您的 IAM 权限是否正确。 您需要具备以下权限:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"kinesis:DescribeStream",
"kinesis:GetRecords",
"kinesis:GetShardIterator",
"kinesis:ListShards",
"kinesis:PutRecord",
"kinesis:PutRecords"
],
"Resource": "arn:aws:kinesis:*:*:stream/your-k