Using a EC2/ECS/BeanStalk – based solution is like having a dinner in a single restaurant.
You eat the appetiser, the main dish and then leave = You build your web app and deploy it in a friendly container.
But if you use a lambda-based solution,
|Appetiser in a restaurant A||Put AWS Gateway in front of Lambda|
|Main dish in restaurant B||Build Lambda|
|I want to go to restaurant C to have middle-east style appetiser||No. You can only choose rest gateway or websocket gateway, no server-side-event|
|I want takeaway to eat at home||Yes, you can run Lambda with a mocking gateway locally|
But if it’s websocket gateway, our mock is not ready yet.
|I’m sick of this. I want to quit the dining plan||Sorry, your websocket code is locked-in with our protocol.|