JSPM

serverless-awscredentials-plugin

1.0.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 83
    • Score
      100M100P100Q88057F
    • License MIT

    Import AWS credentials from your credentials file as serverless environment variables

    Package Exports

    • serverless-awscredentials-plugin

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-awscredentials-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    serverless-awscredentials

    npm version](https://www.npmjs.com/package/serverless-awscredentials)

    This plugin will preload the AWS_REGION, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY variables into serverless, based on the configuration you created using aws configure.

    The AWS_REGION is loaded from the ~/.aws/config file. The access and secret access key are loaded from the ~/.aws/credentials file.

    You can use this if you need access to read AWS services from your Lambdas.

    Install and Setup

    > npm install --save-dev serverless-awscredentials-plugin

    Next, add the plugin to your serverless configuration:

    service: mine
    
    plugins:
        - serverless-awscredentials-plugin

    You can configure which profile to use:

    custom:
        awscredentials:
            profile: my-profile

    If not specified, the default profile will be used.

    Usage

    The variables are now loaded in serverless and can be accessed by any Lambda as environment variables.