Connecting services with ECS Service Connect

Once you’ve built all of your microservices and are ready to deploy them to AWS ECS (other container orchestration tools are available… but not in this post), you need a way to connect them together. Historically you could use an elastic or application load balancer that would act as a front door to all of your applications – every time one service needed to talk to another it would do so through the load balancer. This is known as centralised load balancing. While effective, you can very quickly hit limitations such as exhausting the number of target groups (which compounds...

Continue reading...

Managing dependencies between apps when using AWS ECS Service Connect

Reproduce the scenario with my CDK example: https://github.com/foyst/ecs-service-connect-dependencies I’ve been working on a project recently that made use of AWS Elastic Container Service (ECS) Service Connect. Since I last used ECS they’ve introduced capabilities around service discovery which aim to solve challenges orchestrating services in distributed and fluid environments. ECS Service Connect is different to Service Discovery, in that it still uses AWS Cloud Map under the hood as a service catalogue, but uses API based discovery rather than DNS. This means it’s quicker for it to detect outages to applications and update service entries as necessary. It’s kinda like...

Continue reading...

Challenges working with and tuning AWS Amplify and AppSync with Flutter

Whilst building my tutorial in Cross-platform mobile app prototyping with Flutter and AWS Amplify, I encountered a few issues whilst deploying an API capable of storing user details. My requirements were fairly basic – store a few simple details about a user (name, location and favourite programming language), and query this information based on the logged in user of my app. In Amplify, you can very quickly build and deploy and API with a single command: The following may feel like I’m taking you on a wild goose chase, but I figure if I shared the journey and pain encountered along...

Continue reading...

Cross-platform mobile app prototyping with Flutter and AWS Amplify

I’m going to show you how you can use Flutter and AWS Amplify to quickly go from nothing to a working cross-platform mobile application with authentication and backend infrastructure. What would usually take a small dev team a week or so to setup can be achieved in a fraction of the time using this toolkit. If you follow along with this tutorial, it should take you no more than an hour… well… it took me several hours fighting with various issues, but hopefully I’ve documented them well enough so you shouldn’t hit them! Here’s the finished product. If you want...

Continue reading...

Building an E-Ink Planner

Update – 06/12/2022: I’ve included a section at the top to track “Daily Habits”. I find this useful to keep on top of those daily tasks that aim to improve my skills. I use Todoist for this list as well (with recurring tasks), but managed using a separate project and an “Overdue” filter to only show the ones not completed for that day. Intro I wanted a high-tech alternative to the age old post-it note to do list, but I wanted something that’s energy efficient, clear and easy on the eyes. I also wanted something that was standalone from my monitors as...

Continue reading...

Stop Failing and start Experimenting

I wanna talk to you about failing. Nowadays we’re taught that failing is a good thing, to fail fast and to learn from our mistakes. But how are we supposed to do that when we’re conditioned to see failing as bad from a very young age? Now I’m not suggesting that we avoid the entire notion of failure because it’s inevitable in life, and building resilience is a positive thing. But if all we ever talk about is embracing failure, failing fast and learning from mistakes… well that’s gonna get pretty demoralising! I’d like to share with you a different...

Continue reading...

Fast Spring Boot AWS Lambdas with GraalVM

In my previous blog post I documented how to take a Java Spring Boot application and convert it into a serverless function, which can be run in the likes of AWS Lambda. Anyone who’s done this before knows that cold starts are a big downside – Java and Spring Boot are not known for their speedy startup times, and a typical full fat Spring Boot converted lambda can take anything from 10 to 90 seconds depending on how much memory and cpu you allocate it. This may lead you over-provision them to compensate for the cold starts, but that’s a...

Continue reading...

From Spring Boot Microservices to Lambda functions – a journey

You may be one of many organisations (or an engineer in one) that operates Java microservices in the cloud with a desire to move towards a serverless architecture, but are unable to justify the steep migration path (e.g. decomposing your services into functions, rewriting in a more suitable language etc.) from those microservices to the likes of AWS Lambda. But fear not! Because with the help of spring-cloud-function you can repurpose your existing microservices into serverless functions in a gradual and controlled manner, with minimal effort or interruption of service. In this article I’ll explain how you can achieve this...

Continue reading...

My expedition from AWS to GCP (with Terraform)

Follow along with my GitHub repo for this blog: https://github.com/foyst/gcp-terraform-quickstart/ TL;DR – Here’s the headline differences that might be useful for those adopting GCP from an AWS background: Difference #1 In AWS, projects or systems are separated using AWS Accounts, where as GCP has the built-in concept of “Projects”. Difference #2 – The GCP Console is always at global level – no need to switch between regions. Difference #3 – auto_create_subnetworks = false, otherwise you have a subnet created for every availability zone by default. Difference #4 – You have to enable services before you can use them. Difference #5...

Continue reading...