34.2. Allow Docker EC2 to Access RDS (#34, #32)

This commit is contained in:
Art
2021-09-26 10:26:51 +03:00
parent a2f0c389de
commit 962393ff4e

View File

@ -251,7 +251,7 @@ WantedBy=multi-user.target
- `[Service]` - `[Service]`
- `Environment="SPRING_PROFILES_ACTIVE=aws-rds"` - `Environment="SPRING_PROFILES_ACTIVE=aws-rds"`
#### Create EC2 instance for Docker #### 34.1 Create EC2 instance for Docker
- Create EC2 instance - Create EC2 instance
- User Data: - User Data:
@ -275,5 +275,12 @@ systemctl restart docker
- Associate `docker-elastic-ip` with `docker-ec2` - Associate `docker-elastic-ip` with `docker-ec2`
- In Route 53 create record `dockerapp` with `docker-ec2` public IP - In Route 53 create record `dockerapp` with `docker-ec2` public IP
#### 34.2 Allow Docker EC2 to Access RDS
- Create `mysql-vpc-security-group`
- Allow port 3306 from `docker-security-group`
- Attach SG to database in RDS `portal-db`