0

I want to write a unit test for the availability of AWS lambda functions. Is there any way to GET AWS lambdas list. I know using CMD we can get the list of AWS function. But I want any other way to get the lambda functions list. After research, I find out a rest API of all AWS services. But I didn't understand how to use them.

I found out AWS HTTP calls, links are attached https://docs.aws.amazon.com/general/latest/gr/rande.html.

1
  • The preferable method is to use an AWS SDK for your favourite language, which allows you to directly call AWS services. This is simpler than constructing a REST request. Have you tried this method? Commented Jul 29, 2019 at 7:29

1 Answer 1

1

Yes, you can do that using AWS Infrastructure REST API interface.

To do so,

  1. You first need to create a signature 4 authentication key for every call you make.
  2. Then you need to pass it via Authorization header in any REST request.
  3. Finally, call using ListFunctions API.

Call Example:

GET /2015-03-31/functions/?FunctionVersion=FunctionVersion&Marker=Marker&MasterRegion=MasterRegion&MaxItems=MaxItems HTTP/1.1

This gives you the list of Lambda functions deployed.

Hope it helps.

Sign up to request clarification or add additional context in comments.

2 Comments

Consider i want to write a unit test, which can compare all stages api gateway, and return if any API-gateway missing in any stage.
Beyond the scope of the question asked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.