$ copilot deploy
What does it do?
This command is used to run either
copilot svc deploy or
copilot job deploy under the hood. The steps involved in
copilot deploy are the same as those involved in
copilot svc deploy and
copilot job deploy:
- Build your local Dockerfile into an image
- Tag it with the value from
--tagor the latest git sha (if you're in a git directory)
- Push the image to ECR
- Package your manifest file and addons into CloudFormation
- Create / update your ECS task definition and job or service.
What are the flags?
-a, --app string Name of the application. -e, --env string Name of the environment. -h, --help help for deploy -n, --name string Name of the service or job. --resource-tags stringToString Optional. Labels with a key and value separated with commas. Allows you to categorize resources. (default ) --tag string Optional. The container image tag.
Deploys a service named "frontend" to a "test" environment.
$ copilot deploy --name frontend --env test
Deploys a job named "mailer" with additional resource tags to a "prod" environment.
$ copilot deploy -n mailer -e prod --resource-tags source/revision=bb133e7,deployment/initiator=manual