Creating Images using AWS EC2
- In this approach we create a Image based on the EC2 instance on which application is pre installed
- The image created can be used to create multiple EC2 instances with the application.
- Create an ec2 instance
- Manually install/configure the application
- Once the application is up and running, Create image using AWS Console

- When we execute create image then
- AWS creates a backup of the disk (EBS Volume) called as EBS snapshot
- In addition to snapshot AWS stores some meta-information about the image created
- This image will be stored in the Same Region by Default and the image will be private i.e. can be used by users in the Same AWS Account
- The charges of the AMI are the snapshot charges

- AMI will have unique AMI id
- To make AMI available to other regions

- When the AMI is copied to other region a new AMI id will be created.
- AMI can be shared with Other AWS accounts or can be made public

- Now lets try to create an ec2 instance based on the private AMI created

Scenario:
- Create an EC2 instance with two network interfaces as shown below

- Create a Amazon Linux 2 AMI with t2.micro as its size and open only 80 port
- In AWS EC2 instance is launched in an AZ and connected to network on a particular subnet

- Lets create a security group to allow only our laptop to enter using 22 port

- Now lets create a new network interface

- Now create an Elastic IP Address and assign to the management network interface

- Now lets try to login using SSH
ssh -i khajacloud.pem ec2-user@54.185.44.31
- Use cases for multiple network interfaces
- When organization use management network separated from application network
