Study guide

6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect

AWS Certified Security – Specialty SCS-C03

Track your progress as you read

Finished sections get a check mark.

1 Chapter 0: Getting Started with the SCS-C03 Exam

0.1 SCS-C03 Exam Format, Domains & Study Strategy

2 Chapter 1: Security Monitoring, Alerting & Threat Detection Services

1.1 Workload Monitoring & Health Check Strategies 1.2 Amazon GuardDuty Architecture & Finding Types 1.3 AWS Security Hub & Automated Conformance Assessment 1.4 Amazon Macie & Automated Data Classification

3 Chapter 2: Enterprise Logging Architecture & Analysis

2.1 Multi-Account CloudTrail & Organization Trails 2.2 Amazon Security Lake & OCSF Log Normalization 2.3 Network Telemetry: VPC Flow Logs & Route 53 Resolver Logs 2.4 Troubleshooting Security Telemetry & Log Ingestion 2.5 Analyzing, Normalizing & Correlating Security Logs

4 Chapter 3: Incident Readiness, Response Planning & Automated Runbooks

3.1 Incident Response Planning & Blast Radius Mitigation 3.2 Testing & Validating Incident Response Plans 3.3 Automated Incident Remediation with EventBridge & Step Functions 3.4 Systems Manager OpsCenter & Incident Manager Runbooks

5 Chapter 4: Digital Forensics, Evidence Preservation & Root Cause Analysis

4.1 Forensic Artifact Capture & Chain of Custody 4.2 Threat Containment & Network Quarantine Techniques 4.3 Correlating Events & Root Cause Analysis with Amazon Detective

6 Chapter 5: Edge Protection, WAF & DDoS Mitigation

5.1 CloudFront Security Headers & Origin Access Control 5.2 AWS WAF Architecture & Advanced Rule Sets 5.3 AWS Shield Advanced & DDoS Defense Architectures 5.4 Edge Integrations: Managed Rule Groups, OCSF Ingestion, IoT Policies & CORS

7 Chapter 6: Compute Workload Hardening, Vulnerability Management & GenAI Security

6.1 Golden AMIs & Container Image Hardening Pipelines 6.2 Amazon Inspector Vulnerability Management & Patch Automation 6.3 Generative AI Security: Amazon Bedrock Guardrails & Model Protection 6.4 Instance Profiles, Service Roles & Execution Roles for Compute 6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect

8 Chapter 7: Network Security, Segmentation, Private Connectivity & Encryption in Transit

7.1 Layered Traffic Filtering: SGs, NACLs & AWS Network Firewall 7.2 Hybrid Connectivity Security: VPN, Direct Connect & MACsec 7.3 Zero-Trust Access & Network Access Analysis 7.4 Enforcing Encryption in Transit: ELB Security Policies, TLS & HTTPS-Only Access 7.5 Private Access: VPC Endpoints, PrivateLink, Client VPN & Verified Access 7.6 Inter-Resource Encryption in Transit: Nitro, EMR, EKS & SageMaker AI

9 Chapter 8: Enterprise Authentication, Federation & Directory Services

8.1 AWS IAM Identity Center & Enterprise IdP Integration 8.2 Amazon Cognito User Pools & Identity Pools 8.3 AWS Security Token Service (STS) & Temporary Credential Workflows 8.4 Troubleshooting Identity & Authentication Failures

10 Chapter 9: Advanced Authorization Architecture & Policy Evaluation

9.1 Complete AWS Policy Evaluation Logic & Decision Flow 9.2 Permission Boundaries & Safe Admin Delegation 9.3 Attribute-Based Access Control (ABAC) with IAM Tags

11 Chapter 10: Least Privilege, Policy Validation & External Access Auditing

10.1 IAM Roles Anywhere & Amazon Verified Permissions 10.2 Auditing External & Unused Access with IAM Access Analyzer 10.3 Analyzing Authorization Failures & Policy Simulation

12 Chapter 11: Cryptographic Services: KMS Architecture & Key Governance

