From the course: Azure Resources for AWS Architects

AWS compute services - Azure Tutorial

From the course: Azure Resources for AWS Architects

Start my 1-month free trial

AWS compute services

- [Instructor] Amazon's computing service is designed to make scaling easier for developers. EC2's simple interface allows you to configure capacity with minimal friction. It provides you with complete control over your computing resources. Amazon's EC2 reduces the time required to launch new server instances, allowing you to quickly scale capacity both vertically and horizontally as your computer requirements change. Amazon's EC2 changes the dynamics of computing by allowing you to pay only for the size you use. I've navigated to the AWS Management Console. I've also elected to use the Cloud9 IDE. I'll create a VPC by entering this syntax, including aws space ec2 create-vpc - -cidr-block and the CIDR block notation, 10.0.0.0/16. Then I'll select enter. Make note of the output values. In particular, the vpcid. I'll need that moving forward. At the prompt, I'll create a subnet by entering the syntax aws ec2 create-subnet space --vpc-id. I'll use the VPC output value. And I'll specify the CIDR block for the subnet. 10.0.1.0/24. Then I'll select Enter. I'll also make note of the output on successfully creating the subnet, locate the subnetid value. I'll also need that moving forward. At the prompt, I'll create a security group by entering this syntax. Aws ec2 create-security group and I'll specify the group name. I've labeled it mysecurityname. I'll provide a description. My security group. I'll also call on the vpc-id. I'll copy the vpcid output from earlier. Once I've pasted my vpcid from earlier from my security group, I'll select Enter. Also make note of the security group's ID. At the prompt, I'll create a key pair for my EC2. The operation is create-key-pair. I'll specify the key name. I've labeled it mykeypair1. We can see the output of the key material. I'll only require the key name in further operations. At the prompt, I'll create an instance by entering this syntax. The operation is run-instances. I'll specify an image-id and the image-id which is the Amazon machine image. Let me show you where you should locate a community AMI. I'll select Services. EC2. You can choose to launch an instance and under Machine Images in the marketplace, you can find a community of AMIs and you can see the AMI ID. There's others that if you wish to select, you can choose from. I'll go back to the Cloud9 and in that IDE, I'll paste my AMI ID. Now I'll specify the count which is how many instances I wish to launch. I also need to specify the instance type which is the size. T2.micro and I'll also leverage the key pair name that I created earlier and the security group. The security group ID output value is located above. I'll highlight, copy the content of that value and paste it below. Great, I also need my subnet ID. And I'll locate my subnet from my subnet output. There's my subnetid. I'll copy the content of that value. I'll paste. Now I'm launching that instance. We can see it took the values that I provided and if I scroll up, you'll see from the last command, the instance state which is disabled, it's pending and some additional information on the output that shows that instance will be launched. The date and time. The IP address, the VPC id that I provided earlier and some additional important information like network interface, subnets, and even some additional insight into the virtual machine itself. We can easily navigate back to the AWS Management Console where I can then select Services. EC2. And I can see under Resources, there are two running instances. The one instance that we currently created that has the t2.micro and some description information because we have successfully created our EC2.

Contents