Home › Forums › AWS › AWS Certified Solutions Architect Associate › Deploying API in AWS using Lambda › Reply To: Deploying API in AWS using Lambda
-
Hello muhammad-r,
Thanks for your feedback.
Yes, you can dockerize a RESTful web service using ECS or even host it on EC2. However, the main concern for the scenario is cost-efficiency and scalability. Using ECS and EC2 requires capacity planning ahead of time to support the load. Among the given choices, API Gateway and AWS Lambda is the most suitable answer.
Lambda’s cold start time isn’t much of a concern for an application with high traffic because subsequent requests can re-use the container where previous requests have run. It takes about 30-45 minutes before a function goes into “sleep mode” after execution. It means that within that duration, the probability where a container is invoked again before it can even begin to shut down is high.
Let me know if that answers your question.
Regards,
Carlo
- This reply was modified 3 years, 9 months ago by Carlo-TutorialsDojo.