Blog: Classier Twitter threads - Tag AWS

Analyzing AWS Costs with SQL

One of the things nobody loves about AWS is billing. Mainly because the more your application is cloud-native, the more unpredictable your bill will become. All that autoscaling and serverless saves you a lot of money, but if there is a massive spike in your app usage, there will also be a spike in your AWS bill. That’s usually a good thing because if you’ve done it right, the opposite is also true, and low traffic means lower costs.

Either way, the more you use AWS, the less useful the default monthly bill becomes. Maybe you have several environments (production, staging, dev, …), or perhaps you have multiple applications. The aggregated view simply becomes a problem, and you start to wonder how much each of those applications costs separately. Then you discover AWS cost allocation tags and cost explorer that can group by service or tags, which also lasts a while before you become unhappy again.

The problem is always the same - the data is not granular enough. Can we somehow get more granular data?

Continue reading ...

Importing your existing AWS Route53 records into Terraform

When you start with a cloud, you rarely get everything just right on the first try. Most projects begin with IaC after they’ve already been using AWS for some time - which means you’ll have a bunch of resources that have been created using the AWS Console, and they have to be imported into Terraform.

Unfortunately, Route53 is extra tricky because you can easily create a lot of resources. It can quickly become unbearable to manually import because, as with any Terraform resource, you have to first write the definition, and then you run the import command over and over for each resource individually… Or do you?

Continue reading ...

Travis-CI: artifacts on Amazon S3

Protože jsme byli líní si nastavovat Jenkinse, tak používáme Travis-CI pro rohlík a dneska jsem zjistil, že Travis vám vypíše maximálně ~10k řádků výstupu :)


Co s tím? No, bude potřeba ten “bordel” z buildu nahrát někam jinam.

Když náhodou narazíte na tu správnou kombinaci slov, tak se vám poštěstí najít dva články. Bohužel jsou oba dva úplně blbě a jenom s nimi budete ztrácet čas. Já jsem se po pár hodinách dopracoval k následujícímu řešení.

Continue reading ...