Page 2 of 4
Next review your settings and Create function:
which gets us all set up for our very first test:
The test results in our very first error.This is where the (logs) button proves handy:
Don't pay any particular attention to the error, we're going to figure out what's wrong later on.
Step 2 - The API gateway
That we've creayed our function won't matter much if there's no way to call it, so we are going to do just that through the use of another AWS component, the API Gateway. At this point, it's important to note that the Gateway IS the central point which, when appropriately configured, gives access to the whole range of available AWS services;in other words: In Amazon API Gateway, an API refers to a collection of resources and methods that can be invoked through HTTPS endpoints.
So let's create a new API, name it LambdaMicroServiceHelloWorldNodeJS and describe it as echoes back the first received value:
We won't proceed any further into the API's lair but instead we once more get back to our helloWorldNodeJs function's dashboard, and choose Triggers->Add Trigger from the underlying menu.
At the final screen pick the LambdaMicroServiceHelloWorldNodeJS API that we created one step back, in order to hook the API up the function so that when calling it from an outside HTTP endpoint it delegates that call to our backend function.
As far as the Security list of options goes, we'll start with the simple non-authenticated Open call, hence the Your API endpoint will be publicly available and can be invoked by all users warning.
All this hooking up had one goal in mind, to create a trigger which assumes the form of a URL in
https://bwxuad56tl.execute-api.eu-west-1.amazonaws.com/prod/helloWorldNodeJs , our API's HTTP representation or public interface that will act as the event generator front-end to our function.