Gotchas with static sites on S3 via CloudFront

There’s a ton of posts already on how to set up static sites hosted on S3 via CloudFront. This isn’t going to be one of them. What I want to discuss is some weirdness that I encountered with setting up this blog. For the purpose of this post we’re going to assume that you are going to create a hypothetical static site: https://example.com If you host a static site on hardware, or a VPS (be it an EC2 instance or a DigitalOcean Droplet) you’ll most likely do this with one of the various available web servers, like nginx or apache, and use a service like Let’s Encrypt to create the TLS certificate....

Simple HTTPS server in python

Starting a HTTP server in python to serve files from a directory is a reasonably well-known one-liner. In python 2.x it is: python -m SimpleHTTPServer 8080 In python 3.x it is: python -m http.server 8080 But how do you something similar for HTTPS? Here’s a solution, which unfortunately is larger than one line: #!/usr/bin/python import BaseHTTPServer, SimpleHTTPServer import ssl httpd = BaseHTTPServer.HTTPServer(('0.0.0.0', 8443), SimpleHTTPServer.SimpleHTTPRequestHandler) httpd.socket = ssl.wrap_socket(httpd.socket, certfile='./certs_and_key.pem', server_side=True) httpd.serve_forever() Save that as an executable file, combine your PEM cert chain and key into a single file, and off you go!...

S3DropBox 1.2 is now released

I love feedback ... including bugs (thanks Cam). The S3DropBox will now only permit the creation of a bucket when Amazon S3 returns a HTTP 404 status code in response to a HTTP HEAD request for the bucket prior to creation. The new version can now be downloaded from http://code.google.com/p/s3dropbox/....

S3DropBox 1.1 has been released

This release now permits the S3DropBox to be used in corporate environments (ie. behind authenticated proxies), including being able to handle NTLM authentication with proxies. HTTPS support has been enabled, although HTTP is still used by default. Check out the new release here....