{"id":15323652,"url":"https://github.com/joeig/codedeploy-trigger","last_synced_at":"2026-03-02T12:39:40.111Z","repository":{"id":59613441,"uuid":"537920703","full_name":"joeig/codedeploy-trigger","owner":"joeig","description":"Trigger and wait for CodeDeploy to finish ECS and Lambda deployments","archived":false,"fork":false,"pushed_at":"2025-03-25T00:55:37.000Z","size":85,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T11:39:39.795Z","etag":null,"topics":["aws","codedeploy","ecs","lambda","terraform"],"latest_commit_sha":null,"homepage":"","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/joeig.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-17T20:16:58.000Z","updated_at":"2025-02-11T15:06:24.000Z","dependencies_parsed_at":"2024-04-10T11:29:21.830Z","dependency_job_id":"efacdc50-7151-49b8-b49c-7f0218e27158","html_url":"https://github.com/joeig/codedeploy-trigger","commit_stats":{"total_commits":77,"total_committers":3,"mean_commits":"25.666666666666668","dds":0.4285714285714286,"last_synced_commit":"2a406480d2cd0e24f75343bf11e7eb844b28f70f"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeig%2Fcodedeploy-trigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeig%2Fcodedeploy-trigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeig%2Fcodedeploy-trigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeig%2Fcodedeploy-trigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeig","download_url":"https://codeload.github.com/joeig/codedeploy-trigger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248980489,"owners_count":21193131,"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","codedeploy","ecs","lambda","terraform"],"created_at":"2024-10-01T09:20:51.154Z","updated_at":"2026-03-02T12:39:40.060Z","avatar_url":"https://github.com/joeig.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeDeploy Trigger\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/joeig/codedeploy-trigger)](https://goreportcard.com/report/github.com/joeig/codedeploy-trigger)\n\nThis handy tool creates a new CodeDeploy deployment for ECS services and Lambda functions and waits until it completes.\nIn case the deployment fails, it tells you why.\n\nIt's usually used in conjunction with CI/CD or as a Terraform provisioner.\n\n## Usage\n\n```shell\n$ codedeploy-trigger -help\nUsage of codedeploy-trigger:\n  -appSpecFileName string\n        Custom AppSpec file name\n  -applicationName string\n        CodeDeploy application name\n  -containerName string\n        ECS container name (if appSpecFileName is unset)\n  -containerPort int\n        ECS container port (if appSpecFileName is unset)\n  -currentVersion string\n        Current Lambda function version (if appSpecFileName is unset)\n  -deploymentGroupName string\n        CodeDeploy deployment group name\n  -functionAlias string\n        Lambda function alias (if appSpecFileName is unset)\n  -functionName string\n        Lambda function name (if appSpecFileName is unset)\n  -maxWaitDuration duration\n        Max wait duration for a deployment to finish (default 30m0s)\n  -target string\n        Deployment target (\"ECS\" or \"Lambda\"; if appSpecFileName is unset)\n  -targetVersion string\n        Target Lambda function version (if appSpecFileName is unset)\n  -taskDefinitionARN string\n        ECS task definition ARN (if appSpecFileName is unset)\n```\n\n## Install from source\n\nThe following command builds and installs `codedeploy-trigger` into your `GOBIN` directory (usually `~/go/bin`):\n\n```shell\ngo install github.com/joeig/codedeploy-trigger/cmd/codedeploy-trigger@latest\n```\n\n## AWS client configuration\n\n`codedeploy-trigger` assumes the [environment](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#environment-variables) provides a working AWS client configuration.\n\n```shell\nexport AWS_REGION=\"eu-central-1\"\n\nexport AWS_ACCESS_KEY_ID=\"access key ID\"\nexport AWS_SECRET_ACCESS_KEY=\"secret access key\"\nexport AWS_SESSION_TOKEN=\"token\"  # Optional\n\n# Alternatively:\nexport AWS_PROFILE=\"your profile\"\n```\n\n## Terraform snippets\n\n### ECS service\n\nYou can easily integrate it in your Terraform project using a [`null_resource`](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) which is triggered by a task definition change:\n\n```terraform\nresource \"null_resource\" \"deploy\" {\n  triggers = {\n    task_definition_arn = aws_ecs_task_definition.example.arn\n  }\n\n  provisioner \"local-exec\" {\n    command = \u003c\u003cEOT\n      codedeploy-trigger \\\n        -target \"ECS\" \\\n        -applicationName \"codedeploy-application-name\" \\\n        -deploymentGroupName \"codedeploy-deployment-group-name\" \\\n        -taskDefinitionARN \"${aws_ecs_task_definition.api.arn}\" \\\n        -containerName \"container-name\" \\\n        -containerPort \"1337\"\n    EOT\n  }\n}\n```\n\n### Lambda function\n\nYou can easily integrate it in your Terraform project using a [`null_resource`](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) which is triggered by a function version change:\n\n```terraform\nresource \"null_resource\" \"deploy\" {\n  triggers = {\n    target_version = aws_lambda_function.example.version\n  }\n\n  provisioner \"local-exec\" {\n    command = \u003c\u003cEOT\n      codedeploy-trigger \\\n        -target \"Lambda\" \\\n        -applicationName \"codedeploy-application-name\" \\\n        -deploymentGroupName \"codedeploy-deployment-group-name\" \\\n        -functionName \"function-name\" \\\n        -functionAlias \"function-alias\" \\\n        -currentVersion \"42\" \\\n        -targetVersion \"43\"\n    EOT\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeig%2Fcodedeploy-trigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeig%2Fcodedeploy-trigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeig%2Fcodedeploy-trigger/lists"}