Lambda@Edge and AWS EC2 latency comparison

Viewed 978

Currently, I have built an application on EC2 instances in multiple regions. The problems are when one instance per region need to patch/maintain, and we need more effort to handle if something fails.

I decide to use Lambda@Edge instead of EC2 and question is:

  1. Lambda@Edge is better than these EC2 instances?
  2. Need to make sure that Lambda@Edge would be reachable with the same latency or better than EC2. Have any official docs to prove this?

Thanks

1 Answers

If the issue you're facing is one of patching and maintenance of instances then yes, Lambda or Lambda@Edge will absolutely remove that issue.

If the issue is latency and you want to keep your instances you could create an Amazon Cloudfront Distribution that would go in front of your instances and serve cached content to your users - that might be the easiest way to start out.

Lambda@Edge would have the same latency as Cloudfront. Lambda functions that are deployed to CloudFront edge locations have a couple of limitations.

Related