nerdexam
Amazon

SCS-C02 · Question #431

A developer is receiving AccessDenied errors when the developer invokes API calls to AWS services from a workstation. The developer previously configured environment variables and configuration…

The correct answer is C. As variables in the AWS CLI command line options. By specifying credentials directly in the AWS CLI command line options, the developer can use specific credentials for each command invocation without conflicting with other credentials that are already configured in environment variables or configuration files on the…

Submitted by yaw92· Mar 6, 2026Identity and Access Management

Question

A developer is receiving AccessDenied errors when the developer invokes API calls to AWS services from a workstation. The developer previously configured environment variables and configuration files on the workstation to use multiple roles with other AWS accounts. A security engineer needs to help the developer configure authentication. The current credentials must be evaluated without conflicting with other credentials that were previously configured on the workstation. Where should these credentials be configured to meet this requirement?

Options

  • AIn the local AWS CLI configuration file
  • BAs environment variables on the local workstation
  • CAs variables in the AWS CLI command line options
  • DIn the AWS shared configuration file

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    17% (7)
  • C
    74% (31)
  • D
    7% (3)

Explanation

By specifying credentials directly in the AWS CLI command line options, the developer can use specific credentials for each command invocation without conflicting with other credentials that are already configured in environment variables or configuration files on the workstation. This allows for testing and using different roles or accounts without affecting the global or default credentials configuration.

Topics

#AWS CLI credentials#credential precedence#environment variables#authentication

Community Discussion

No community discussion yet for this question.

Full SCS-C02 Practice