A developer is writing a local script using the AWS SDK to read messages from an Amazon SQS queue. The script needs to run locally on the developer's workstation for testing. According to the AWS SDK default credential provider chain, which of the following is the recommended and most secure way to supply the AWS credentials during local testing?
- Store the credentials in the local AWS credentials file by running the `aws configure` command.Cevap
- BHardcode the AWS Access Key ID and Secret Access Key directly into the AWS SDK client initialization code.
- CStore the credentials in AWS Systems Manager Parameter Store and retrieve them at runtime using hardcoded master keys.
- DAttach an IAM Role directly to the local workstation and configure its trust policy to trust the workstation's IP address.
Cevap
Storing the credentials in the local AWS credentials file by running the `aws configure` command.
Storing credentials in the local credentials file (typically at `~/.aws/credentials`) using the `aws configure` command is the recommended method for local development. The AWS SDK default credential provider chain automatically looks for these credentials, avoiding the risk of exposing secrets in the application source code.
Adım Adım Çözüm
Anahtar Kavram
AWS SDK Default Credential Provider Chain and local credential configuration.
Tahmini Süre:1m 0s