Skip to content

Instantly share code, notes, and snippets.

@adamsimonini
Last active July 11, 2023 16:24
Show Gist options
  • Save adamsimonini/d663743f6c4ecc58b9c772a656384ecb to your computer and use it in GitHub Desktop.
Save adamsimonini/d663743f6c4ecc58b9c772a656384ecb to your computer and use it in GitHub Desktop.
AWS Configuration & EC2 Deployment
  1. Get admin to create these two:
  • access key
  • secret key

Store them in 1Password

  1. Install the AWS CLI tool

  2. Run the following to configure your authorization keys into your local environment. Leave the "region name" and "output format" options blank by simply pressing "Enter". See image in comment below.

aws configure
  1. Many IAM policies are required. See here for a near-complete list of policies.

  2. Create a new ecs docker context via the following command:

docker context create ecs {contextName}
  1. Change context to the newly created one, thereby ensuring that docker compose targets the remote server as opposed to your local device:
docker context use {contextName}
  1. Deploy or down one or more containers as normal:
docker compose up

or

docker compose down
@adamsimonini
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment