AWS ECS concepts.

According to Amazon, ECS or Elastic Container Service is “a highly scalable, fast, container management service that makes it easy to run, stop, and manage Docker containers on a cluster of Amazon EC2 instances”. In this post I will cover some of the main features of AWS ECS including clusters, tasks and services. Clusters Clusters … 

 

How to automate creating a Django super user

Setting up a Django super user may be a requirement in your test setup code. The commands used to create users are interactive by default and unfortunately do not allow you to pass in the user’s password as an argument or a flag on the command line. This is a security measure, but it isn’t … 

 

Changing deployment policies in AWS

In a previous article, I discussed four different deployment policies you can employ when deploying applications to AWS. Some of these methods include All at once, Rolling, Immutable and Blue/Green deployments. In that article I discussed the differences between these policies. In this post, I will show you how to set up Immutable and Blue/Green … 

 

Freeing up space used by docker containers.

When building or working with docker containers, you may get error messages like the one below relating to a lack of space: The error occurs because Docker objects accumulate over time and can eventually exhaust available storage. To resolve do the following: This will tell you how much space Docker objects are taking up in … 

 

Encryption using Python and AWS

In this post I’ll show you how to encrypt and decrypt strings using the AWS Encryption SDK and AWS KMS. Step 1: Install the AWS SDK for Python and the Encryption SDK You’ll need boto3 to create a Master Key programmatically and the aws-encryption-sdk for encrypting and decrypting data. Step 2: Add AWS credentials to … 

 

How to create an AWS Lambda layer

AWS Lambda is a serverless compute service that lets you run code without provisioning or managing servers. Using Lambda, you can create code that will only be run in response to an event. AWS supports lambda functions in many languages including Python. Writing a Python Lambda function is pretty straight forward if your code does … 

 

AWS: Deployment methods

This post discusses the most common deployment methods: all at once, rolling, immutable, and blue/green.

 

Setting up Django for Deployment: Nginx

This post explains how to install and setup nginx as a reverse proxy to gunicorn and web server to serve static files in Django.

 

Setting up Django for Deployment: Gunicorn

Web Servers like Apache or NGINX are great for handling HTTP requests. Unfortunately,they typically cannot communicate with Python applications directly. That is where gunicorn comes in.

Learn how to install, configure and run gunicorn with Django in this article.

 

Installing nginx on Linux

In this post, I show you two ways of installing and configuring nginx on Linux.