Amazon Neptune
User Guide (API Version 2017-11-29)

Using AWS CloudFormation to Create a Lambda Function to Use in Neptune

You can use an AWS CloudFormation template to create an AWS Lambda function that can access Neptune.

  1. To launch the Lambda function stack on the AWS CloudFormation console, choose one of the Launch Stack buttons in the following table.

    Region View View in Designer Launch
    US East (N. Virginia) View View in Designer
    US East (Ohio) View View in Designer
    US West (Oregon) View View in Designer
    Canada (Central) View View in Designer
    EU (Stockholm) View View in Designer
    EU (Ireland) View View in Designer
    EU (London) View View in Designer
    EU (Frankfurt) View View in Designer
    Middle East (Bahrain) View View in Designer
    Asia Pacific (Tokyo) View View in Designer
    Asia Pacific (Seoul) View View in Designer
    Asia Pacific (Singapore) View View in Designer
    Asia Pacific (Sydney) View View in Designer
    Asia Pacific (Mumbai) View View in Designer
    AWS GovCloud (US-West) View View in Designer
    AWS GovCloud (US-East) View View in Designer
  2. On the Select Template page, choose Next.

  3. On the Specify Details page, set the following options:

    1. Choose the Lambda runtime, depending on what language you want to use in your Lambda function. These AWS CloudFormation templates currently support the following languages:

      • Python 3.6 (maps to python36 in the Amazon S3 URL)

      • NodeJS 8.10 (maps to nodejs810 in the Amazon S3 URL)

      • Ruby 2.5 (maps to ruby25 in the Amazon S3 URL)

    2. Provide the appropriate Neptune cluster endpoint and port number.

    3. Provide the appropriate Neptune security group.

    4. Provide the appropriate Neptune subnet parameters.

  4. Choose Next.

  5. On the Options page, choose Next.

  6. On the Review page, select the first check box to acknowledge that AWS CloudFormation will create IAM resources.

    Then choose Create.

If you need to make your own changes to the Lambda runtime, you can download a generic one from an Amazon S3 location in your Region:

https://s3.AWS-region.amazonaws.com/aws-neptune-customer-samples-AWS-region/lambda/runtime-language/lambda_function.zip.

For example:

https://s3.us-west-2.amazonaws.com/aws-neptune-customer-samples-us-west-2/lambda/python36/lambda_function.zip