Skip to content

How do I configure a source Amazon RDS database and an Amazon EC2 target?

2 minute read
0

I want to test connectivity between my Amazon Relational Database Service (Amazon RDS) database (DB) and a target Amazon Elastic Compute Cloud (Amazon EC2) client.

Resolution

To create AWS Identity and Access Management (IAM) role trusted entities, complete the following steps:

  1. Open the IAM console.

  2. In the navigation pane, choose Roles.

  3. Choose Create role.

  4. In the Trusted entity type section, select AWS service.

  5. In the Use case field, choose Systems Manager.

  6. Choose Next.

  7. In the Add permissions section, attach an IAM policy.
    Example IAM policy:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": [
                    "ec2:DescribeInstances",
                    "rds:DescribeDBInstances",
                    "ec2:DescribeSubnets",
                    "ec2:DescribeNetworkAcls",
                    "ec2:DescribeRouteTables",
                    "ec2:DescribeSecurityGroups"
                ],
                "Resource": "*"
            }
        ]
    }
  8. Choose Next.

  9. In the Role details section, enter Role name.

  10. Choose Create role.

Note: It's a best practice to create an Amazon CloudWatch alarm that alerts you when a failure occurs during a workflow.

Run the Systems Manager runbook

Prerequisite: Make sure that your IAM user or role has the required permissions. For more information, see the Required IAM permissions section of AWSSupport-TroubleshootConnectivityToRDS.

Complete the following steps:

  1. Open the Systems Manager console.
  2. In the navigation pane, choose Documents.
  3. In the search bar, enter TroubleshootConnectivityToRDS.
  4. Choose the AWSSupport-TroubleshootConnectivityToRDS document.
  5. Choose Execute automation.
  6. Choose Execute.
    Note: For a list of the steps that the runbook performs, see the Document Steps section of AWSSupport-TroubleshootConnectivityToRDS.
  7. After the automation completes, review the detailed results for Success status in the Outputs section.

Run the workflow with the Rate control option

If you use the Rate control option, then you run the workflow on multiple targets and define concurrency and error thresholds. To use the Rate control option, choose the DBinstance Identifier and Source Instance parameters of the corresponding targets. Then, test the target Amazon EC2 instances that can access the Amazon RDS DB instance. For each client and error threshold, use the concurrency to configure the number of workflows that you want to run at the same time.

Related information

Run an automated operation powered by Systems Manager Automation

Setting up automation

Systems Manager Automation runbook reference