Create an AWS Lambda function with Python3 and integrate with S3? Simple if you know how (though getting there is a bitch, I bet Amazon does this on purpose as a way to trick developers in on their certification-ride). I found how, copy-paste below.

Last week, I held an AWS workshop on how to host a (dummy) React app there, in S3 and with CloudFront. If you’d like to learn what I taught the others, a github repo is available at https://github.com/tomfa/aws-frontend-workshop.

If you haven’t already, try to add the Beanstalk application in your environment using only the eb command (see own post). What we do there, is making sure you have the correct setup for vpc and subnets. Once you’ve made sure that is OK, you can come here and try creating the application using terraform. That has…

Beanstalk is quite nice. And the awsebcli looks nice too, along with its documentation and the example guide at pypi. You can deploy straight from a local git repo in one command. You can have each branch go to a separate Beanstalk environments. So I tested it, and here are my notes: Edit: If you want to learn this,…

“By using Elastic Beanstalk, developers can focus on developing their application and are freed from deployment-oriented tasks, such as provisioning servers, setting up load balancing, or managing scaling.” – AWS. Here’s a few general notes on what AWS Elastic Beanstalk (or just Beanstalk) is, pricing etc.

I have a Java app that runs on an regular Linux (EC2) instance, and logs to some folder on that machine. What I want is for Slack to be notified if any error occurs in the logs. This is possible through CloudWatch in almost all regions. Let me show you how!

Case: I have some frontend app that consists of static files, e.g. a React app packed with WebPack. I want to deploy it to S3, with CloudFront in front of it. (Optional) I also want index.html to be rendered when other paths are requested (such as /food/cake-is-best), and for the site to return 200 status instead of 404.

CodePipeline is a specification of how your code runs out to production. What it does is connecting source code with a builder (optional) and a deployment platform. For example, you can set it to trigger a deploy to AWS Beanstalk when a Github repository is updated. And with its 1$ / month, it’s practically free to use. However, CodePipeline is…

Load balancer + auto scaling EC2 instances in different Availability Zones is pretty fucking awesome. It allows you to auto scale = pay for what you need. It gives you uptime even if a whole availability zone goes offline. You can have SSL-termination in the Load Balancer. It’s nice. Use it. A set of servers in a…

Here’s a simple step by step guide on how to create a s3 bucket, with an attached cloudfront and a user with write access. This is typically what you want if you need quick hosting for static files for you website. This is made in contrast to the terraform guide, which does the same, but using different tools If…

Case: You want efficient collectstatic and serving of files You want static files and media files to be hosted on an AWS S3 bucket. (optional) You have too many files for “normal” collectstatic to be efficient. (optional) You have a non-US S3 bucket. (optional) You use Heroku Disclaimer: Have not tested with python 2.7, can’t…

Edit: I was going to make the s3 bucket with cloudfront, but Terraform has no native support for it, though it looks like it’s coming soon. I’ll probably make a followup later. Edit 2: I made a followup on how to do it with Cloudfront A concrete, developer friendly guide on how to create a proper s3 bucket with…