{"id":15192120,"url":"https://github.com/parabolic/ecs_agent_updater","last_synced_at":"2025-07-30T19:44:31.767Z","repository":{"id":64308070,"uuid":"115804653","full_name":"parabolic/ecs_agent_updater","owner":"parabolic","description":"Check for outdated ecs agent version in AWS.","archived":false,"fork":false,"pushed_at":"2018-03-12T19:55:11.000Z","size":70,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T10:11:18.225Z","etag":null,"topics":["agent","aws","aws-lambda","docker","docker-compose","ecs-agent","ecs-agent-updater","go","golang","lambda","outdated-ecs-agents","schedule","serverless"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/parabolic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-30T15:14:03.000Z","updated_at":"2019-07-08T07:26:13.000Z","dependencies_parsed_at":"2023-01-15T11:15:58.829Z","dependency_job_id":null,"html_url":"https://github.com/parabolic/ecs_agent_updater","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/parabolic/ecs_agent_updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parabolic%2Fecs_agent_updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parabolic%2Fecs_agent_updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parabolic%2Fecs_agent_updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parabolic%2Fecs_agent_updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parabolic","download_url":"https://codeload.github.com/parabolic/ecs_agent_updater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parabolic%2Fecs_agent_updater/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267929351,"owners_count":24167453,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["agent","aws","aws-lambda","docker","docker-compose","ecs-agent","ecs-agent-updater","go","golang","lambda","outdated-ecs-agents","schedule","serverless"],"created_at":"2024-09-27T21:05:10.106Z","updated_at":"2025-07-30T19:44:31.731Z","avatar_url":"https://github.com/parabolic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Serverless, scheduled ecs agent updater.\nWhen using AWS ECS, the ecs agent on the instances is bound to get outdated at some point. Updating it can be automated and this is one implementation for that. Serverless, using golang, lambda and cloudwatch events that trigger it on a cron like schedule. The code, scans all the ecs clusters and it's instances and updates the ecs agents. If the agent is running on a OS that is not Amazon ECS-Optimized Linux, the update operation will fail and the error will be handled and reported to stdout.\n\n---\n\n[![Build Status](https://travis-ci.org/parabolic/ecs_agent_updater.svg?branch=master)](https://travis-ci.org/parabolic/ecs_agent_updater)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://golang.org/\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/parabolic/media/master/ecs_agent_updater/gopher_lambdaman.png\"\n      alt=\"lambdaman\"\n      width=\"400\"\n      height=\"400\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n#### Getting Started\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy it to AWS.\n\n#### Prerequisites\nHaving outdated ecs agents!\n\nIn order to run this project you will need to have docker, docker-compose and terraform installed. Make sure you have the latest versions on your machine (the docker-compose config file is using version 3).\nAll the applications can be installed from here:\n\n- https://www.docker.com/community-edition#/download\n- https://docs.docker.com/compose/install/\n- https://www.terraform.io/downloads.html\n\nMake sure your AWS API credentials are configured properly and the terraform binary is in $PATH.\nMore info about updating the ecs agent can be found here:\n\n- https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateContainerAgent.html.\n\n\n#### Installing\nThe env variables that need to be set in the build environment (in this case docker compose) are:\n\n```sh\nBINARY_FILE_NAME=main\n```\n\nThe env variable UPDATE_ECS_AGENT should be set to `true` or `false` in the run environment. If it's set to true it will update the ecs agents .\nThe example file `env_file.example` needs to be copied and the variables filled in with their respective values. After putting the variables inside, copy the file so that it has the name `env_file`:\n\n```\ncp env_file.example env_file\n```\n\nTo compile the binary and generate the zip you will need to execute:\n\n```\ndocker-compose up --build\n```\n\nWhich will put the binary and the zipped version inside the ./bin folder and will be used as an artifact for deploying to AWS lambda.\n\n\n#### Deployment\nDeployment is done using terraform. I will be using the dev terraform workspace for this example.\nBefore deploying, terraform secrets and other variables need to be set so that terraform can run successfully. Please note that the slack variable is optional whereas the update_ecs_agent is not.\n\n```\nexport TF_VAR_slack_webhook_endpoint=slack_secret\nexport TF_VAR_update_ecs_agent=true\n```\n\nMake sure that the zip is generated beforehand by running `docker-compose up --build` ( see the installing step )\nIf the dev workspace is not present go inside the teraform directory and create the desired workspace with the following command.\n\n```\nterraform workspace new dev\n```\n\nDeploying to AWS is done with the following command executed at the root of this project.\n\n```\n./terraform_deploy.sh dev\n```\n\nAfter this you should see the lambda function deployed to AWS.\n\nRemoving the infrastructure can be easily done with:\n\n```\ncd terraform\nterraform destroy\n```\n\n#### Built With\n* [golang](https://golang.org/) - The programming language used.\n* [docker](https://www.docker.com/community-edition) - Docker CE.\n* [docker-compose](https://docs.docker.com/compose/) - Used for building the application.\n* [terraform](terraform.io) - Used for deploying the binary.\n\n\n#### Contributing\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n\n#### Versioning\nI use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/ecs_agent_version_checker/project/tags).\n\n\n#### Authors\n* **Nikola Velkovski** - *Initial work* - [parabolic](https://github.com/parabolic)\n\n\n#### License\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n\n#### Acknowledgments\n\n\n#### TODO\nIntroduce other methods of notification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparabolic%2Fecs_agent_updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparabolic%2Fecs_agent_updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparabolic%2Fecs_agent_updater/lists"}