Guest User

Untitled

a guest
Jan 17th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. AWSTemplateFormatVersion: 2010-09-09
  2. Parameters:
  3. SourcePort:
  4. Type: Number
  5. Default: 1525
  6. Username:
  7. Type: String
  8. Default: dms_admin
  9. Password:
  10. Type: String
  11. Default: blank
  12. NoEcho: true
  13. OracleSourceServer:
  14. Type: String
  15. Default: 172.20.0.31
  16. OracleSourceDatabase:
  17. Type: String
  18. Default: DEV
  19. Resources:
  20. DMSSourceEndpoint:
  21. Type: "AWS::DMS::Endpoint"
  22. Properties:
  23. EngineName: "ORACLE"
  24. EndpointType: "source"
  25. Username: !Ref Username
  26. Password: !Ref Password
  27. ServerName: !Ref OracleSourceServer
  28. Port: !Ref OracleSourcePort
  29. DatabaseName: !Ref OracleSourceDatabase
  30. ExtraConnectionAttributes: "addSupplementalLogging=Y"
  31. DMSTargetEndpoint:
  32. Type: "AWS::DMS::Endpoint"
  33. Properties:
  34. EngineName: "S3"
  35. EndpointType: "target"
  36. ExtraConnectionAttributes: "addColumnName=true"
  37. S3Settings:
  38. BucketName: !Ref S3Bucket
  39. ServiceAccessRoleArn: !GetAtt S3IAMRole.Arn
  40. S3Bucket:
  41. Type: "AWS::S3::Bucket"
  42. S3IAMRole:
  43. Type: "AWS::IAM::Role"
  44. Properties:
  45. AssumeRolePolicyDocument:
  46. Version: "2012-10-17"
  47. Statement:
  48. -
  49. Effect: "Allow"
  50. Principal:
  51. Service:
  52. - "dms.amazonaws.com"
  53. Action:
  54. - "sts:AssumeRole"
  55. Path: "/"
  56. Policies:
  57. -
  58. PolicyName: DMSPolicy
  59. PolicyDocument:
  60. Version: "2012-10-17"
  61. Statement:
  62. -
  63. Effect: Allow
  64. Action:
  65. - s3:PutObject
  66. - s3:DeleteObject
  67. - s3:ListBucket
  68. Resource:
  69. - !GetAtt S3Bucket.Arn
  70. - !Sub "${S3Bucket.Arn}/*"
  71. Outputs:
  72. DMSTargetEndPoint:
  73. Description: The DMS Target End Point
  74. Value: !Ref DMSTargetEndpoint
  75. Export:
  76. Name: sharedinf-DMSS3TargetEndpoint
  77. DMSS3Bucket:
  78. Description: S3Bucket to house the events from Oracle System
  79. Value: !Ref S3Bucket
  80. Export:
  81. Name: sharedinf-DMSS3Bucket
  82. DMSSourceEndPoint:
  83. Description: The DMS Source End Point (ie Oracle System)
  84. Value: !Ref DMSSourceEndpoint
  85. Export:
  86. Name: sharedinf-DMSTargetEndPoint
Add Comment
Please, Sign In to add comment