A developer is containerizing a Java application that uses the AWS SDK for Java v2 to read objects from an Amazon S3 bucket. Access to the bucket requires assuming an IAM role. The developer has configured the local development host's `~/.aws/config` file with a profile named `dev-role` that specifies a `role_arn` and a `source_profile`. Running the AWS CLI command `aws s3 ls --profile dev-role` on the host machine successfully lists the bucket contents. However, when the Java application is run inside a local Docker container using the environment variable `AWS_PROFILE=dev-role`, the application fails with a `SdkClientException` indicating that credentials cannot be loaded.
Which two actions should the developer take to resolve this issue? (Choose two.)
- Mount the host's `~/.aws` directory to the home directory of the user running the application inside the container.Cevap
- Add the `software.amazon.awssdk:sts` dependency to the application's build file (e.g., `pom.xml`).Cevap
- CHardcode the AWS Access Key ID and Secret Access Key associated with the target IAM role in the S3 client initialization code.
- DModify the IAM trust policy of the target IAM role to trust the private IP address of the local Docker container.
- EConfigure the application to bootstrap credentials from AWS Systems Manager Parameter Store by configuring a custom credential provider.