Event gatway/ local development - Confused slightly - help




I just read the blog post on the event gateway & emulator for local dev… not sure Im fully understanding it all to be honest… and this leads me to question whether or not I should attempt a serverless design for an upcoming proj

Basically I am planning on building a bunch of serverless microservices fro aws- each one being a serverless framework app. Each microservice will use one or more of api gateway, lambda, dynamodb, SNS etc .Each microservice would own an fully control its own db or table. (db per microservice pattern) Its quite possible that there will be quite a few microservices, some of which will be ‘higher level’ microservices which will call others to achieve tasks (e.g. call two differnt crud microservices in a saga pattern).
This is all great but is there any chance in hell of ever getting such an arrangement to run locally ? could the event gateway and emulator really help me here ?


If your question is whether you can do integration testing of all microservies in your local machine, then the answer is probably not yet.


well, testing aside, just getting them all working together locally i.e. one service able to call another or push sns messages to be consumed by another etc


Yeah I don’t think it’s possible to set up a full microservices environment in your local pc (yet).


It really depends how “local” you want… in my Lambda code, I try to have as much encapsulation of business logic as possible and write “unit tests” around those. I say unit because the simplest thing is for them to still connect to AWS and use the real services. Now, depending on the service, you could mock it out or, in the case of database, use a local database. I know there’s mock s3, but i haven’t used it.
But the essence is you can do a lot of development locally without the iteration of uploading/deploying the lambda code.
OTOH, if by “local” you might mean “local to an EC2 instance”, you would want to check out Cloud9 - it looks very interesting as it gives the local feel of lambda dev and debug, although on an EC2 instance, FBOW. Again, I haven’t used it personally, but high on my list to checkout.