

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: EC2 Instance Configuration: Keys
incomplete
2: EC2 Instances
incomplete
3: AMIs and Instance Types
incomplete
4: Public IPs
incomplete
5: Elastic IPs
incomplete
6: Security Groups
incomplete
7: SSH to Our Server
incomplete
8: Deploy the PatientPing Site
incomplete
9: Open Web Traffic
incomplete
10: Creating and Using Your Own AMI
incomplete
11: Reserved Instances and Savings Plans
incomplete
12: Auto Scaling Groups
incomplete
13: Launch Template
incomplete
14: Launch from Template
incomplete
15: Spot Instances
incomplete
16: Stateful and Stateless Applications
incomplete
17: Optional Cleanup
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
The PatientPing app is running on the server, but nobody can reach it because our patientping-public security group only allows inbound SSH traffic on port 22. Port 8080, where the app is listening, is blocked.
This is actually a good default. A firewall that blocks everything except what you explicitly allow is the safest starting point. You saw firsthand in the last lesson what that looks like: the browser just hangs because the packets never make it through.
Now let's poke a hole for web traffic.
Add an inbound rule to the patientping-public security group to allow web traffic on port 8080.
Cost check: No new resources. Security group rules are free.
Security group changes take effect almost immediately. You don't need to restart the instance or the application.
If the site loads (don't worry about pesky "Not Secure" warnings from your browser), you're good to go.
Run and submit the CLI tests.
If you want to use the CLI instead:
# Get the security group ID
aws ec2 describe-security-groups --filters 'Name=group-name,Values=patientping-public' --query 'SecurityGroups[0].GroupId' --output text
# Add the inbound rule
aws ec2 authorize-security-group-ingress --group-id SG-ID --ip-permissions IpProtocol=tcp,FromPort=8080,ToPort=8080,IpRanges=[{CidrIp=0.0.0.0/0,Description="Allow web traffic for PatientPing site"}]