Skip to content

Instantly share code, notes, and snippets.

View rpstreef's full-sized avatar
🏠
Working from home

Rolf Streefkerk rpstreef

🏠
Working from home
View GitHub Profile
@rpstreef
rpstreef / static-site-cost.csv
Last active May 10, 2020 08:38
static-site-cost
Service Item Cost Subtotal
S3 5 GB storage $0.12 $0.12
5000 put/list requests $0.03 $0.15
100,000 Get and Other Requests $0.04 $0.19
Inter region bucket transfers of 1GB/month (depends on CodePipeline/Commit region availability) $0.02 $0.21
Route53 Hosted zone $0.50 $0.71
Standard queries: 1 million / month $0.40 $1.11
CodePipeLine 1 Free pipeline per month $0.00 $1.11
CodeCommit First 5 users free with 50GB storage and 10,000 git requests/month $0.00 $1.11
Lambda Memory: 256Mb you get 1,600,000 seconds of compute time for free $0.00 $1.11
@rpstreef
rpstreef / gist-codepipeline.yaml
Last active May 10, 2020 08:05
cloudformation-static-site-codepipeline
# Fetch code from Master branch, execute Lambda function to generate, compress and deploy static site.
CodePipeline:
Type: "AWS::CodePipeline::Pipeline"
Properties:
Name: !Sub "${DomainName}-codepipeline"
ArtifactStore:
Type: S3
Location: !Ref ExistingCodePipelineBucket
RestartExecutionOnUpdate: false
RoleArn: !Sub "arn:aws:iam::${AWS::AccountId}:role/${CodePipelineRole}"
@rpstreef
rpstreef / keybase.md
Created April 29, 2019 02:25
Keybase link to Github

Keybase proof

I hereby claim:

  • I am rpstreef on github.
  • I am rpstreef (https://keybase.io/rpstreef) on keybase.
  • I have a public key ASAtrq2ZV2USPkcBHPrvy44-ETWim32I7iwETT82QQuZVwo

To claim this, I am signing this object:

@rpstreef
rpstreef / gist:b17cac9ef0e09e7f6a6bbe5407c7488c
Last active September 15, 2017 06:26
S3 bucket policy for http referrer
{
"Version": "2008-10-17",
"Id": "http referer policy",
"Statement": [
{
"Sid": "Allow get requests from YOUR.URL",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR.URL/*",