Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In serverless.yml what's the difference between tags and stackTags?

https://serverless.com/framework/docs/providers/aws/guide/serverless.yml/

provider:    
  stackTags: # Optional CF stack tags
    key: value
  tags: # Optional service wide function tags
    foo: bar
    baz: qux

What's the difference between the two?

like image 465
Rodrigo Avatar asked Feb 13 '19 18:02

Rodrigo


People also ask

What is serverless yml file?

A service, aka a project, is the Framework's unit of organization. A service is configured via a serverless.yml file where you define your functions, the events that trigger them, and the AWS resources to deploy.

How do I refer to a property in serverless YAML file?

To reference properties in other YAML files use the ${file(./myFile. yml):someProperty} syntax in your serverless. yml configuration file. To reference properties in other JSON files use the ${file(./myFile.

What is service in serverless yml function name?

Service. service: app. The service is simply the name of your project. Since Serverless lets us deploy a project in multiple stages (prod, dev, staging…), CloudFormation stacks will contain both the service name and the stage: app-prod , app-dev , etc.


1 Answers

The CloudFormation stack itself can have tags, which is what stackTags is used for.

If you want to tag your Lambda functions you'd use tags.

tags on a provider level are applied to all functions within the stack.

like image 191
noetix Avatar answered Oct 18 '22 22:10

noetix