Curated

Security 1 (2.1–2.2)

0 votes

Questions57

  1. Question 51

    Security

    Which AWS STS operation lets an authenticated IAM principal obtain temporary credentials for an IAM role?

    Show the answer

    Correct answerC. AssumeRole

    AWhy not this: GetCallerIdentity returns information about the current caller without issuing credentials.

    BWhy not this: GetFederationToken creates a federated user session rather than assuming a specified IAM role.

    CWhy this is right: AssumeRole returns temporary credentials for a role that the caller is authorized to assume.

    DWhy not this: GetSessionToken creates temporary credentials for an IAM user, not a session for a specified role.

    AssumeRole returns temporary credentials for an authorized role session. GetSessionToken provides temporary credentials for the calling IAM user rather than assuming a role.

    Open this question
  2. Question 52

    Security

    An application using Role A's temporary credentials requests a two-hour session for Role B, whose maximum session duration is 12 hours. All permissions and trust requirements are satisfied; which change makes the request succeed?

    Show the answer

    Correct answerB. Request a session of one hour or less

    AWhy not this: A role session name is required, and removing it does not resolve the duration limit.

    BWhy this is right: Role chaining limits the requested session duration to a maximum of one hour.

    CWhy not this: Role A's maximum duration does not change the one-hour limit for the chained session.

    DWhy not this: A session policy restricts session permissions; it cannot increase the role-chaining duration limit.

    Assuming a role with another role's credentials is role chaining, which limits the new session to one hour. Increasing a role's maximum session duration does not override this limit.

    Open this question
  3. Question 53

    Security

    A developer stores an encrypted database password in AWS Systems Manager Parameter Store as a SecureString. The application receives encrypted text when retrieving it. What should the developer change?

    Show the answer

    Correct answerC. Request decryption and allow kms:Decrypt on the parameter's KMS key.

    AWhy not this: A String parameter would remove encrypted secret storage rather than correctly retrieve the SecureString.

    BWhy not this: Parameter history returns versions; DescribeKey permits viewing key metadata, not decrypting values.

    CWhy this is right: WithDecryption requests plaintext, and KMS authorization permits the decryption operation.

    DWhy not this: Key rotation and path-based retrieval do not request decryption of the returned value.

    Retrieving a SecureString as plaintext requires requesting decryption and having permission to use its KMS key for decryption. Reading parameter history does not itself decrypt the returned values.

    Open this question
  4. Question 54

    Security

    Which AWS Secrets Manager staging label identifies the current version of a secret?

    Show the answer

    Correct answerA. AWSCURRENT

    AWhy this is right: AWSCURRENT identifies the current version and is the default when no version is specified.

    BWhy not this: AWSNEXT is not a predefined Secrets Manager staging label.

    CWhy not this: AWSPENDING identifies a version being prepared or tested during rotation.

    DWhy not this: AWSPREVIOUS identifies the version that previously held the current label.

    AWSCURRENT identifies the current secret version. AWSPENDING identifies a candidate version during rotation, not the current version applications normally retrieve.

    Open this question
  5. Question 55

    Security

    A Lambda function retrieves the same API token from AWS Secrets Manager on every invocation, causing excessive API calls. The token can change, and updates must reach the function within five minutes. What should the developer do?

    Show the answer

    Correct answerD. Cache the secret locally with a refresh interval below five minutes.

    AWhy not this: Embedding credentials in deployment artifacts exposes secrets and requires repeated deployments.

    BWhy not this: Pinning a version prevents the application from automatically retrieving a newer current value.

    CWhy not this: Rotating encryption key material does not refresh a token held by the application.

    DWhy this is right: A cache with a bounded refresh interval reduces API calls while satisfying the update requirement.

    A bounded secret cache reduces retrieval calls while allowing changed values to be fetched within the freshness requirement. KMS key rotation changes encryption key material, not the cached token or its refresh behavior.

    Open this question
  6. Question 56

    Security

    An AWS Glue ETL job must identify PII in incoming records and write masked copies for analysts. Only the ingestion role may read the original S3 objects, regardless of analysts' other S3 permissions. Which actions meet these requirements? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersC. Apply a Glue transformation that replaces detected sensitive values.D. Use a Glue Detect Sensitive Data transform to flag sensitive values.E. Add a raw-bucket policy denying reads except by the ingestion role.

    AWhy not this: SSE-S3 provides encryption at rest, not a restriction on which authorized readers receive plaintext.

    BWhy not this: HTTPS protects data in transit but does not mask data or prevent analysts from reading it.

    CWhy this is right: Replacing detected values produces masked output rather than exposing original PII.

    DWhy this is right: The Detect Sensitive Data transform identifies PII and other sensitive values in records processed by Glue.

    EWhy this is right: An explicit deny overrides other S3 allows; its exception can identify the ingestion role.

    FWhy not this: Versioning preserves object versions; it does not conceal their sensitive contents.

    Glue can detect PII and transform sensitive values before writing analyst copies; an explicit bucket-policy deny enforces the raw-data restriction. SSE-S3 encrypts stored objects but does not prevent authorized S3 readers from receiving plaintext.

    Open this question
  7. Question 57

    Security

    A role in account B must directly retrieve a Secrets Manager secret in account A that uses the AWS managed key aws/secretsmanager. Neither account permits broad principal access. Which configuration enables this access?

    Show the answer

    Correct answerC. Use a customer managed key; allow the role in the secret policy, key policy, and identity policy.

    AWhy not this: The AWS managed aws/secretsmanager key cannot be used for cross-account secret access.

    BWhy not this: An identity permission cannot make the AWS managed key usable for cross-account secret decryption.

    CWhy this is right: A customer managed key and appropriately scoped secret, key, and identity policies authorize cross-account retrieval.

    DWhy not this: Cross-account access also requires a resource policy on the secret permitting the external role.

    Cross-account retrieval requires authorization for both the secret and its encryption key, including permissions in the caller's account. The AWS managed aws/secretsmanager key cannot support this cross-account access; a customer managed key is required.

    Open this question