The following is a soup to nuts walkthrough of how to set up and deploy a Django application, powered by Python 3, and PostgreSQL to Amazon Web Services (AWS) all while remaining sane.
How to Configure SSL for Amazon S3 bucket
Yes, SSL works out of the box but you can’t use a custom domain name, you need to use the
s3.amazonaws.com/bucket/key
domain name. The reason is that to use a custom CNAME would require a custom SSL Certificate to be registered and served up by Amazon S3 and they currently don’t allow you to do this.You should be able to access your files via SSL Like this:
If you want to use a pretty domain name from SSL over S3 I’m afraid you’re out of luck. Its just something we have to live with for the time being unfortunately.
Here’s a thread on Amazon Support forums discussing custom SSL Certificates:https://forums.aws.amazon.com/thread.jspa?threadID=60502
Conditionally Load Javascript Based on Media Query
Best practice for a long time has been to load your javascript at the end of the document to improve website performance, however in todays world of mobile devices we need an even faster solution.
@media all and (max-width: 900px) { // styles } if (document.documentElement.clientWidth < 900) { // scripts }