Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Importance of API Gateway in Serverless Architecture.

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What to know more about the importance of having an API Gateway when you are running serverless architecture, is a requirement to manage the functions you have, it is a pattern, best practice or we are allowed to not have one in our system.
What are other ways or organize or even orchestrate our service layer running AWS Lambda?

How we can manage the inventory for our existing functions in AWS there are preexisting tools or just amazon console?
 
Author
Posts: 11
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Mauricio Mena wrote:What to know more about the importance of having an API Gateway when you are running serverless architecture, is a requirement to manage the functions you have, it is a pattern, best practice or we are allowed to not have one in our system.
What are other ways or organize or even orchestrate our service layer running AWS Lambda?

How we can manage the inventory for our existing functions in AWS there are preexisting tools or just amazon console?



Hi Mauricio,

lots of very good questions here!

You can call Lambda functions directly via the AWS API / SDKs. There are SDKs for a lot of different programming platforms, including Java, Python, JavaScript (in the browser and Node.js), PHP, iOS, Android, etc.

If you want to decouple the client application (for example a native mobile app, or a single-page JavaScript app running in the browser) from the serverless back end, then the API Gateway is a very good way to do that, so that you don't need to use AWS API / SDKs in the client app.

Another useful use case is when you have a legacy back end that you want to migrate (completely or partially) to serverless: in that case you can put the API Gateway in between and then move what you want to AWS Lambda one step at a time.

If you want to provide a standard Web API to your users, so that they can use your back end to create new applications, or integrate their applications with yours, then having an API Gateway is a must.

To orchestrate the execution of multiple Lambda functions, you can use the recently launched AWS Step Functions, using a JSON language to describe their relations:

https://aws.amazon.com/step-functions/
https://states-language.net/spec.html

However, my preferred approach is to favour choreography to (strict) orchestration, so using triggers to execute Lambda functions in response to events is what I'd try to do first.

To manage Lambda functions, their life cycle, or just get a list/inventory of them, you can use again the AWS API / SDKs, or even simpler the AWS CLI. With AWS everything is programmable.

For example, using the AWS CLI to get a list of Lambda functions is as easy as running this command:



The output of the previous command is JSON or (if you prefer) a more human-readable format.

Let me know if this helps!

Best,
Danilo.
 
Mauricio Mena
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
+1 I like the scenarios in which you recommend the use of an API gateway, indeed that is a great use case suggestion, thanks for clarifying when to use it. And for pointing me to the step functions which I would like to check in a near future. Thanks.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic