Photo by NeONBRAND on Unsplash

With AWS Lambda, you pay per invocation of your function. But it’s very much different if you give your Lambda 256M of memory or 3GB of memory.

Using the AWS pricing calculator (https://aws.amazon.com/lambda/pricing/), we can find out that the Lambda function running for 250ms with 256M memory will cost $1.24 per 1M of invocations. The same Lambda with 3GB of memory will cost $12.70 per 1M of requests. It makes a huge difference.

But it’s not as simple as that. Our Lambda’s execution time can be shorter if we provide more memory, or maybe it’ll be almost the same. …


Update (13/5/2021): Looks like AWS's introduced native support for cross-account Athena's queries. Take a look here

Imagine the world in which you have different AWS accounts for different purposes. There’s dev/staging/production AWS account for your shiny software. Also somewhere in the clouds, there’s AWS account used by the data team to prepare one source of truth about your universe (AWS Glue, S3 buckets, catalogues, Athena etc. etc.). Something like that:

Do you see that? Cool.

Now you’re adding a new feature to your software, but it requires to query the data from this huge data store. Peanuts! You modify your…


This story is about how to make your service reliable and cheap. It’s not going to be a simple thing but trust me it’s worth of your effort.

What does profiling mean?

Well, it depends on the context, but for me, it’s the process which allows to deeply understand how the service works under the hood, how it behaves when put under the pressure and what will happen when the pressure is relaxed.

So I hope that the next question just popped up…

Why do we profile?

To make our service cost-optimal, resilient and to gain knowledge about our solution.

Cost-optimal solution

  1. What resources do we need to run our…

You can use API Gateway in many ways. I would like to share with you one of my favourites usages. An Abstraction of a queue or event bus.

What are the benefits of such implementation?

  1. Service is not aware of messaging implementation.
  2. Service is not coupled with provider SDK.
  3. Service can reuse already implemented an HTTP client.
  4. Easy retry mechanism.
  5. Testing is so much easier. You can use Wiremock!

Implementation

You can try to set up such a configuration using this tutorial and AWS console so it will give you a better understanding of the approach. …


So you’re starting to work with Terraform and would like to store the state in S3 bucket. Sounds good but how are you going to create the S3 bucket? You don’t want to use AWS Console to do that — you decided to have IaC and having first step breaking the rule is awkward at least. You can find a few articles and ideas how to deal with that and here I would like to present approach I tried.

What are our goals?

  • No manual operations through AWS Console
  • All resources managed by Terraform (includes state file in S3 bucket)
Photo by Christian Bowen on Unsplash

Step 1 — configure Terraform

Let’s start with our…

Maciej Matecki

Tech Lead / Senior Software Engineer @ Zoopla

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store