Determine Elastic Beanstalk Application Version Number Via CLI

 — 

To read the application version that is deployed to a certain Elastic Beanstalk environment, you can simply execute:

aws elasticbeanstalk describe-environments --environment-names ENVIRONMENT-NAME --query "Environments[0].VersionLabel" --output text

I use this to determine if a new version has made it to a given stack. I poll for that, then ...

Category: aws Tags:

Log to Loggly From Python With LogglyHandler

 — 

When using Loggly with Python, I log with restapi-logging-handler's LogglyHandler. It's easy to configure, uses threads to compelte the logging asynchronously, and just works. There's more thorough documentation on the GitHub site, but basically you can pip install it:

pip install restapi-logging-handler

Then it's just a ...

Category: python Tags:

Elastic Beanstalk Workers are Cool

 — 

Elastic Beanstalk provides a really simple way to create queue-based workers. Their worker tier allows you to define a web interface that handles each event. Elastic Beanstalk handles the details of reading from the queue and posting the data to the worker, so all you have to do is hookup ...

Category: aws Tags:

AWS CLI Server-Side Encryption in S3 Buckets

 — 

I recall trying a couple of different times to check if an S3 bucket had server-side encryption enabled, as well as how to encrypt an already existing bucket that doesn't have encryption enabled. Obviously, if the data you're encrypting is sensitive, you'll want to invalidate the data ...

Category: aws Tags:

A Whole Lot of Nothing

 — 

I took a little bit of time away from computers and ended up in west Texas for some camping and exploring of desert towns. One of the most incredible things I experienced was a star party at McDonald Observatory in Fort Davis.

I expected a handful of people there, but ...

Category: travel Tags:

Deploy Secure Django Credentials to Elastic Beanstalk from S3

 — 

AWS Elastic Beanstalk makes it easy to get a simple application from development into a public web server. If you use a linked RDS instance for storage, the service even handles the population of the database credentials on your application instance by loading them in the environment. If you want ...

Category: django Tags:

Deploy to AWS OpsWorks from Jenkins

 — 

Jenkins has a great plugin for deploying Elastic Beanstalk apps, but nothing as slick to deploy to OpsWorks. But fear not. The AWS CLI makes it pretty easy once you extract your OpsWorks stack ID and app ID. Below is a simple script to deploy which requires:

  1. The AWS CLI ...
Category: django Tags:

Re-run Django Tests on Python Code Save

 — 

Pythonistas: JavaScript has us beat. Grunt and Gulp both have better support for watching file changes and automatically running your test suite. Python has done ok over the years with tools like tdaemon, rerun, and watchdog, each of which serves a solid purpose, but the tools are difficult to invoke ...

Category: django Tags:

Introducing django-makeconf, a settings-based Config File Generator

 — 

As I've been using Elastic Beanstalk more and more, I've been finding the need to alter my .ebextensions files per-environment. I may be using different credentials files in dev and QA, using different sets of AWS credentials (and S3 buckets), or just trying to get my environment name ...

Category: django Tags:

Sync Multiple AWS and Boto Credentials

 — 

If you work with multiple sets of AWS credentials and boto or boto-based tools like s3cat, you may have noticed that Boto doesn't use the same configuration as the AWS cli tools. The AWS CLI tools look at ~/.aws/config, and boto looks for ~/.aws/credentials. Also, the format ...

Category: aws Tags:

© Ethan McCreadie 2014

Powered by Pelican