Skip to content

GregMSThompson/lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published