DEV Community

Discussion on: Developing locally an aws lambda

Collapse
 
yomero243 profile image
Gabriel Cerdio

This is a fantastic and timely read. I literally just wrote a whole post about my "war story" trying to get a backend running, and it perfectly mirrors the problems you're solving here.

I went down the rabbit hole of trying to configure AWS RDS directly and got tangled in VPCs and security groups, then tried to wrangle a local Postgres instance with Docker and fought with container networking. It felt like I was building a rocket ship just to go to the corner store.

Your approach to local Lambda development hits on the core issue: the need for a rapid, low-friction development loop without getting lost in configuration hell.

My question is: How do you approach integrating other AWS services that the Lambda might depend on in this local environment?

Collapse
 
pcmagas profile image
Dimitrios Desyllas • Edited

Localstack allows basic AWS services though there's a catch some of them are free (lambda,s3,SQS for sure) but some need paid licence, you can use these as well but may need to provide endpoint url.

Some of licence-needing services can be replaced with custom implementation for example cloudfront can be simulated with go or python webserver fetching from s3.

Db's can be launches seperately in a seperate container. Networking can be easy using docker-compose.yml each service name is also the domain needs to be called upon from other containers.