1.0.17 • Published 3 years ago

@invisit/webpack-aws-lambda-auto-deploy-plugin v1.0.17

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

AWS Lambda AutoDeploy Plugin

This plugin will upload all built assets to s3

Install Instructions

$ yarn add -D @invisit/webpack-aws-lambda-auto-deploy-plugin

Note: This plugin needs NodeJS > 12+

Configuration

Example 1

In this case, the resulting .zip code bundle of the main entry, will be used to update the code for AWS lambda functions named main and event

Note: if your code archive is > 50mb you MUST use config.aws.storage.type = "s3" (all the options are in the typings)

/**
 * Simple config, deploy direct to lambda
 * @see `src/types.ts` 
 */
const config:AWSLambdaAutoDeployPluginConfig<"lambda"> = {
  aws: {
    config: {
      region: "us-east-1"
    },
    storage: {
      type: "lambda"
    }
  },
    /**
     * If you simply provider the function name and not
     * an array of 1..n mappings - your base file must be named `main`,
     * this is webpack's default output name.  When would mean the
     * configured call would look similar to `main.handler`
     */
    mappings: [      
      {
        entry: "main",
        fn: ["main", "event"] 
        
      }
    ]
}

Debugging

The debug (https://www.npmjs.com/package/debug) categories are lambda-autodeploy,lambda-webpack-autodeploy

# Either will activate
env DEBUG=lambda-autodeploy
env DEBUG=lambda*
1.0.17

3 years ago

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.9

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago