diff --git a/docs/usage/README.md b/docs/usage/README.md index c70bb23..519e133 100644 --- a/docs/usage/README.md +++ b/docs/usage/README.md @@ -22,6 +22,10 @@ This guide us how to use the `devops-toolkit` with serveral usecases - Check [**helm_usage**](./helm_usage.md) +## AWSCli + +- Check [**awscli_usage**](./awscli_usage.md) + ## Troubleshooting - For any issues, check [this document](../troubleshooting/TROUBLESHOOTING.md) diff --git a/docs/usage/awscli_usage.md b/docs/usage/awscli_usage.md new file mode 100644 index 0000000..3a1dd53 --- /dev/null +++ b/docs/usage/awscli_usage.md @@ -0,0 +1,57 @@ +# Use awscli in the devops-toolkit + +## Prerequisite + +An AWS account + +## awscli document + +Some document to help you start with awscli + +- +- + +## Note + +To use the existing container instead of creating one, use `docker exec` command instead of `docker run` + +```bash +docker exec -it my_devops_toolkit /bin/bash +``` + +## Use case 1: Configure credentials and list S3 bucket with awscli + +```bash +docker run --rm --network host -it devops-toolkit:latest +############################################### +# Now we are in the docker container terminal # +############################################### +# Configure credentials +aws configure +# List S3 buckets +aws s3 ls +``` + +Sample Result + +```bash +root@docker-desktop:~# aws configure +AWS Access Key ID [None]: xxxxxxxx +AWS Secret Access Key [None]: xxxxxxxx +Default region name [None]: xxxxxxxx +Default output format [None]: xxxxxxxx +``` + +## Use case 2: Using AWS config from the host + +Mount the `.aws` when running toolkit container + +```bash +docker run --rm --network host -it -v ~/.aws:/root/.aws devops-toolkit:latest +# List bucket +aws s3 ls +``` + +## Troubleshooting + +- For any issues, check [this reference](../troubleshooting/TROUBLESHOOTING.md)