Wondering what’s next for npm?Check out our public roadmap! »

    @invisit/webpack-aws-lambda-auto-deploy-plugin
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.14 • Public • Published

    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*
    

    Install

    npm i @invisit/webpack-aws-lambda-auto-deploy-plugin

    DownloadsWeekly Downloads

    67

    Version

    1.0.14

    License

    MIT

    Unpacked Size

    740 kB

    Total Files

    284

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar