nerdexam
Amazon

SCS-C02 · Question #415

A company wants to remove all SSH keys permanently from a specific subset of its Amazon Linux 2 Amazon EC2 instances that are using the same IAM instance profile. However, three individuals who have I

The correct answer is C. Assign an IAM policy to the instance profile to allow the EC2 instances to be managed by AWS. Option C is correct because AWS Systems Manager (SSM) Session Manager enables keyless SSH-like access, but it requires a two-sided policy setup: the EC2 instance profile must have the AmazonSSMManagedInstanceCore policy so SSM can manage the instance, AND the IAM users must have

Submitted by jaden.t· Mar 6, 2026Identity and Access Management

Question

A company wants to remove all SSH keys permanently from a specific subset of its Amazon Linux 2 Amazon EC2 instances that are using the same IAM instance profile. However, three individuals who have IAM user accounts will need to access these instances by using an SSH session to perform critical duties. How can a security engineer provide the access to meet these requirements?

Options

  • AAssign an IAM policy to the instance profile to allow the EC2 instances to be managed by AWS
  • BAssign an IAM policy to the IAM user accounts to provide permission to use AWS Systems
  • CAssign an IAM policy to the instance profile to allow the EC2 instances to be managed by AWS
  • DAssign an IAM policy to the IAM user accounts to provide permission to use the EC2 service in

How the community answered

(16 responses)
  • A
    13% (2)
  • C
    81% (13)
  • D
    6% (1)

Explanation

Option C is correct because AWS Systems Manager (SSM) Session Manager enables keyless SSH-like access, but it requires a two-sided policy setup: the EC2 instance profile must have the AmazonSSMManagedInstanceCore policy so SSM can manage the instance, AND the IAM users must have ssm:StartSession (and related) permissions to initiate sessions - C is the only option that addresses both sides simultaneously.

Option A fails because it only grants the instance profile SSM access without giving the three IAM users permission to actually start sessions. Option B fails for the opposite reason - granting users SSM permissions without the instance profile policy means SSM cannot communicate with the instances at all. Option D is a distractor that grants EC2 console access, which has nothing to do with enabling keyless SSH; direct EC2 access still requires SSH keys.

Memory tip: Think of SSM Session Manager as a door with two locks - the instance profile is the key on the server side (lets SSM in), and the IAM user policy is the key on the user side (lets users connect). You must unlock both, which is exactly what C does.

Topics

#SSM Session Manager#IAM Instance Profiles#IAM Policies#EC2 Access Management

Community Discussion

No community discussion yet for this question.

Full SCS-C02 Practice