Skip to content

Instantly share code, notes, and snippets.

View 1.CUR_Download.sh
#!/bin/bash
function do_help {
cat << _END
./cur dl <bucket_name> <report_path_including_month> <report_prefix> <optional_assume_role_profile>
_END
}
## INPUT Checking
if [[ $# < 3 ]]; then
@andyfase
andyfase / 1. Spot Fleet Docs.md
Last active Aug 26, 2017
Spot Fleet, Docs and code samples
View 1. Spot Fleet Docs.md

Spot Fleet / ECS Training Overview

Components

Spot & Spot Fleet

What is Spot

AWS Spot is a AWS service which provides EC2 capacity at significant discounts. Savings of upto 80-90% can be achieved (vs on Demand pricing) utilizing Spot.

View S3Blog-route53.json
{
"Comment": "string",
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "myblog.mydomain.com",
"Type": "CNAME",
"TTL": 300,
"ResourceRecords": [
View S3Blog-cloudfront.json
{
"CallerReference": "cf_my_blog",
"DefaultRootObject": "index.html",
"Origins": {
"Quantity": 1,
"Items": [
{
"Id": "myblog.s3.amazonaws.com",
"DomainName": "myblog.s3.amazonaws.com",
"S3OriginConfig": {
View S3Blog-s3bucketpolicy.json
{
"Version":"2012-10-17",
"Id":"AndyAWSBlogS3CloudFrontPolicy",
"Statement":[
{
"Sid":" Grant a CloudFront Origin Identity access to support access to the bucket",
"Effect":"Allow",
"Principal":{"CanonicalUser":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"},
"Action":["s3:GetObject","s3:ListBucket"],
"Resource":["arn:aws:s3:::myblog/*", "arn:aws:s3:::myblog"]
You can’t perform that action at this time.