EC2 Flashcards
What are the two default IP’s assigned to an EC2 instance when it is stood up in (assuming a route to internet)
Public (www)
Private (AWS network)
How many IAM roles can be attached to an EC2 instance at once?
One
Are ENI’s global?
No, they are bound to an AZ
What is the role of the Ec2 spot advisor?
Spot advisor can provide configuration profiles which can either be directly applied to the spot fleet or customised and then applied to the fleet.
Are you charged for an elastic IP associated against a
-Running
-Non Running
EC2 instance?
You are charged when you have an EIP associated with a non running instance.
Can you detach an instances primary ENI?
No
How many elastic IP’s can you have per account in AWS?
5 - but you can request more.
When connecting to an Ec2 instance - you receive a connection time out. Why is this and what is the fix?
Port 22 is not open on the instances security group. You will need to open the port by creating an inbound rule on the instances security group.
What placement group allows for the highest availability and what are the limits of that group?
Spread. All instances are on different hardware. Limits are that you can only have 7 instances per group. Use for critical apps where each instance needs to be isolated from other instances.
You are ssh’ing into an ec2 instance using a pem file. You get an error stating the key file has bad permissions. What do you need to do?
You need to change the permissions of the key file using chmod 0400
If I have an instance with 3 ENI’s , how many private IP addresses will I have on that instance?
- 1 per ENI.
Does an ENI need to be attached to an instance?
No. ENI’s can be created separately to an instance.
How could you use an elastic IP to mask an instance failure?
You would remap the EIP from the failed instance to a working component. Its a hack, and the architecturally robust method is to use a load balancer and health checks.
If a spot instance is killed by by AWS in your first billing hour, how much do you pay?
Nothing if AWS kills the instance rather than you.
When is an EC2 UserData bootstrap script run?
On FIRST boot of the ec2 instance. Its is run once and only once