aws-actions/Amazon ECS "Deploy Task Definition" Action for GitHub Actions

Registers an Amazon ECS task definition, and deploys it to an ECS service

View on GitHub

Trust Signals

Scorecard Score
Scorecard 6–8scored Jul 6, 2026
Maintenance Recency
Activelast commit Jul 7, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: aws-actions/amazon-ecs-deploy-task-definition@c465972ecbd160473f22e683363b422a5412a3de # v2.6.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
task-definitionThe path to the ECS task definition file to register.yes
desired-countThe number of instantiations of the task to place and keep running in your service.no
serviceThe name of the ECS service to deploy to. If no service is given, the action will not deploy the task, but only register the task definition.no
clusterThe name of the ECS service's cluster. Will default to the 'default' cluster.no
wait-for-service-stabilityWhether to wait for the ECS service to reach stable state after deploying the new task definition. Valid value is "true". Will default to not waiting.no
wait-for-minutesHow long to wait for the ECS service to reach stable state, in minutes (default: 30 minutes, max: 6 hours). For CodeDeploy deployments, any wait time configured in the CodeDeploy deployment group will be added to this value.no
wait-max-delay-secondsMaximum delay in seconds between polling attempts when waiting for service stability or task completion. If not set, AWS SDK uses exponential backoff up to 120 seconds. Set to 15 for consistent 15-second polling intervals.no
codedeploy-appspecThe path to the AWS CodeDeploy AppSpec file, if the ECS service uses the CODE_DEPLOY deployment controller. Will default to 'appspec.yaml'.no
codedeploy-applicationThe name of the AWS CodeDeploy application, if the ECS service uses the CODE_DEPLOY deployment controller. Will default to 'AppECS-{cluster}-{service}'.no
codedeploy-deployment-groupThe name of the AWS CodeDeploy deployment group, if the ECS service uses the CODE_DEPLOY deployment controller. Will default to 'DgpECS-{cluster}-{service}'.no
codedeploy-deployment-descriptionA description of the deployment, if the ECS service uses the CODE_DEPLOY deployment controller. NOTE: This will be truncated to 512 characters if necessary.no
codedeploy-deployment-configThe name of the AWS CodeDeploy deployment configuration, if the ECS service uses the CODE_DEPLOY deployment controller. If not specified, the value configured in the deployment group or `CodeDeployDefault.OneAtATime` is used as the default.no
force-new-deploymentWhether to force a new deployment of the service. Valid value is "true". Will default to not force a new deployment.no
service-managed-ebs-volume-nameThe name of the volume, to be manage in the ECS service. This value must match the volume name from the Volume object in the task definition, that was configuredAtLaunch.no
service-managed-ebs-volumeA JSON object defining the configuration settings for the EBS Service volume that was ConfiguredAtLaunch. You can configure size, volumeType, IOPS, throughput, snapshot and encryption in ServiceManagedEBSVolumeConfiguration. Currently, the only supported volume type is an Amazon EBS volume.no
run-taskA boolean indicating whether to run a stand-alone task in a ECS cluster. Task will run before the service is updated if both are provided. Default value is false .no
run-task-container-overridesA JSON array of container override objects which should applied when running a task outside of a service. Warning: Do not expose this field to untrusted inputs. More details: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.htmlno
run-task-security-groupsA comma-separated list of security group IDs to assign to a task when run outside of a service. Will default to none.no
run-task-subnetsA comma-separated list of subnet IDs to assign to a task when run outside of a service. Will default to none.no
run-task-assign-public-IPWhether the task's elastic network interface receives a public IP address. The default value is DISABLED but will only be applied if run-task-subnets or run-task-security-groups are also set.no
run-task-capacity-provider-strategyA JSON array of capacity provider strategy items which should applied when running a task outside of a service. Will default to none.no
run-task-launch-typeECS launch type for tasks run outside of a service. Valid values are 'FARGATE' or 'EC2'. Will default to 'FARGATE'. Will only be applied if run-task-capacity-provider-strategy is not set.no
run-task-started-byA name to use for the startedBy tag when running a task outside of a service. Will default to 'GitHub-Actions'.no
run-task-tagsA JSON array of tags.no
run-task-managed-ebs-volume-nameThe name of the volume. This value must match the volume name from the Volume object in the task definition, that was configuredAtLaunch.no
run-task-managed-ebs-volumeA JSON object defining the configuration settings for the Amazon EBS task volume that was configuredAtLaunch. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created.no
wait-for-task-stoppedWhether to wait for the task to stop when running it outside of a service. Will default to not wait.no
enable-ecs-managed-tagsDetermines whether to turn on Amazon ECS managed tags 'aws:ecs:serviceName' and 'aws:ecs:clusterName' for the tasks in the service.no
propagate-tagsDetermines to propagate the tags from the 'SERVICE' to the task.no
keep-null-value-keysA comma-separated list of keys whose empty values (empty string, array, or object) should be preserved in the task definition. By default, empty values are removed.
max-retriesThe maximum number of retry attempts for AWS API calls. Defaults to 3.no
namedescription
task-definition-arnThe ARN of the registered ECS task definition.
codedeploy-deployment-idThe deployment ID of the CodeDeploy deployment (if the ECS service uses the CODE_DEPLOY deployment controller).
run-task-arnThe ARN(s) of the task(s) that were started by the run-task option. Output is in an array JSON format.