Skip to content

5. Using AWS credentials with Dockerizer

Maksym Zaporozhets edited this page Jun 9, 2023 · 1 revision

Using AWS credentials with Dockerizer

This part is for developers and other IAM credentials consumers.

Approach 1: Configure using environment variables

Place environment variables in ~/.bash_aliases or other file with the terminal configuration.

Approach 2: Use AWS CLI

  1. Make sure you have the AWS CLI installed on your local machine. The AWS CLI is available for Windows, macOS, and Linux.
  2. Run aws configure in the terminal, which will prompt them for the following information:
  • AWS Access Key ID: The Access key ID from the IAM user created in Step 4.
  • AWS Secret Access Key: The Secret access key from the IAM user created in Step 4.
  • Default region name: The AWS region where the S3 bucket is located.
  • Default output format: Leave this as the default (json).

This will create a local configuration file (~/.aws/credentials on macOS and Linux, %UserProfile%\.aws\credentials on Windows) with the IAM user's access key and secret key. The AWS SDK and CLI (aws/aws-sdk-php composer package) will use these credentials for authentication and authorization.

Summary on environment variables

See documentation for the docker:mysql:upload-to-aws and docker:mysql:reconstruct-db commands.

Clone this wiki locally