{"id":31646275,"url":"https://github.com/codefresh-io/cf-deploy-ecs","last_synced_at":"2026-03-10T00:31:06.347Z","repository":{"id":13572874,"uuid":"72645571","full_name":"codefresh-io/cf-deploy-ecs","owner":"codefresh-io","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-14T18:16:14.000Z","size":16,"stargazers_count":8,"open_issues_count":6,"forks_count":8,"subscribers_count":14,"default_branch":"latest","last_synced_at":"2026-02-13T08:05:56.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefresh-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-02T14:03:32.000Z","updated_at":"2023-04-02T22:30:06.000Z","dependencies_parsed_at":"2022-08-07T07:15:35.269Z","dependency_job_id":null,"html_url":"https://github.com/codefresh-io/cf-deploy-ecs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codefresh-io/cf-deploy-ecs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-deploy-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-deploy-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-deploy-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-deploy-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefresh-io","download_url":"https://codeload.github.com/codefresh-io/cf-deploy-ecs/tar.gz/refs/heads/latest","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fcf-deploy-ecs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30318374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-10-07T05:21:23.832Z","updated_at":"2026-03-10T00:31:06.318Z","avatar_url":"https://github.com/codefresh-io.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# cf-ecs-deploy\nDeployment to Amazon ECS Service\n\n### Prerequiests\n- Configured ECS Cluster with at least one running instance.\n- Configured ECS Service and task definition with an image being deployed.\n  See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html\n\n- AWS Credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) with following priviledges:\n```json\n{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Sid\": \"Stmt1479146904000\",\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"ecs:DescribeServices\",\n        \"ecs:DescribeTaskDefinition\",\n        \"ecs:DescribeTasks\",\n        \"ecs:ListClusters\",\n        \"ecs:ListServices\",\n        \"ecs:ListTasks\",\n        \"ecs:RegisterTaskDefinition\",\n        \"ecs:UpdateService\"\n      ],\n      \"Resource\": [\n        \"*\"\n      ]\n    }\n  ]\n}\n```\n\n### Deployment with Codefresh\n- Add encrypted environment variables for aws credentials.\n     * AWS_ACCESS_KEY_ID\n     * AWS_SECRET_ACCESS_KEY\n- Add \"deploy to ecs\" step to codefresh.yml which runs codefresh/cf-deploy-ecs image with command cfecs-update\n  Specify the aws region, ecs cluster and service names. See `cfecs-update -h` for parameter references\n\n```yaml\n# codefresh.yml example with deploy to ecs step\nversion: '1.0'\n\nsteps:\n  build-step:\n    type: build\n    image-name: repo/image:tag\n\n  push to registry:\n    type: push\n    candidate: ${{build-step}}\n    tag: ${{CF_BRANCH}}\n\n  deploy to ecs:\n    image: codefresh/cf-deploy-ecs\n    commands:\n      - cfecs-update \u003caws-region\u003e \u003cecs-cluster-name\u003e \u003cecs-service-name\u003e\n    environment:\n      - AWS_ACCESS_KEY_ID=${{AWS_ACCESS_KEY_ID}}\n      - AWS_SECRET_ACCESS_KEY=${{AWS_SECRET_ACCESS_KEY}}\n\n    when:\n      - name: \"Execute for 'master' branch\"\n        condition: \"'${{CF_BRANCH}}' == 'master'\"\n```\n\n\n### Deployment Flow\n- get ECS service by specified aws region, ecs cluster and service names\n- create new revision from current task definition of the service. If --image-name and --image-tag are provided, replace the tag of the image\n- launch update-service with new task definition revision\n- wait for deployment to complete (by default, if running withou --no-wait)\n    * deployment is considered as completed successfully if runningCount == desiredCount for PRIMARY deployment - see `aws ecs describe-service`\n    * cfecs-update exits with timeout if after --timeout (default = 900s) runningCount != desiredCount script exits with timeout\n    * cfecs-update exits with error if --max-failed (default = 2) or more ecs tasks were stopped with error for the task definition being deployed.\n      ECS retries failed tasks continuously\n\n### Usage with docker\n\n```bash\ndocker run --rm -it -e AWS_ACCESS_KEY_ID=**** -e AWS_SECRET_ACCESS_KEY=**** codefresh/cf-ecs-deploy cfecs-update [options] \u003caws-region\u003e \u003cecs-cluster-name\u003e \u003cecs-service-name\u003e\n```\n\n### cfecs-update -h\n```\nusage: cfecs-update [-h] [-i IMAGE_NAME] [-t IMAGE_TAG] [--wait | --no-wait]\n                    [--timeout TIMEOUT] [--max-failed MAX_FAILED] [--debug]\n                    region_name cluster_name service_name\n\nCodefresh ECS Deploy\n\npositional arguments:\n  region_name           AWS Region, ex. us-east-1\n  cluster_name          ECS Cluster Name\n  service_name          ECS Service Name\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --wait                Wait for deployment to complete (default)\n  --no-wait             No Wait for deployment to complete\n  --timeout TIMEOUT     deployment wait timeout (default 900s)\n  --max-failed MAX_FAILED\n                        max failed tasks to consider deployment as failed\n                        (default 2)\n  --debug               show debug messages\n\n  -i IMAGE_NAME, --image-name IMAGE_NAME\n                        Image Name in ECS Task Definition to set new tag\n  -t IMAGE_TAG, --image-tag IMAGE_TAG\n                        Tag for the image\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fcf-deploy-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefresh-io%2Fcf-deploy-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fcf-deploy-ecs/lists"}