Skip to content

Docs: AWS copilot useful commands #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/development/README.md
Original file line number Diff line number Diff line change
@@ -235,3 +235,15 @@ You can work on the app's Cloud infrastructure in the dev container by using the
An active SSO session must be available to run the AWS commands, if it is not, run `aws sso login` inside the container to start a session.

Running thes commands in the dev container is made possible by the mapping defined in the [compose file](https://github.com/compilerla/pems/blob/main/compose.yml#L23) that maps the host's AWS credentials folder to the dev container at `/home/caltrans/.aws`. For convenience, you can also set the default AWS profile that will be used in the dev container to `pems` as shown in [`.env.sample`](https://github.com/compilerla/pems/blob/main/.env.sample#L18).

### Useful commands

Deploying

- `copilot svc deploy -n service-name` to [deploy a service](https://aws.github.io/copilot-cli/docs/commands/svc-deploy/) (local code and configuration) that has already been initialized

Monitoring

- `copilot svc show -n service-name` to [see the environment variables and other information](https://aws.github.io/copilot-cli/docs/commands/svc-show/) associated with a service
- `copilot svc logs -n service-name --since 1h` to [see the logs](https://aws.github.io/copilot-cli/docs/commands/svc-logs/) for the past hour of a deployed service
- `copilot svc exec -a app-name -e environment-name -n service-name` to [gain shell access](https://aws.github.io/copilot-cli/docs/commands/svc-exec/) to a running container