Skip to content

Instantly share code, notes, and snippets.

View amanharitsh123's full-sized avatar
🐧
SRE

Aman Sharma amanharitsh123

🐧
SRE
View GitHub Profile
@amanharitsh123
amanharitsh123 / ec2_instance_create_and_setup.sh
Created February 5, 2018 05:39 — forked from Pablosan/ec2_instance_create_and_setup.sh
A bash script that will set up a new EC2 instance and ssh into it.
#!/bin/bash
# Authorize TCP, SSH & ICMP for default Security Group
#ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0
#ec2-authorize default -P tcp -p 22 -s 0.0.0.0/0
# The Static IP Address for this instance:
IP_ADDRESS=$(cat ~/.ec2/ip_address)
# Create new t1.micro instance using ami-cef405a7 (64 bit Ubuntu Server 10.10 Maverick Meerkat)