Can't open terminal to ECS container, "KMSEncryption failed"
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
I tried to open terminal of ECS container via vscode instead of using iTerm terminal with manually typing.
But I could see following issue when I did. Could anyone let me know why this is happening?
## Steps to reproduce the issue
1. Go to ECS -> Cluster -> Service -> Container
2. Click on 'Open terminal' of the container selected
3. See error

This error showed up shortly that AWS CLI doesn't support Session Manager encryption feature.
Even though I could connect to the container by using AWS CLI on terminal in my macos like following,
```
aws ecs execute-command --cluster {{ cluster name }} \
--task {{task id}} \
--container {{container name}} \
--interactive \
--command "/bin/sh" --profile=myprofile
```
my version of aws cli is
```
❯ aws --version
aws-cli/2.13.14 Python/3.11.5 Darwin/22.5.0 source/arm64 prompt/off
```
## Expected behavior
Open terminal of the container I selected
## System details (run the `AWS: About Toolkit` command)
- OS: Ventura 13.4.1 (Darwin Eddy-Mac-M2.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 arm64)
- Visual Studio Code version: 1.84.0
- AWS Toolkit version: v1.97.0
Contributor guide
Research direction
No source file or test is named in the issue. Reproduce the ECS container terminal flow from the listed steps, compare it with the working AWS CLI command, and investigate the reported KMSEncryption failure around Session Manager encryption. Done means the selected container opens a terminal through VS Code under the reported setup, or the issue is documented with a confirmed limitation and actionable error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript, vscode
- Domain
- cli, cloud, devops, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100