Creating AWS Account#
Create AWS account here.
Provisioning EC2 using Terraform#
Create a test.tf:
provider "aws" {
access_key = "..."
secret_key = "..."
region = "us-east-1"
}
resource "aws_instance" "example" {
ami = "ami-2757f631"
instance_type = "t2.micro"
}
Then execute:
$ terraform apply
Connecting to AWS Instance#
$ ssh -i aws.pem ec2-user@<hostname>