Aws EC2 Instance

 EC2 Access:

- To access instance you need a key and key pair name.

- You can download the private key only once.

- The public key is saved by AWS to match it to the key pair name and private key when you try to login to the EC2 Instance.

- Without key pair you can not access instance via RDP or SSH (Linux)

- There is 20 EC2 instance soft limit per account, you can submit a request to AWS to increase it.

* EC2 Status Check:

- By default AWS EC2 service performs automated status checks every one minute.

- This is done on every running EC2 instance to identify any H/W or software issue.

- Status check is built into the AWS EC2 instance.

- They cannot be configured, deleted EC2 instance.

- EC2 services can send its metric data to AWS cloud watch every 5 minutes ( enables by default ).

- Enables details monitoring is chargeable and sends metric in every 01 minute.

- You are not charged for EC2 instance if they are stopped, however attached EBS volumes incur charges.

* When you stop an EBS and backed EC2 Instance:

- Instance perform a shutdown.

- State changes from running > stopping

- EBS volumes remain attached to the instance.

- Any data cached in RAM or Instance store volume is gone.

- Instance retain its private IPV4 or any IPV6 address.

- Instance release its public IPV4 address back to AWS pool.

- Instance retain its Elastic IP address.

* EC2 Termination:

-  When you terminate running instance the instance states changes as follows

Running -- Shutting Down -- Terminated.

- During the shutting down and terminated states, you do not in-cur charges.

- By default EBS root device volumes are deleted automatically.

When the EC2 instance terminated.

- Any additional (non boot/ boot) volumes attached to the instance by default, persist after the instance is terminated.

- You can modify both behaviours by modifying the ' Delete on termination' attribute of any EBS volumes during instance launch or while running.

- Enable EC2 termination protection against accidental termination.

* EC2 metadata:

- This is instance data that you can use to configure or mange the instance.

- Eg. IPV4 address, IPV6 address, DNS hostname, AMI-id, Instance ID, Instance type, Local hostname, public key, Security groups.

- Metadata can be only viewed from within the instance itself i.e you have to login to the instance. 

- Metadata is not protected by encryption anyone that has access to the instance.

Can view this instance:

To view instance metadata

Get http://169.254.169.254/latest/metadata

* Instance user data:

- Data supplied by the user at instance launch in the form of a script to be executed during the instance boot.

- User data is limited to 16kb

- You can change user data by stopping to EC2 first.

- User data is not encrypted EC2 

Bare metal instance

- Non virtualisation environment. 

- Operating system run directly on hardware.

- Suitable for licensing restricted tier-1.

- Business critical applications.

i3 metal, i5 metal, r5 metal, z1d metal, U-06TB1 metal.







Post a Comment

Previous Post Next Post