11.1 AWS KMS Architecture, Key Policies & Key Types 11.2 KMS Grants, Encryption Context & Multi-Region Keys 11.3 Imported Key Material (BYOK) & CloudHSM Key Stores

13 Chapter 12: Secrets Management, Sensitive Data Masking & PKI

12.1 AWS Secrets Manager & Systems Manager Parameter Store 12.2 Sensitive Data Masking in Telemetry & Messaging 12.3 AWS Certificate Manager (ACM) & Private CA Architecture

14 Chapter 13: Storage Encryption, Integrity, Lifecycle & Backup Protection

13.1 S3 Encryption Modes & S3 Bucket Keys 13.2 Data Integrity Protection: Object Lock, Vault Lock & Code Signing 13.3 Secure Data Lifecycle, Cross-Account Replication & Backup Vault Lock 13.4 Lifecycle, Backup & Secure Replication Beyond S3: EFS, FSx, DLM, DataSync & Air-Gapped Vaults

15 Chapter 14: Multi-Account Architecture, Organizations & Control Tower Governance

14.1 AWS Organizations Structure, Hierarchy & Resource Control 14.2 AWS Control Tower Landing Zone & Guardrail Framework 14.3 Delegated Administrator Architecture & Root User Governance 14.4 Centralized Resource Sharing with RAM & Service Catalog

16 Chapter 15: Compliance Automation, Infrastructure as Code Security & Auditing

15.1 Infrastructure as Code Security & Multi-Account Deployment 15.2 AWS Config, Conformance Packs & Automated Remediation 15.3 Audit Evidence Collection & Well-Architected Security Reviews

6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect

Key Takeaways Explain This Topic AI

Session Manager needs the SSM Agent, instance permissions (instance profile or Default Host Management Configuration), and outbound HTTPS or VPC endpoints, but no inbound ports.

IAM conditions such as ssm:resourceTag limit which instances a user can open sessions to, and CloudTrail records every StartSession call.

Session preferences add KMS encryption, CloudWatch Logs or S3 session logging, an idle timeout of 1–60 minutes (default 20), and Run As users.

EC2 Instance Connect places a one-time SSH public key in instance metadata for 60 seconds; the ec2:osuser condition key limits the OS user.

EC2 Instance Connect Endpoints provide SSH or RDP to private instances, restricted by the remotePort, privateIpAddress, and maxTunnelDuration condition keys.

Last updated: September 2026

6.5 Secure Administrative Access: Session Manager & EC2 Instance Connect

Administrators still need shells on instances to troubleshoot, patch, and investigate. Skill 3.2.5 tests how you provide that access without inbound SSH or RDP from the internet, without long-lived SSH keys, and with every session tied to an IAM identity and logged . The two services named in the exam guide are AWS Systems Manager Session Manager and EC2 Instance Connect .

AWS Systems Manager Session Manager

Session Manager opens an interactive shell (or a port-forwarding tunnel) through the SSM Agent , which makes outbound HTTPS (443) connections to Systems Manager. The instance needs no inbound ports, no public IP address, no bastion host, and no SSH keys .

Requirements

SSM Agent installed and running (preinstalled on Amazon Linux, Ubuntu Server, and Windows Server AMIs from AWS).

Instance permissions : an instance profile with the AmazonSSMManagedInstanceCore managed policy, or the account-level Default Host Management Configuration , which gives instances Systems Manager permissions without an instance profile (IMDSv2 required).

Network path : outbound HTTPS to the Systems Manager endpoints. For instances in private subnets without a NAT gateway, create interface VPC endpoints for ssm and ssmmessages (older SSM Agent versions also use ec2messages ), plus kms if sessions are KMS-encrypted and logs or an S3 gateway endpoint for session logging.

Controlling Who Can Start Sessions

