We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

EC2 Instances

With a VPC, subnets, and a key pair in hand, we're ready to launch our first AWS server instance.

Elastic Cloud Compute (EC2) is AWS' flagship service for running servers on their infrastructure. It's their answer to questions like:

  • How do I get a Linux or Windows box in Amazon's cloud?
  • How do I provision dedicated hardware?
  • How do I build a server with a GPU attached?

Let's create an instance and look at the choices we have to make along the way.

Assignment

Launch a t3.micro EC2 instance named patientping-web in patientping-public-a.

Cost check: The Linux server we provision here will cost $0.0104 per hour (in us-east-1). That means about $0.25 per day, or $7.60 per month. If you're on the free tier, it will be covered by that.

Remember to delete this server when you're done with it!

Go back to the "Instances" list and confirm the new patientping-web server is there.

Run and submit the CLI tests.

Tip

If you want to use the CLI instead, here's the command structure:

aws ec2 run-instances --image-id AMI-ID --instance-type TYPE --key-name KEY-NAME --subnet-id SUBNET-ID --security-group-ids SG-ID --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=INSTANCE-NAME}]'