0
0
AWScloud~20 mins

Elastic IP addresses in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Elastic IP Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Elastic IP address behavior on instance stop and start

You have an EC2 instance with an Elastic IP (EIP) associated. What happens to the EIP when you stop and then start the instance?

AThe Elastic IP is automatically disassociated and released when the instance stops.
BThe Elastic IP is disassociated but not released; you must manually re-associate it after start.
CThe Elastic IP remains associated with the instance after stop and start, preserving the public IP.
DThe Elastic IP is released back to AWS and cannot be recovered after the instance stops.
Attempts:
2 left
💡 Hint

Think about how Elastic IPs are designed to provide a fixed public IP address.

Architecture
intermediate
2:00remaining
Using Elastic IPs for high availability

You want to design a highly available web service using two EC2 instances in different Availability Zones. How can Elastic IPs help in this design?

AUse a single Elastic IP and manually re-associate it to the healthy instance during failover.
BAssign an Elastic IP to each instance and use DNS failover to switch between them.
CAssign one Elastic IP to both instances simultaneously to share traffic.
DElastic IPs cannot be used in high availability setups across Availability Zones.
Attempts:
2 left
💡 Hint

Consider how Elastic IPs can be moved between instances to maintain a fixed IP.

security
advanced
2:00remaining
Security implications of Elastic IP address usage

Which of the following is a security best practice when using Elastic IP addresses in AWS?

ARegularly release unused Elastic IPs to avoid unnecessary charges and reduce attack surface.
BAssign Elastic IPs only to instances in private subnets to enhance security.
CKeep Elastic IPs allocated even when not in use to prevent others from using them.
DUse Elastic IPs to bypass security groups and network ACLs for easier access.
Attempts:
2 left
💡 Hint

Think about cost and security risks of unused public IPs.

Configuration
advanced
2:00remaining
Correct AWS CLI command to associate an Elastic IP

Which AWS CLI command correctly associates an Elastic IP address to an EC2 instance?

Aaws ec2 associate-address --instance-id i-1234567890abcdef0 --allocation-id eipalloc-12345678 --public-ip 203.0.113.25
Baws ec2 associate-address --instance-id i-1234567890abcdef0 --public-ip 203.0.113.25
Caws ec2 associate-address --allocation-id eipalloc-12345678 --public-ip 203.0.113.25
Daws ec2 associate-address --instance-id i-1234567890abcdef0 --allocation-id eipalloc-12345678
Attempts:
2 left
💡 Hint

Check the required parameters for associating an Elastic IP to an instance.

Best Practice
expert
2:00remaining
Cost optimization with Elastic IP addresses

You have multiple Elastic IPs allocated but only some are associated with running instances. What is the best practice to optimize costs related to Elastic IPs?

AKeep all Elastic IPs allocated to avoid losing them, regardless of usage.
BRelease Elastic IPs that are not associated with running instances to avoid hourly charges.
CAssociate unused Elastic IPs to stopped instances to prevent charges.
DConvert Elastic IPs to standard public IPs to reduce costs.
Attempts:
2 left
💡 Hint

Consider AWS billing rules for Elastic IP addresses.