IAM decides who can open a session to which instance. A common pattern allows sessions only to instances tagged for the user's team and only with approved session documents: {

  • "Effect": "Allow",
  • "Action": "ssm:StartSession",
  • "Resource": "arn:aws:ec2:us-east-1:111122223333:instance/*",
  • "Condition": {
  • "StringEquals": { "ssm:resourceTag/Team": "payments" },
  • "BoolIfExists": { "ssm:SessionDocumentAccessCheck": "true" }
  • }
  • }

Grant ssm:TerminateSession and ssm:ResumeSession only for the user's own sessions by matching the session's owner, so one administrator can't take over another's session.

Session Preferences (Account and Region Settings)

Setting Security Purpose

KMS encryption Encrypts session data between the client and the instance with a customer managed key, in addition to TLS

  • Session logging Streams or uploads session output to CloudWatch Logs or an encrypted S3 bucket
  • Idle session timeout Ends inactive sessions after 1–60 minutes (default 20)
  • Maximum session duration Caps a session's total length

Run As (Linux) Starts sessions as a named OS user (for example, from an SSMSessionRunAs tag on the IAM principal) instead of the default ssm-user

Shell profile Runs commands at session start, such as setting a warning banner

CloudTrail records every StartSession , TerminateSession , and ResumeSession call, so each session is attributable to an IAM principal even when many people share an OS account.

Port Forwarding and SSH Through Session Manager

AWS-StartPortForwardingSession forwards a local port to a port on the instance (for example, RDP on 3389).

AWS-StartPortForwardingSessionToRemoteHost uses the instance as a jump host to a private endpoint, such as an Amazon RDS database, without exposing the database.

AWS-StartSSHSession tunnels SSH through Session Manager; restrict it if you want only audited shell sessions, because SSH tunneling can bypass session logging.

EC2 Instance Connect

EC2 Instance Connect keeps SSH but removes long-lived keys. An authorized user calls ec2-instance-connect:SendSSHPublicKey , which places a one-time public key in instance metadata for 60 seconds ; the user must connect with the matching private key within that window. IAM can restrict the OS user with the ec2:osuser condition key and restrict instances by tag. The instance needs the EC2 Instance Connect package (included in Amazon Linux 2, Amazon Linux 2023, and Ubuntu AMIs).

Connecting from the console to a public instance requires the security group to allow SSH from the EC2 Instance Connect service's IP address range for the Region.

EC2 Instance Connect Endpoint (EICE)

An EC2 Instance Connect Endpoint reaches instances in private subnets over SSH (22) or RDP (3389) without public IP addresses, internet gateways, or bastion hosts. You create the endpoint in a subnet with its own security group, and the instance's security group allows traffic from the endpoint's security group. Users call ec2-instance-connect:OpenTunnel , which IAM can restrict with the condition keys ec2-instance-connect:remotePort , ec2-instance-connect:privateIpAddress , and ec2-instance-connect:maxTunnelDuration (up to 3,600 seconds).

Choosing an Approach

  • Requirement Best Fit
  • No inbound ports at all, full session transcripts Session Manager
  • Teams require native SSH tooling but no stored keys EC2 Instance Connect

SSH or RDP to private instances without a bastion or public IP EC2 Instance Connect Endpoint (or Session Manager)

  • Private access to an RDS database for an administrator Session Manager port forwarding to a remote host
  • Windows GUI access through the console Fleet Manager remote desktop, which uses Session Manager

Emergency OS-level recovery when networking is broken EC2 serial console (disabled by default at the account level; enable only for break-glass use)

Specialty Exam Pitfalls

Opening port 22 to 0.0.0.0/0 "for Session Manager" : Session Manager needs no inbound rules; outbound HTTPS is enough.

Private subnet with no path to Systems Manager : Without a NAT gateway or interface endpoints, the instance never registers and sessions fail.

Unencrypted or missing session logs : Configure KMS encryption and logging in Session Manager preferences to meet audit requirements.

Shared SSH keys on a bastion : Replace them with Session Manager or EC2 Instance Connect so each session maps to an IAM identity.

Loading diagram... Keyless, Audited Administrative Access Paths