You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Security and networking are fundamental to running EC2 instances. This lesson covers the three pillars you configure for every instance: key pairs for authentication, security groups for firewall rules, and VPC networking for connectivity.
EC2 uses asymmetric cryptography (public/private key pairs) to control access to instances.
.pem file).# Create a key pair
aws ec2 create-key-pair \
--key-name my-app-key \
--key-type ed25519 \
--query "KeyMaterial" \
--output text > my-app-key.pem
chmod 400 my-app-key.pem
| Type | Description |
|---|---|
| RSA | Traditional; widely supported; 2048-bit or 4096-bit |
| ED25519 | Modern; smaller keys; faster authentication; recommended for new instances |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.