Security

A developer has separate AWS CLI profiles for development and production accounts. How should the developer run a single CLI operation with production credentials without changing the default profile?

Show the answer

Correct answerC. Specify the production profile with the profile parameter.

AWhy not this: An output format controls response presentation, not authentication.

BWhy not this: A Region selects a service location, not an account's credentials.

CWhy this is right: The profile parameter selects the named profile for that operation without changing the default profile.

DWhy not this: An endpoint URL identifies a service endpoint; an account ID does not select credentials.

The profile parameter selects a named profile's credentials and configuration for that CLI operation. Selecting a Region changes where a request is sent, not the identity making it.