# AWS resources tagging using Serverless framework

**URL:** <https://forum.serverless.com/t/aws-resources-tagging-using-serverless-framework/18255>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, api-gateway\
**Created:** [January 28, 2023, 6:30pm UTC](https://forum.serverless.com/t/aws-resources-tagging-using-serverless-framework/18255 "2023-01-28T18:30:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sfxpt](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sfxpt](https://forum.serverless.com/u/sfxpt)\
**Post date:** [January 28, 2023, 6:30pm UTC](https://forum.serverless.com/t/aws-resources-tagging-using-serverless-framework/18255/1 "2023-01-28T18:30:27Z")

</div>

Using `provider.tags`, will,

> provides a quick way to tag those resources. All tags specified under this node will be applied to all those API Gateway’s APIs and Lambdas.

So I added to my `serverless.yml`

```yaml
provider:
  tags:
    provTag1: value1
    provTag2: value2

```

then deploy, and was hoping that my API Gateway’s APIs and Lambdas function will all be tagged as such, but when I check, both are not.

I’ve then also tried with `stackTags`, which is supposed to

> cascade down to all resources created in the stack

but not for my API Gateway’s APIs and Lambdas function either.

Update 2:

tried with

```auto
functions:
  hello:
    handler: handler.hello
    tags: # will apply to the Lambda, but not API Gateway's API
      funcTag1: bar

```

but it is not showing in my Lambdas function tags.

What I’m missing please?

```sh
$ sls --version
Environment: linux, node 16.6.2, framework 3.26.0 (local), plugin 6.2.2, SDK 4.3.2
Framework Core: 3.26.0 (local)
Plugin: 6.2.2
SDK: 4.3.2
Tencent CLI: 3.21.6 (binary)

```

---

<div class="post-metadata">

**Author:** ![sergioal12](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/sergioal12/32/6872_2.png) [@sergioal12](https://forum.serverless.com/u/sergioal12)\
**Post date:** [February 27, 2023, 4:50pm UTC](https://forum.serverless.com/t/aws-resources-tagging-using-serverless-framework/18255/2 "2023-02-27T16:50:37Z")

</div>

you try with stackTags?  
here a little example

provider:  
name: aws  
runtime: nodejs14.x  
stage: ${opt:stage, self:custom.default\_stage}  
region: us-east-1  
iamRoleStatements:  
- Effect: Allow  
Action:  
- sqs:ReceiveMessage  
- sqs:SendMessage  
- sqs:DeleteMessage  
Resource: !Sub arn:aws:sqs:us-east-1:${AWS::AccountId}:earnix-sqs-${self:provider.stage}  
- Effect: Allow  
Action:  
- lambda:InvokeFunction  
Resource: ‘arn:aws:lambda:us-east-1:xxxxxxx:function:xxxx’  
- Effect: Allow  
Action:  
- lambda:\*  
Resource: ‘arn:aws:lambda:us-east-1:xxxxxxx:xxxxxs’

stackTags:  
firstTag: xxxx  
secondTag: xxxx
