Skip to content

fix(ec2): support KMS encryption in SSM terminal sessions - #8841

Open
mrelgie88 wants to merge 1 commit into
aws:masterfrom
mrelgie88:fix/ec2-ssm-kms-terminal
Open

fix(ec2): support KMS encryption in SSM terminal sessions#8841
mrelgie88 wants to merge 1 commit into
aws:masterfrom
mrelgie88:fix/ec2-ssm-kms-terminal

Conversation

@mrelgie88

Copy link
Copy Markdown

Problem:

EC2 Open Terminal invokes session-manager-plugin using its legacy argument format. When Session Manager KMS encryption is enabled, the plugin rejects the encryption handshake and reports that the installed CLI does not support encryption.

Solution:

  • Use the complete modern session-manager-plugin invocation.
  • Pass the StartSession target and effective SSM endpoint.
  • Supply the Toolkit's resolved credentials to the plugin environment.
  • Preserve the underlying terminal startup error for troubleshooting.
  • Add unit coverage for the modern plugin argument format.

Testing:

  • Core TypeScript compilation passes.
  • Core webpack build completes.
  • Focused EC2 tests pass: 18 passing, 1 platform-specific test pending on Windows.
  • Verified locally through the Extension Development Host on Windows.
  • Verified EC2 Open Terminal with Standard_Stream and a nonempty kmsKeyId.
  • Verified commands execute successfully in the encrypted terminal.
  • Verified closing the terminal terminates the SSM session.

Fixes #8840


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@amazon-inspector-ohio

Copy link
Copy Markdown

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-ohio

Copy link
Copy Markdown

✅ I finished the code review, and didn't find any security or code quality issues.

@mrelgie88
mrelgie88 marked this pull request as ready for review July 28, 2026 13:33
@mrelgie88
mrelgie88 requested a review from a team July 28, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EC2 Open Terminal fails when Session Manager KMS encryption is enabled

1 participant