{"id":15651370,"url":"https://github.com/h3poteto/ecs-goploy","last_synced_at":"2025-04-30T18:44:52.833Z","repository":{"id":21515597,"uuid":"93145304","full_name":"h3poteto/ecs-goploy","owner":"h3poteto","description":"re-implementation of ecs-deploy in Golang","archived":false,"fork":false,"pushed_at":"2023-01-19T21:02:58.000Z","size":200,"stargazers_count":33,"open_issues_count":13,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T18:51:10.969Z","etag":null,"topics":["aws-ecs","continuous-deployment","ecs-deploy","ecs-goploy","golang"],"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/h3poteto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T08:35:01.000Z","updated_at":"2025-03-30T00:43:45.000Z","dependencies_parsed_at":"2023-02-11T21:16:30.369Z","dependency_job_id":null,"html_url":"https://github.com/h3poteto/ecs-goploy","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Fecs-goploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Fecs-goploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Fecs-goploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h3poteto%2Fecs-goploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h3poteto","download_url":"https://codeload.github.com/h3poteto/ecs-goploy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251765090,"owners_count":21640132,"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-ecs","continuous-deployment","ecs-deploy","ecs-goploy","golang"],"created_at":"2024-10-03T12:38:06.563Z","updated_at":"2025-04-30T18:44:52.759Z","avatar_url":"https://github.com/h3poteto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ecs-goploy\n[![Build Status](https://travis-ci.com/h3poteto/ecs-goploy.svg?branch=master)](https://travis-ci.com/h3poteto/ecs-goploy)\n[![GitHub release](http://img.shields.io/github/release/h3poteto/ecs-goploy.svg?style=flat-square)](https://github.com/h3poteto/ecs-goploy/releases)\n[![GoDoc](https://godoc.org/github.com/h3poteto/ecs-goploy/deploy?status.svg)](https://godoc.org/github.com/h3poteto/ecs-goploy/deploy)\n\n`ecs-goploy` is a re-implementation of [ecs-deploy](https://github.com/silinternational/ecs-deploy) in Golang.\n\n\nThis is a command line tool, but you can use `deploy` as a package.\nSo when you write own deploy script for AWS ECS, you can embed `deploy` package in your golang source code and customize deploy recipe.\nPlease check [godoc](https://godoc.org/github.com/h3poteto/ecs-goploy/deploy).\n\n\n# Install\n\nGet binary from github:\n\n```\n$ wget https://github.com/h3poteto/ecs-goploy/releases/download/v0.5.0/ecs-goploy_v0.5.0_linux_amd64.zip\n$ unzip ecs-goploy_v0.5.0_linux_amd64.zip\n$ ./ecs-goploy --help\n```\n\n# Usage\n\n```\n$ ./ecs-goploy --help\nDeploy commands for ECS\n\nUsage:\n  ecs-goploy [command]\n\nAvailable Commands:\n  help        Help about any command\n  run         Run command\n  update      Update some ECS resource\n  version     Print the version number\n\nFlags:\n  -h, --help             help for ecs-goploy\n      --profile string   AWS profile (detault is none, and use environment variables)\n      --region string    AWS region (default is none, and use AWS_DEFAULT_REGION)\n  -v, --verbose          Enable verbose mode\n\nUse \"ecs-goploy [command] --help\" for more information about a command.\n```\n\n## Deploy an ECS Service\n\nPlease specify cluser, service name and image(family:revision).\n\n```\n$ ./ecs-goploy update service --cluster my-cluster --service-name my-service --image nginx:stable --skip-check-deployments --enable-rollback\n```\n\nIf you specify `--base-task-definition`, ecs-goploy updates the task definition with the image and deploy ecs service.\nIf you does not specify `--base-task-definition`, ecs-goploy get current task definition of the service, and update with the image, and deploy ecs service.\n\n## Run Task\n\nAt first, you must update the task definition which is used to run ecs task.\nAfter that, you can run ecs task.\n\n```\n$ NEW_TASK_DEFINITION=`./ecs-goploy update task-definition --base-task-definition my-task-definition:1 --image nginx:stable`\n$ ./ecs-goploy run task --cluster my-cluster --container-name web --task-definition $NEW_TASK_DEFINITION --command \"some commands\"\n```\n\n## Update Scheduled Task\n\nAt first, you must update the task definition which is used to run scheduled task.\nAfter that, you can update the scheduled task.\n\n```\n$ NEW_TASK_DEFINITION=`./ecs-goploy update task-definition --base-task-definition my-task-definition:1 --image nginx:stable`\n$ ./ecs-goploy update scheduled-task --count 1 --name schedule-name --task-definition $NEW_TASK_DEFINITION\n```\n\n# Configuration\n## AWS Configuration\n\n`ecs-goploy` calls AWS API via aws-skd-go, so you need export environment variables:\n\n```\n$ export AWS_ACCESS_KEY_ID=XXXXX\n$ export AWS_SECRET_ACCESS_KEY=XXXXX\n$ export AWS_DEFAULT_REGION=XXXXX\n```\n\nor set your credentials in `$HOME/.aws/credentials`:\n\n```\n[default]\naws_access_key_id = XXXXX\naws_secret_access_key = XXXXX\n```\n\nor prepare IAM Role or IAM Task Role.\n\nAWS region can be set command argument: `--region`.\n\n## AWS IAM Policy\n\nBelow is a basic IAM Policy required for ecs-goploy.\n\n```\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"AllowUserToECSDeploy\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ecr:DescribeRepositories\",\n        \"ecr:DescribeImages\",\n        \"ecs:DescribeServices\",\n        \"ecs:DescribeTaskDefinition\",\n        \"ecs:RegisterTaskDefinition\",\n        \"ecs:UpdateService\",\n        \"ecs:RunTask\",\n        \"ecs:DescribeTasks\",\n        \"ecs:ListTasks\",\n        \"events:DescribeRule\",\n        \"events:ListTargetsByRule\",\n        \"events:PutTargets\",\n        \"iam:PassRole\"\n      ],\n      \"Resource\": \"*\"\n    }\n  ]\n}\n```\n\n# License\n\nThe package is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3poteto%2Fecs-goploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh3poteto%2Fecs-goploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh3poteto%2Fecs-goploy/lists"}