Using Amazon CloudFormation to Create a Lambda Function to Use in Neptune - Amazon Neptune
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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

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

  1. To launch the Lambda function stack on the Amazon 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 (N. California) View View in Designer
    US West (Oregon) View View in Designer
    Canada (Central) View View in Designer
    South America (São Paulo) View View in Designer
    Europe (Stockholm) View View in Designer
    Europe (Ireland) View View in Designer
    Europe (London) View View in Designer
    Europe (Paris) View View in Designer
    Europe (Frankfurt) View View in Designer
    Middle East (Bahrain) View View in Designer
    Middle East (UAE) View View in Designer
    Israel (Tel Aviv) View View in Designer
    Africa (Cape Town) View View in Designer
    Asia Pacific (Hong Kong) 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
    China (Beijing) View View in Designer
    China (Ningxia) View View in Designer
    Amazon GovCloud (US-West) View View in Designer
    Amazon 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 Amazon CloudFormation templates currently support the following languages:

      • Python 3.9 (maps to python39 in the Amazon S3 URL)

      • NodeJS 18 (maps to nodejs18x 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 Amazon 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.Amazon region.amazonaws.com/aws-neptune-customer-samples-Amazon 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