Commands to start a new AWS serverless repo and add nodejs template. This will generate serverless.yml and an initial lambda
npm install -g serverless serverless create --template aws-nodejs
create package-lock.json
npm init -y
create package.json
npm init
An AWS::Serverless::Api resource need not be explicitly added to a AWS Serverless Application Definition template. A resource of this type is implicitly created from the union of Api events defined on AWS::Serverless::Function resources defined in the template that do not refer to an AWS::Serverless::Api resource.
Accessing Environment Variables
-
- From AWS system manager parameter store: Must state path to the parameter. Example:
${ssm:/${self:service}/${self:custom.stage}/property.sub-property}
property and sub-property are set in config file
- Create Cross Stack References Blog
- Walkthrough: Refer to resource outputs in another AWS CloudFormation stack
- From AWS system manager parameter store: Must state path to the parameter. Example: