Add informatin to "Serive Information" at end of deploy

After a sls deploy, the terminal prints out this information…

Service Information
service: CARDS
stage: dev
region: us-west-2
stack: CARDS-dev
api keys:
  graphql: CARDS-dev-graphql
Serverless: Removing old service versions...

How can I add to this information. I would like to provide some feedback (such as api keys or the id’s of some of the resources that have been created).

Are you looking for the output feature in serverless.yml?

  # The "Outputs" that your AWS CloudFormation Stack should produce.  This allows references between services.
      Description: The ARN for the User's Table
        "Fn::GetAtt": [ usersTable, Arn ]

You need run sls info -v to show the outputs.

I ended up using the plugin serverless-stack-output so I could do some custom logging at the end of a deploy and also reformat the outputs and save them to file.

1 Like