{"id":16725281,"url":"https://github.com/unfor19/ssm-label","last_synced_at":"2026-05-19T11:06:15.065Z","repository":{"id":42747572,"uuid":"280264978","full_name":"unfor19/ssm-label","owner":"unfor19","description":"Attach the label latest when AWS SSM Parameter is created or updated","archived":false,"fork":false,"pushed_at":"2023-01-06T11:50:38.000Z","size":1154,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T05:17:45.665Z","etag":null,"topics":["aws","parameters","secrets"],"latest_commit_sha":null,"homepage":"https://github.com/unfor19/ssm-label","language":"Shell","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/unfor19.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}},"created_at":"2020-07-16T21:45:31.000Z","updated_at":"2020-12-13T06:47:41.000Z","dependencies_parsed_at":"2023-02-06T00:46:29.976Z","dependency_job_id":null,"html_url":"https://github.com/unfor19/ssm-label","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fssm-label","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fssm-label/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fssm-label/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unfor19%2Fssm-label/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unfor19","download_url":"https://codeload.github.com/unfor19/ssm-label/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746234,"owners_count":20341203,"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","parameters","secrets"],"created_at":"2024-10-12T22:48:37.405Z","updated_at":"2026-05-19T11:06:10.028Z","avatar_url":"https://github.com/unfor19.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssm-label\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)\n\nAttach the label `latest` when AWS SSM Parameter is created or updated. Especially useful for applications which load AWS SSM Parameters on startup.\n\n## Getting Started\n\n### Deploy\n\n**IMPORTANT** `ssm-label` works per region, so deploy it in each reason that you need to use it\n\n[![Launch in Virginia](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png) Virginia us-east-1](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https://ssm-label.s3-eu-west-1.amazonaws.com/cfn-template-ssm-label.yml)\n\n[![Launch in Ireland](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png) Ireland eu-west-1](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/quickcreate?templateURL=https://ssm-label.s3-eu-west-1.amazonaws.com/cfn-template-ssm-label.yml)\n\n[![Launch in Hong Kong](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png) Hong Kong ap-east-1](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/quickcreate?templateURL=https://ssm-label.s3-eu-west-1.amazonaws.com/cfn-template-ssm-label.yml)\n\n[![Launch in Canada](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png) Canada ca-central-1](https://eu-west-1.console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/quickcreate?templateURL=https://ssm-label.s3-eu-west-1.amazonaws.com/cfn-template-ssm-label.yml)\n\n\u003cdetails\u003e\u003csummary\u003e\nMore regions\n\u003c/summary\u003e\n\nTo deploy in other regions, replace AWS_REGION with the region's code\n\n```\nhttps://AWS_REGION.console.aws.amazon.com/cloudformation/home?region=AWS_REGION#/stacks/quickcreate?templateURL=https://\nssm-label.s3-eu-west-1.amazonaws.com/cfn-template-ssm-label.yml\n```\n\n\u003c/details\u003e\n\n### Use in your application\n\nOn startup, use AWS SDK and fetch all parameters, filter by label `latest`, save the results to a global variable (or a Singleton) and use it across your application.\n\nNeed to rollback to a previous Parameter version?\n\n1. Go to your AWS Console\n1. Systems Manager \u003e Parameter Store \u003e Click on relevant Parameter\n1. History tab \u003e Click on relevant version \u003e Click Attach labels button\n1. Add another label \u003e Type latest \u003e A **good** warning - Moving from version # \u003e Confirm\n\n### Examples\n\n- Requires `ssm-label` to be deployed in your AWS account\n- Assuming that `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are set, or that you're using some other [credentials provider](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials), for example, `aws configure`\n- Both examples rely on the following environment variables\n\n  ```bash\n  VARNAME=DEFAULT_VALUE\n  PARAMETERS_PATH=(Required)\n  PARAMETERS_NON_RECURSIVE=''\n  PARAMETERS_NO_DECRYPTION=''\n  PARAMETERS_MAX_RESULTS=10 # used in pagination, keep it as 10\n  ```\n\n#### Python\n\n- Requires Python 3.6+ and [boto3](https://pypi.org/project/boto3/) `pip install boto3`\n- Execute\n  ```bash\n  $ bash examples/python_example.sh\n  ```\n\n#### NodeJS\n\n- Requires [NodeJS 12.x](https://nodejs.org/en/download/package-manager/), [yarn](https://classic.yarnpkg.com/en/docs/install/) and [aws-sdk](https://www.npmjs.com/package/aws-sdk)\n- Execute\n  ```bash\n  $ bash examples/node_example.sh\n  ```\n\n## Limitations\n\n1. It takes up to 30 seconds for the label `latest` to be attached - the Lambda Function which attaches the label runs for about ~1sec, but it takes time for it to be triggered by the CloudWatch Event\n1. There's a limit of 100 versions per parameter - [AWS hard limit](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-labels.html), see Upcoming Features below `ssm-cleanup`\n\n## Upcoming Features\n\n1. Lambda Function, `ssm-cleanup` runs once a day to clean up all parameters which have more than 30 versions, cleans up the first 20 versions, and ignores versions with labels\n1. Lambda Function, `ssm-slack` sends a message to a Slack channel with the information about the change - actor, parameter name and version\n\n## Contributing\n\nReport issues/questions/feature requests on the [Issues](https://github.com/unfor19/ssm-label/issues) section.\n\nPull requests are welcome! Ideally, create a feature branch and issue for every single change you make. These are the steps:\n\n1. Fork this repo\n1. Create your feature branch from master (`git checkout -b my-new-feature`)\n1. Add the code of your new feature\n1. Commit your remarkable changes (`git commit -am 'Added new feature'`)\n1. Push to the branch (`git push --set-up-stream origin my-new-feature`)\n1. Create a new Pull Request and tell us about your changes\n\n## Authors\n\nCreated and maintained by [Meir Gabay](https://github.com/unfor19)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/unfor19/ssm-label/blob/master/LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Fssm-label","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funfor19%2Fssm-label","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funfor19%2Fssm-label/lists"}