Reputation: 11
Hi I am trying to create a cloudformation template to migrate data from postgres in ec2 to rds.I got this template from this link. https://hands-on.cloud/aws-cloudformation-how-to-create-dms-infrastructure-for-relational-db-migration/.
I modified it but i got a error
"Template format error: Every Parameters member must be an object".
In the link he created vpc and security group.i already have vpc and security to configure. Can u anybod please
Parameters:
ReplicationInstanceAllocatedStorage:
Description: >
T he amount of storage (in gigabytes) to be initially allocated
for the replication instance.
Type: Number
Default: 256
ReplicationInstanceClass:
Description: >
The compute and memory capacity of the replication instance as specified
by the replication instance class.
Valid Values: dms.t2.micro | dms.t2.small | dms.t2.medium | dms.t2.large |
dms.c4.large | dms.c4.xlarge | dms.c4.2xlarge | dms.c4.4xlarge
Type: String
Default: dms.r5.xlarge
SrcDbName: postgres
Type: String
SrcDbEngine: postgres
Type: String
SrcDbServerName: postgres
Type: String
SrcDbPort: 5432
Type: Number
SrcDbUsername: postgres
Type: String
SrcDbPassword: postgres
Type: String
Resources:
ReplicationInstance:
Type: AWS::DMS::ReplicationInstance
Properties:
AllocatedStorage: !Ref ReplicationInstanceAllocatedStorage
AllowMajorVersionUpgrade: false
AutoMinorVersionUpgrade: false
MultiAZ: false
PubliclyAccessible: false
ReplicationInstanceClass: !Sub '${ReplicationInstanceClass}'
ReplicationInstanceIdentifier: !Sub '${AWS::StackName}-replication-instance'
DmsEndpointSource:
Type: AWS::DMS::Endpoint
Properties:
DatabaseName: !Ref SrcDbName
EndpointType: 'source'
EngineName: !Ref SrcDbEngine
ServerName: !Ref SrcDbServerName
Port: !Ref SrcDbPort
Username: !Ref SrcDbUsername
Password: !Ref SrcDbPassword
Upvotes: 0
Views: 258
Reputation: 300
There's a couple of errors in your template.
SrcDbName: postgres
Type: String
and all others in that form are not correct. They should be
SrcDbName:
Description: Source Database Name
Type: String
Default: postgres
for example.
You'll also need your replication destination endpoint and a replication task (IIRC).
Upvotes: 1