rand(Ø)

> beautiful code & photos

about <

Posts tagged: aws

Cross-region & cross-account AWS resources Terraform planning

Hey, it's been a while, right?

Lately, I'm leading some big changes in our infrastrure since I'm wrapping a Blue/Green deployment into another one. Uh?

Long story short: our product runs on AWS ECS Docker containers, and because we have one sub-domain per app instance, we use Apache wildcard sub-domains. Meaning a single container handles traffic from many clients/instances. We already have a Blue/Green deployment process in place but at the Docker container level, not at the client level. The idea is to entirely duplicate the whole stack (with all its flaws) and a sub-domain pointing to

> Continue Reading

AWS ECS: seamlessly handle app versioning

Our latest project at work involved another Go API and in the effort of easing our debugging and issue tracking I'm used to inject the app version into the logs.
It helps a lot monitoring, especially when rolling out a new version (canary, 50% traffic deployment, etc.).

Preamble

Pre-2018, I hardcoded the version in an app constant which I would increment as part of my release process. It's easy, quick but the only issue is to not forget about it because you may lose versioning syncing over time.

Plus, considering this to be done before each new release, this adds

> Continue Reading

S3: List objects using filters

One thing that really sucks about the Amazon S3 command is not being able to efficiently list objects using the exclude and include filters.

I recently had a case when I needed to list GZip archives from one of our S3 buckets but only the ones ending by .gzip.

Since the ls command doesn't support filters (yet?), I found another way to get that listing: use the cp command, but in dry-run mode:

#!/bin/bash
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

# Very important: DO NOT remove the --dryrun flag!
aws s3 cp s3://bucket-name . --recursive --no-progress
> Continue Reading