Invoking AWS Lambda - API Gateway vs direct invocation

Viewed 3176

We are a team of 10 developers, trying to move process intensive jobs from our Rails application on Heroku to AWS Lambda (Java). We are blocked on deciding whether to invoke lambda functions via API gateway or via AWS Ruby SDK directly. Depending on the use case, we might have to invoke lambda asynchronously as well. Our payload is very small (< 1-2 KB). We are considering direct invocation primarily to maximise execution time. We are looking for pointers here:

  1. Is it easy(& faster) for API gateway to verify the IAM role required to invoke lambda ?
  2. Is there any significant reduction in latency b/w lambda and API gateway?
2 Answers
Related