Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load credential when local invocation with docker #7375

Merged

Conversation

frozenbonito
Copy link
Contributor

@frozenbonito frozenbonito commented Feb 23, 2020

What did you implement

Closes #7343

How can we verify it

  1. create SSM paramter named test in us-east-1 region

  2. create serverless.yml

service: sls-test

provider:
  name: aws
  runtime: nodejs12.x

functions:
  hello:
    handler: handler.hello
  1. create handler.js
"use strict";

const AWS = require("aws-sdk");

module.exports.hello = async event => {
  const ssm = new AWS.SSM();
  console.log(await ssm.getParameter({ Name: "test" }).promise());
};
  1. run sls invoke local -f hello --docker

Todos

Useful Scripts
  • npm run test:ci --> Run all validation checks on proposed changes
  • npm run lint:updated --> Lint all the updated files
  • npm run lint:fix --> Automatically fix lint problems (if possible)
  • npm run prettier-check:updated --> Check if updated files adhere to Prettier config
  • npm run prettify:updated --> Prettify all the updated files
  • Write and run all tests
  • Write documentation
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@frozenbonito frozenbonito marked this pull request as ready for review February 23, 2020 06:45
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @frozenbonito looks great!

@medikoo medikoo merged commit 90b3a8f into serverless:master Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Load local credential config when invoke local --docker
2 participants