dm-driver-lambda

Data Migration driver to update lambda properties like environment variables

Usage no npm install needed!

<script type="module">
  import dmDriverLambda from 'https://cdn.skypack.dev/dm-driver-lambda';
</script>

README

Welcome to dm-driver-lambda 👋

Build Status NPM Package Maintainability Documentation Downloads/week lerna

A Data Migration driver to update lambda properties like environment variables.

Configuration

Parameters

The Lambda driver accepts the following parameters as part of its configuration:

Name Type Required Description
region string Yes The AWS Region where this table exists
FunctionName string Yes The name (or ARN) of the function to modify
profile string No Name of the AWS profile to use
accessKeyId string No AWS Credentials, if not provided data-migration will use the default AWS configuration
secretAccessKey string No
endpoint string No The http endpoint to connect to, useful when using something like localstack

Sample Configuration

export default {
  defaultStage: "prod",
  migrationDirectory: "migrations",
  stages: {
    prod: {
      users: {
        driver: require("dm-driver-lambda"),
        params: {
          region: "us-east-1",
          FunctionName: {
            // Use this processor to get values from CloudFormation
            processor: require("dm-processor-cf"),
            params: {
              stack: "some-stack-name",
              output: "SomeOutputName",
              region: "us-east-1",
            },
          },
        },
      },
    },
  },
} as Configuration;