$30 off During Our Annual Pro Sale. View Details »

An Introduction to Static Sites and AWS

An Introduction to Static Sites and AWS

This is a talk meant for new web developers which explains how to best deploy static websites using Amazon.

Specifically, I cover how to install and use the Amazon CLI tools to upload sites to Amazon S3 for fast, cheap hosting. I also cover how to use Amazon Cloudfront to speed sites up for everyone in the world.

Lastly, I also cover how to buy domains with DNSimple (the best registrar!)

Randall Degges

November 09, 2015

More Decks by Randall Degges

Other Decks in Programming


  1. An Introduction to Static Sites and AWS @rdegges

  2. I’m Randall Degges Developer Evangelist at Stormpath Python / Node

    / Go Hacker
  3. None
  4. What’s a Static Site? Server Show me the site! Ok,

    here’s some HTML.
  5. None
  6. What’s a Dynamic Site? Server Show m e the site!

    Ok, here’s some HTML. Node.js Hey, give me the website! Someone wants it! Ok dude! Here’s the website.
  7. None
  8. What Should I Do?

  9. FAST

  10. AS

  11. FUCK!

  12. Server Wow this site is so fast! I’m going to

    tell all my friends about it.
  13. VS

  14. Server Wow. This site is slow. I hate this website.

    I hate all websites. I hate the internet.
  15. • How to host static websites on Amazon S3. •

    How to make really REALLY fast websites with Amazon Cloudfront. • How to buy and manage domain names and DNS. • How to deploy real sites like a boss with DNS. • Whatever else ya wanna know =)
  16. Let’s Build a Resume Site

  17. http://themeforest.net

  18. What is AWS?

  19. What is S3?

  20. SO FAST AND CHEAP *3 cents per GB

  21. www.mywebsite.com

  22. Set it Up aws.amazon.com

  23. https://github.com/rdegges/resume.rdegges.com OR Make your own Git repository and add some

  24. < IAM User Creation Demo >

  25. Setup the AWS CLI Tool $ brew install python $

    sudo pip install awscli $ aws configure default region: us-east-1
  26. Create an S3 Bucket

  27. $ aws s3 mb s3://resume.rdegges.com $ aws s3 website s3://resume.rdegges.com

    --index-document index.html $ aws s3 sync . s3://resume.rdegges.com --exclude '.git/*' --exclude 'Makefile' --acl public-read --delete
  28. None
  29. None
  30. Cool site. Lame URL.

  31. DNS! http://domai.nr

  32. DNSimple

  33. https://dnsimple.com/r/d9a8f0b92dfb78 Make an Account

  34. Buy a Domain

  35. Setup DNS to Point to S3

  36. Cool site! Cool URL! Not as fast as Google tho

  37. What’s a CDN? www.mywebsite.com (Website is in China)

  38. In Depth www.mywebsite.com I’m in Los Angeles! DNS California Ireland

    China UK Hmm. This guy is in California. Let’s send him to the California servers!
  39. Introducing Cloudfront!

  40. California Ireland China UK etc

  41. < Setup Cloudfront Distribution >

  42. Cool site! Cool URL! So fast!

  43. Automating Deployments S3_BUCKET=s3://resume.rdegges.com/ all: aws s3 sync . $(S3_BUCKET) --exclude

    '.git/*' --exclude 'Makefile' --acl public-read --delete
  44. None
  45. BONUS: SSL www.mywebsite.com

  46. You’re awesome. @rdegges