Amazon

SCS-C03 practice question 2

AWS Certified Security - Specialty (SCS-C03) · free question 2 of 20

Question

An AWS account administrator created an IAM group and applied the following managed policy to require that each individual user authenticate using multi-factor authentication: ```json { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": "ec2:*", "Resource": "*" }, { "Sid": "BlockAnyAccessUnlessSignedInWithMFA", "Effect": "Deny", "Action": "ec2:*", "Resource": "*", "Condition": { "BoolIfExists": { "aws:MultiFactorAuthPresent": false } } }] } ``` After implementing the policy, the administrator receives reports that users are unable to perform Amazon EC2 commands using the AWS CLI. What should the administrator do to resolve this problem while still enforcing multi-factor authentication?
  • A. Change the value of aws:MultiFactorAuthPresent to true.
  • B. Instruct users to run the aws sts get-session-token CLI command and pass the multi-factor authentication --serial-number and -token-code parameters. Use these resulting values to make API/CLI calls. Correct
  • C. Implement federated API/CLI access using SAML 2.0, then configure the identity provider to enforce multi-factor authentication.
  • D. Create a role and enforce multi-factor authentication in the role trust policy. Instruct users to run the sts assume-role CLI command and pass --serial-number and --token-code parameters. Store the resulting values in environment variables. Add sts:AssumeRole to NotAction in the policy.

Explanation

The correct answer is B because using aws sts get-session-token with multi-factor authentication parameters allows users to obtain temporary credentials that can be used for API/CLI calls, thereby resolving the issue of being unable to perform Amazon EC2 commands while still enforcing MFA. This approach does not require changing existing policies or implementing federated access.

Need the theory? Learn it free in the SCS-C03 course on Godlike Academy

Practice the whole free set

Answer all 20 free SCS-C03 questions with instant feedback, or unlock all 85 questions with Learn and Exam modes.