nerdexam
Amazon

DVA-C02 · Question #770

A developer is trying to make API calls using AWS SDK. The IAM user credentials used by the application require multi-factor authentication for all API calls. Which method should the developer use…

The correct answer is C. GetSessionToken. When IAM user credentials require multi-factor authentication, the application must first obtain temporary credentials that include MFA validation. Calling the AWS Security Token Service GetSessionToken API with the MFA code generates short-term credentials that can be used to…

Submitted by packet_pusher· Mar 5, 2026Security

Question

A developer is trying to make API calls using AWS SDK. The IAM user credentials used by the application require multi-factor authentication for all API calls. Which method should the developer use to access the multi-factor authentication protected API?

Options

  • AGetFederationToken
  • BGetCallerIdentity
  • CGetSessionToken
  • DDecodeAuthorizationMessage

How the community answered

(25 responses)
  • A
    8% (2)
  • C
    88% (22)
  • D
    4% (1)

Explanation

When IAM user credentials require multi-factor authentication, the application must first obtain temporary credentials that include MFA validation. Calling the AWS Security Token Service GetSessionToken API with the MFA code generates short-term credentials that can be used to make authenticated AWS SDK API calls while enforcing MFA requirements.

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice