npm

npm’s 2019 JavaScript ecosystem survey analysis is now available!Get your copy here »

aws-sam-helper-commands

0.1.2 • Public • Published

aws-sam-helper-commands

A CLI tool to make certain common AWS SAM commands easier to use

oclif Version Downloads/week License

Commands

Deploy

Deploys a SAM stack to AWS using the stack definition in stack-config.json.

To use, first create a stack-config.json file in the root of your repository, e.g.:

{
  "namespace": "Services",
  "service": "FeedApi",
  "name": "feed-api",
  "capabilities": ["CAPABILITY_IAM"],
  "stages": {
    "dev": {
      "profile": "dev",
      "regions": {
        "eu-west-2": {
          "bucket": "solve-dev-source-code-eu-west-2"
        }
      }
    }
  },
  "secrets": {
    "FeatureFlagService": {
      "token": "api-1234",
      "projectKey": "app"
    }
  }
}

Note As you can see above, this file may contain secrets. For that reason, make sure to add stack-config.json to your .gitignore file to avoid publishing the file to a remote repo.

Then, to deploy, run deploy and pass in the stage name and the region to deploy to:

$ npx sam-helper deploy --stage dev --region eu-west-2

The above command will deploy a stack named feed-api-dev and will make sure the /Services/FeedApi/FeatureFlagService secret exists, if not it will be created.

You can skip running sam build by passing the skip-build flag:

$ npx sam-helper deploy --stage dev --region eu-west-2 --skip-build

Keywords

install

npm i aws-sam-helper-commands

Downloadsweekly downloads

37

version

0.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability