Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

amazon web services - how to create/delete AWS lambda from rest-api?

I'm not familiar with AWS lambdas.

Does AWS provide swagger or anything similar to lambdas?

my use case doesn't require me to create rest endpoint to the lambdas. do I also need to play around with gateways as well?

  • I'm not looking for cli solutions: sam/aws-cli/serverless/...

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Everything in AWS uses the same public API that AWS provides. How that's implemented depends on the service. The official SDKs/CLIs use that same API and abstract the implementation details for you, so I'd recommend sticking to those.

If you want to build your own tool to talk to the AWS APIs or more specifically Lambda, you can have a look at the official developer guide, which includes an API-Reference.

More specifically you're going to need these two actions:

You should be aware, that you need to implement the Signature v4 process to sign your requests with your AWS credentials yourself in that case, which is non-trivial. This signing process is used to authenticate yourself to AWS or more specifically to Identity and Access Management.

The API-Reference doesn't directly list the API-endpoints, but you're going to have to use the one for lambda in the region you want to create/delete your functions in, e.g. https://lambda.eu-central-1.amazonaws.com, where eu-central-1 would be your region. For a full list of the service endpoints for Lambda take a look at this documentation.

I'd really recommend you stick to one of the official SDKs/CLIs - this will make your life much easier.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...