Skip to content

ljwboschker/serverless-awscredentials-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Serverless AWS Credentials plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published