Skip to content

Instantly share code, notes, and snippets.

View ShubhamRasal's full-sized avatar
💻
Cooking software

Shubham Rasal ShubhamRasal

💻
Cooking software
View GitHub Profile
@ShubhamRasal
ShubhamRasal / website_configuration
Created October 18, 2020 16:05
website_configuration
{
"ErrorDocument": {
"Key": "index.html"
},
"IndexDocument": {
"Suffix": "index.html"
}
}
@ShubhamRasal
ShubhamRasal / update-bucket-policy
Last active October 27, 2020 19:18
update-bucket-policy
$ aws s3api put-bucket-policy --bucket shubham-demo-bucket --policy file://s3_bucket_policy.txt
@ShubhamRasal
ShubhamRasal / s3_bucket_policy
Created October 18, 2020 15:58
s3_bucket_policy
{
"Version": "2008-10-17",
"Id": "PolicyForPublicWebsiteContent",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@ShubhamRasal
ShubhamRasal / create s3 bucket
Created October 18, 2020 15:50
create s3 bucket
$ aws s3api create-bucket --bucket shubham-demo-bucket --region us-east-1
@ShubhamRasal
ShubhamRasal / attach-volume
Last active October 17, 2020 09:00
attach-volume
aws ec2 attach-volume --volume-id vol-0c00199880897650b --instance-id i-025f38bb90de2b9a0 --device /dev/sdf
@ShubhamRasal
ShubhamRasal / create-volume
Last active December 6, 2020 10:14
create-volume
aws ec2 create-volume --volume-type gp2
--size 1 \
--availability-zone ap-south-1a \
--tag-specifications ResourceType=volume,Tags=[{Key=Name,Value=development_creatorsbyheart}]
@ShubhamRasal
ShubhamRasal / run-instances
Last active October 17, 2020 11:22
run-instances
aws ec2 run-instances \
--image-id ami-0e306788ff2473ccb \
--count 1 --instance-type t2.micro \
--key-name MyKeyPair \
--security-groups "MySecurityGroup" \
--placement AvailabilityZone=ap-south-1a
@ShubhamRasal
ShubhamRasal / describe-availability-zones
Created October 17, 2020 08:56
describe-availability-zones
aws ec2 describe-availability-zones
@ShubhamRasal
ShubhamRasal / describe-security-groups
Created October 17, 2020 08:56
describe-security-groups
aws ec2 describe-security-groups --group-ids sg-04e749bf892aa62e7
@ShubhamRasal
ShubhamRasal / authorize-security-group-ingress
Created October 17, 2020 08:52
authorize-security-group-ingress
aws ec2 authorize-security-group-ingress --group-id sg-04e749bf892aa62e7 --protocol tcp --port 22 --cidr 0.0.0.0/24