A developer is using Docker Compose to locally test a Python application that uses the AWS SDK (Boto3) to retrieve secrets from AWS Secrets Manager. The application runs inside the container under a non-root user account named `appuser` (with home directory `/home/appuser`).
On the host workstation, the developer has configured the AWS CLI with a profile named `local-dev` that contains the necessary IAM permissions. The container fails to authenticate with AWS, raising a `ClientError` indicating that no credentials can be found. The current `docker-compose.yml` file contains the following volume mount:
yaml
volumes:
- ~/.aws:/root/.aws:ro
Which two actions must the developer take to resolve this issue and ensure Boto3 uses the correct credentials? (Select two.)
- Update the volume mount in the `docker-compose.yml` file to map the host's `~/.aws` directory to `/home/appuser/.aws:ro`.Answer
- Add the `AWS_PROFILE=local-dev` environment variable to the container's service environment block in the `docker-compose.yml` file.Answer
- CSet the `AWS_PROFILE` environment variable to `local-dev` on the host workstation's shell before running `docker-compose up`.
- DSet the `AWS_SDK_LOAD_CONFIG=true` environment variable in the container and mount the credentials file to `/etc/aws/credentials:ro`.
- EConfigure the AWS Secrets Manager resource policy to allow access from the container's local IP address using a `StringEquals` condition.