Creation of an EC2 instance in AWS
We've covered the fundamentals of virtualization and virtual machines, and now it's time to dive into creating our own virtual machines!
There are two approaches to consider when making a virtual machine:
1. ๐๐๐ง๐ฎ๐๐ฅ ๐๐๐ช๐ฎ๐๐ฌ๐ญ: We can start by exploring the AWS platform (though the process is similar for other platforms). AWS offers a range of services, each with its own terminology. In AWS, a virtual machine is referred to as an EC2 Instance, and storage is called an S3 instance.
2. ๐ฆ๐ฐ๐ฟ๐ถ๐ฝ๐ ๐ฅ๐ฒ๐พ๐๐ฒ๐๐: If we need to create multiple instances, repeating the manual process can be inefficient. This is where scripting comes in. By writing a script, we can automate the instance request process.
AWS provides APIs for various services, including the AWS EC2 Instance. These APIs handle requests and grant access to virtual machines. To generate a response from the API, the request must meet certain criteria:
1. The request needs to be ๐ฉ๐ฎ๐น๐ถ๐ฑ, following all the API's standard expectations.
2. The request needs to be ๐๐๐๐ต๐ผ๐ฟ๐ถ๐๐ฒ๐ฑ, meaning the user should have access to AWS.
3. The request needs to be ๐๐๐๐ต๐ฒ๐ป๐๐ถ๐ฐ๐ฎ๐๐ฒ๐ฑ, ensuring that the user is authorized to create the EC2 instance.
DevOps Engineer writes a script that interacts with the AWS EC2 API. The script here is a request so it has to abide by the specified criteria.
There are several ways to write the script:
- ๐๐ช๐ฆ ๐๐๐: Using the AWS Command Line Interface.
- ๐๐ช๐ฆ ๐๐ฃ๐ (Python Boto3 module): Leveraging the Python Boto3 module to interact with AWS.
- ๐๐ช๐ฆ ๐๐๐ง: Employing AWS CloudFormation Templates.
- ๐๐๐: Utilizing the AWS Cloud Development Kit.
- ๐ง๐ฒ๐ฟ๐ฟ๐ฎ๐ณ๐ผ๐ฟ๐บ: Leveraging the power of Terraform.
By automating the script, we can make the process faster, more efficient, and error-free.
Join us in the DevOps Learning journey with the hashtags: