Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.61 KB

readme.md

File metadata and controls

29 lines (23 loc) · 1.61 KB

Lambda Test

This project contains a lambda function that is used to query the NASA api for earth images. An example endpoint can be access via the link https://itzwj9h4pe.execute-api.us-east-1.amazonaws.com/default/lambda_test.

The endpoint will return json in the following format:
{
  "earth_engine_url":"image_url"
}

Installation Instructions

  1. Log into your aws console.
  2. Open the lambda service, by either selecting the link under the Compute header or typing the word lambda into the search bar.
  3. On the lambda page click on the Create function button in the top right hand corner.
  4. On the function setup page.
  5. Give the function a name i.e lambda_test.
  6. Runtime should be nodejs 8.10.
  7. Select create a new role and give the role an appropriate name like lambda_test.
  8. In order to create the role, select a policy to use as the template. In the example we use Simple microservice permissions which gives our new function access to the cloudwatch logs. N.B dynamoDB read / write access is also added, although not needed in our case.
  9. Finish the creation by selecting the Create function button.
  10. On the function page add an api gateway trigger from the Add triggers menu on the left of the page.

Note on roles

When creating a function for production use it is advised to pre-create the role for the function in IAM first, so that the permissions can be taylored to fit the functions requirements.