A developer is receiving AccessDenied errors when invoking AWS service APIs from a workstation. The workstation already has environment variables and shared configuration files set up for multiple cross-account roles. A security engineer must configure credentials for the current task so they are evaluated without conflicting with existing credentials. Where should these credentials be specified?
Choose an answer
Tap an option to check your answer.
Correct answer: As parameters in the AWS CLI command line options.
Why this is the answer
Specifying credentials as parameters in the AWS CLI command line options ensures they take precedence over all other credential sources for that specific command. This is the highest priority in the AWS CLI credential resolution order, preventing conflicts with existing environment variables or shared configuration files. Environment variables and shared configuration files are lower in the credential resolution order, meaning existing settings could still be used if not overridden. The local AWS CLI configuration file is also lower in priority and would not guarantee overriding existing environment variables or shared configuration settings.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed