{"id":19066695,"url":"https://github.com/washingtonpost/serverless-plugin-nametag","last_synced_at":"2025-04-28T12:44:12.391Z","repository":{"id":143908325,"uuid":"154576692","full_name":"washingtonpost/serverless-plugin-nametag","owner":"washingtonpost","description":"Serverless framework plugin for applying a standard identification tag to AWS Lambda functions","archived":false,"fork":false,"pushed_at":"2018-10-26T16:28:01.000Z","size":13,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T08:22:07.342Z","etag":null,"topics":["aws","aws-lambda","serverless","serverless-framework","serverless-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/washingtonpost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-24T22:23:10.000Z","updated_at":"2021-12-01T00:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"4cdbf914-0a95-4004-94ff-f42d0d1ffd45","html_url":"https://github.com/washingtonpost/serverless-plugin-nametag","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"0bf2c02108e58e0395f2fe9e576c418a8afb466c"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/washingtonpost%2Fserverless-plugin-nametag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/washingtonpost%2Fserverless-plugin-nametag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/washingtonpost%2Fserverless-plugin-nametag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/washingtonpost%2Fserverless-plugin-nametag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/washingtonpost","download_url":"https://codeload.github.com/washingtonpost/serverless-plugin-nametag/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223772159,"owners_count":17199977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","serverless","serverless-framework","serverless-plugin"],"created_at":"2024-11-09T00:57:45.521Z","updated_at":"2024-11-09T00:57:46.079Z","avatar_url":"https://github.com/washingtonpost.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-plugin-nametag\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n\nA Serverless framework plugin for tagging AWS Lambda functions with the logical ID of the Lambda function resource.\n\n\n## Usage\n\n\n### Installation\n\n[Install via NPM](https://npmjs.com/package/serverless-plugin-nametag)\n\n\n### A Basic Example\n\nThe following Serverless configuration will apply a `Name` tag to the `MyFunction` Lambda function \nresource that evaluates to its configured `FunctionName` (physical ID):\n\n```yaml\nservice: my-service\n\nplugins:\n  - serverless-plugin-nametag\n\nprovider:\n  name: aws\n  stage: dev\n  region: us-east-1\n  runtime: python3.6\n\ncustom:\n  nametag:\n  tag: true\n\nfunctions:\n  MyFunction:\n    handler: handlers.my_function\n```\n\nIn the case of most normal setups, the resulting function will be tagged with `Name: my-service-dev-MyFunction`.\n\n\n### Advanced Configuration\n\n```yaml\nservice: my-service\n\nplugins:\n  - serverless-plugin-nametag\n\nprovider:\n  name: aws\n  stage: dev\n  region: us-east-1\n  runtime: python3.6\n\ncustom:\n  nametag:\n    tag: true\n    tagName: FunctionName\n\nfunctions:\n  MyFunction:\n    handler: handlers.my_function\n  SpecialFunction:\n    handler: handlers.special_function\n    tags:\n      Foo: bar\n    nametag:\n      tagName: Special\n  UntaggedFunction:\n    handler: handlers.untagged_function\n    nametag:\n      tag: false\n```\n\nIn the case of most normal setups, the resulting functions will be tagged as-follows:\n\n* `MyFunction`:\n    * `FunctionName: my-service-dev-MyFunction`\n* `SpecialFunction`:\n    * `Foo: bar`\n    * `Special: my-service-dev-SpecialFunction`\n* `UntaggedFunction`:\n    * Nothing!\n\n\n## Configuration Options\n\nThe following properties can be set on a `nametag` object within `custom` and/or each function described in your\nServerless configuration. Options set in `custom` define the default behavior for each function; options set\nat the function level override `custom` options for that function.\n\n| Option        | Type    | Default  | Description                                                        |\n| ------------- | ------- | -------- | ------------------------------------------------------------------ |\n| `custom.nametag.tag`         | boolean | `false`  | Whether all function(s) should be tagged by default | \n| `custom.nametag.tagName`     | string  | `\"Name\"` | The name of the tag that will be created on all functions by default |\n| `functions[].nametag.tag` | boolean | (set by `custom.nametag.tag`) | Whether this function should be tagged |\n| `functions[].nametag.tagName` | string | (set by `custom.nametag.tagName`) | The name of the tag that will be created on this function | \n\nNote that the `tagName` option is for setting the name of the _tag_, not its value! \n\n\n## How It Works\n\nThis plugin is executed during the Serverless framework's `before:package:compileFunctions` hook event.\nIt copies the value that Serverless plans to use as the `FunctionName` property for each function's resulting\nCloudFormation configuration object and applies it as the value of a tag (called `Name` by default, but can be\ncustomized to whatever you like) on the same function.\n\n\n## Contributing\n\n- Have an idea or a problem? Create an issue! It's usually best to start by doing this.\n- Fork this repository and submit a pull request if you have a fix or feature you want to be considered.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwashingtonpost%2Fserverless-plugin-nametag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwashingtonpost%2Fserverless-plugin-nametag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwashingtonpost%2Fserverless-plugin-nametag/lists"}