IT and Development
Amazon Lambda
16min
the amazon lambda modules allow you to watch, invoke, list, and retrieve the functions, layers, and layer versions in your amazon lambda account get started with amazon lambda prerequisites an amazon lambda account create an amazon lambda account at aws amazon com/signup amazon lambda docid\ n6ivm8bzqs1ydfjm bqh6 connect amazon lambda to make to connect your amazon lambda account to make you need to obtain the api key from your amazon lambda account and insert it in the create a connection dialog in the make module log in to your amazon lambda account click your account name > my security credentials > access keys (access key id and secret access key) > create new access key click show access key to display the access key id and secret access key copy and save the provided keys in a safe place go to make and open the amazon lambda module's create a connectio n dialog in the connection name field, enter a name for the connection in the aws key and aws secret key fields, enter the access key and secret access key values provided in step 3 above in the region field, select your region and click continue the connection has been established assign permissions in your lambda account for amazon lamda modules to work, you need to enable permissions in your aws account log in to your aws account in the search field, enter iam and in the features section, select the iam click create policy in the service section, choose lambda in the actions section, click expand all and select the following minimum permissions required to use the make lambda functions for more information on the actions for layer or other categories, see the lambda functions function watch functions triggers when a function is last updated field description connection establish a connection to your amazon lambda account limit set the maximum number of functions make should return during one make execution cycle list functions retrieves a list of all aws lambda functions field description connection establish a connection to your amazon lambda account limit set the maximum number of functions make should return during one make execution cycle get a function gets the information of an aws lambda function field description connection establish a connection to your amazon lambda account function name select the function whose details you want to retrieve invoke a function invoke an aws lambda function synchronously or asynchronously field description connection establish a connection to your amazon lambda account function name select the function name for which you want to invoke a function invocation type select the invoke type request response invoke the function synchronously event invoke the function asynchronously dry run validate parameter values and verify that the user or role has permission to invoke the function body enter the function details in json format which you want to provide to the lambda function as input for example, { "key" "value" } layer watch layer versions triggers when a new version of an aws lambda layer is created field description connection establish a connection to your amazon lambda account layer name select the layer name or amazon resource name whose version you want to watch enter a name between compatible runtime select the compatible runtime identifier for the layer for example, nodejs limit set the maximum number of layer versions make should return during one make execution cycle the maximum number of layers returned is 50 list layers retrieves a list of all aws lambda layers field description connection establish a connection to your amazon lambda account layer name select the layer name or amazon resource name whose version you want to watch enter a name between compatible runtime select the compatible runtime identifier for the layer for example, nodejs limit set the maximum number of layers make should return during one make execution cycle the maximum number of layers returned is 50 list layer versions retrieves a list of the versions of an aws lambda layer field description connection establish a connection to your amazon lambda account layer name select the layer name or amazon resource name whose version you want to watch compatible runtime select the compatible runtime identifier for the layer for example, nodejs limit set the maximum number of layers versions make should return during one make execution cycle the maximum number of layers returned is 50 get a layer version gets the information of a version of an aws lambda layer field description connection establish a connection to your amazon lambda account layer name select the layer name whose details you want to retrieve version select the layer version other make an api call performs an arbitrary authorized api call field description connection establish a connection to your amazon lambda account url enter a path relative to https //lambda {region} amazonaws com for example /2015 03 31/functions method select the http method you want to use get to retrieve information for an entry post to create a new entry put to update/replace an existing entry patch to make a partial entry update delete to delete an entry headers enter the desired request headers you don't have to add authorization headers; we already did that for you query string enter the request query string body enter the body content for your api call example of use list functions the following api call returns all functions from your amazon lambda account url /31 03 2015/functions method get matches of the search can be found in the module's output under bundle > body in our example, 5 functions were returned for the list of available endpoints, refer to the amazon lambda api documentation https //docs aws amazon com/lambda/latest/dg/api reference html