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 / aws-ssm-ec2-policy
Created December 6, 2020 09:33
policy for creating role for assm
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Principal": {"Service": "ec2.amazonaws.com"},
"Action": "sts:AssumeRole"
}
}
@ShubhamRasal
ShubhamRasal / create aws-system-manager role
Created December 6, 2020 09:29
command which creates new role
aws iam create-role --role-name aws-system-manager --assume-role-policy-document file://system-manager-role-policy.json --permissions-boundary "arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM" --tags "Key=name,Value=aws-system-manager"
@ShubhamRasal
ShubhamRasal / cloudfront url
Created October 18, 2020 17:33
cloudfront url
aws cloudfront list-distributions --query DistributionList.Items[*].[Id,DomainName,Origins.Items[0].Id]
@ShubhamRasal
ShubhamRasal / cloudfront create-invalidation
Created October 18, 2020 17:19
cloudfront create-invalidation
aws cloudfront create-invalidation --distribution-id EENNAX11SI81 --paths '/*'
@ShubhamRasal
ShubhamRasal / s3 cp svg
Last active October 18, 2020 17:09
s3 cp svg
$ aws s3 cp dist/angular-demo s3://shubham-demo-bucket --recursive --exclude "*" --include "*.svg" --no-guess-mime-type --content-type "image/svg+xml" --cache-control public,max-age=86400
@ShubhamRasal
ShubhamRasal / s3 cp
Last active October 18, 2020 17:03
s3 cp
aws s3 cp dist/angular-demo s3://shubham-demo-bucket --recursive --exclude "*.svg" --cache-control public,max-age=86400
@ShubhamRasal
ShubhamRasal / create-distribution
Created October 18, 2020 16:44
create-distribution
aws cloudfront create-distribution --distribution-config file://cf_config.json
{
"CallerReference": "cli-example",
"Aliases": {
"Quantity":0
},
"DefaultRootObject": "index.html",
"Origins": {
"Quantity": 1,
"Items": [
{
@ShubhamRasal
ShubhamRasal / create-distribution --generate
Last active October 18, 2020 16:16
create-distribution --generate
$ aws cloudfront create-distribution --generate-cli-skeleton > cf_config.json
@ShubhamRasal
ShubhamRasal / put-bucket-website
Created October 18, 2020 16:09
put-bucket-website
$ aws s3api put-bucket-website --bucket shubham-demo-bucket --website-configuration file://website_configuration.txt