Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You will then need to add the necessary security groups to your EC2 instance to enable communication to RDS. Look for the security groups with "DatabaseVpcSecurityGroup" and "LambdaSecurityGroup" in the name and add them to your instance.

Connect to EC2 Instance

Select your EC2 instance from the EC2 Instances list, then open the "Actions" dropdown and select "Connect". Select Session Manager and click on the "Connect" button. This should open a shell screen on your EC2 instance.

...

$ sudo amazon-linux-extras enable postgresql10
$ sudo yum clean metadata
$ sudo yum install postgresql

Connect to RDS from EC2 Instance

You will need to lookup the host, username, password and dbname from Secrets Manager. Open the secret that starts with "DbPasswordSecret" in Secrets Manager. Within the "Secret value" section click on "Retrieve secret value" and you will see the necessary values. DO NOT SHARE THIS VALUES

...