Test your Lambda function with Postman.
- What is lambda function...?
AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources for you. These events may include changes in state or an update, such as a user placing an item in a shopping cart on an ecommerce website.
2. What is Postman...?
Postman is an API (application programming interface) development tool which helps to build, test and modify APIs. Almost any functionality that could be needed by any developer is encapsulated in this tool. It is used by over 5 million developers every month to make their API development easy and simple.
3. How can I test my lambda function in postman...? then follow bellow steps
A. Login to your AWS account
B. In search box search for lambda and click on it.
C. Create a test function.
D. Now create a new function name as you want, select an option from scratch and select Node.js 18 or any language you know.
E. Now, Create Function
F. For checking purpose you can create a test event in lambda and test the function and after that go to on “Configuration Tab”.
G. Then click on “Function URL”.
H. Click on create function URL.
I. For access Publicly you want to choose security a None and hit save.
J. Now copy the function URL.
K. Now open postman and paste the function URL you will see output form lambda.
4. Like that way you can test your lambda function in postman.
5. Once your testing done don’t forgot to delete the function