Last active
November 9, 2023 18:16
-
-
Save matwerber1/6614f54bdf3214273a96c0501d6708c2 to your computer and use it in GitHub Desktop.
AWS - Containers - Compose - mount ~/.aws/cred
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
AwsCLI: | |
image: public.ecr.aws/aws-cli/aws-cli | |
container_name: aws-cli | |
platform: linux/x86_64 | |
volumes: | |
- ~/.aws/:~/.aws/ # Mount local credentials into container to use AWS CLI/SDK | |
environment: | |
AWS_PROFILE: "PROFILE YOU WANT TO USE" | |
AWS_DEFAULT_REGION: "us-east-1" # used by AWS CLI | |
AWS_REGION: "us-east-1" # used by SDKs (typically) | |
AWS_DEFAULT_REGION: | |
AWS_CLI_AUTO_PROMPT: on-partial | |
AWS_DEFAULT_OUTPUT: json | |
AWS_PAGER: "" # Empty string=disabled | |
#AWS_CONFIG_FILE: "" | |
# AWS_DEFAULT_REGION: "" only for assuming role with web identity, not standard assume-role | |
# AWS_ROLE_SESSION_NAME: "" custom identifier added to end uf session ARN - can help with logging | |
ports: | |
- "8000:8000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment