I tried installing Kiro CLI on EC2 (Amazon Linux 2023)

I tried installing Kiro CLI on EC2 (Amazon Linux 2023)

I installed Kiro CLI on an EC2 with Amazon Linux 2023 environment and verified AWS operations using IAM role permissions.
2025.11.18

This page has been translated by machine translation. View original

On November 18, 2025, Kiro CLI was released.

Recently, I had the opportunity to install Kiro CLI on an Amazon Linux 2023 EC2 environment, which I'd like to introduce.

Environment

EC2

  • AMI: ami-0e68e34976bb4db93
  • Description: Amazon Linux 2023 AMI 2023.9.20251110.1 x86_64 HVM kernel-6.1.

I used an EC2 with x86_64 architecture.

IAM

  • The IAM role has AmazonSSMManagedInstanceCore and ReadOnlyAccess policies attached.
    • arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
    • arn:aws:iam::aws:policy/ReadOnlyAccess

OS user

Client

I installed the Remote SSH extension on VSCode and used it as an SSH client to connect to the EC2.

https://dev.classmethod.jp/articles/install-extention-remote-ssh-in-vscode-connect-ec2-ja/

Installation

I followed the installation procedure from the Kiro CLI official page, using the "With a zip file" method.

https://kiro.dev/docs/cli/installation/#with-a-zip-file

Standard version (glibc 2.34+), Linux x86-64

curl --proto '=https' --tlsv1.2 -sSf 'https://desktop-release.q.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip' -o 'kirocli.zip'

As of November 18, 2025, when extracting the downloaded ZIP file, the README stated "To install the Amazon Q CLI run the install.sh script".

$ unzip kirocli.zip 
Archive:  kirocli.zip
   creating: q/
  inflating: q/install.sh            
  inflating: q/README                
  inflating: q/BUILD-INFO            
   creating: q/bin/
  inflating: q/bin/q                 
  inflating: q/bin/qterm             
  inflating: q/bin/qchat      

I performed the installation of the traditional Q Developer CLI.

./q/install.sh

$ ./q/install.sh            
✔ Do you want q to modify your shell config (you will have to manually do this otherwise)? · Yes
✔ Select login method · Use with Pro license
✔ Enter Start URL · https://d-****.awsapps.com/start
✔ Enter Region · ap-northeast-1

Confirm the following code in the browser
Code: ****-****

Open this URL: https://d-****.awsapps.com/start/#/device?user_code=****-****

I registered the license using Q Developer Pro that was already registered with IAM Identity Center.

https://dev.classmethod.jp/articles/amazon-q-developer-pro-member-account/

After logging in with SSO ID, password, and MFA, I confirmed the authentication request.

Authentication requested

I granted permission to access Kiro.

Allow access

Request approved

Update

The update to kiro-cli was performed using the q update operation.

$ q update
████████████████████████████████████████████████████████████████████████ 100/100

The CLI version was 1.20.0.

$ kiro-cli --version
kiro-cli 1.20.0
$ kiro-cli
⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀     ⢀⣴⣶⣶⣦⡀⠀⠀⠀⢀⣴⣶⣦⣄⡀⠀⠀⢀⣴⣶⣶⣦⡀⠀⠀⢀⣴⣶⣶⣶⣶⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣶⣶⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀    ⢰⣿⠋⠁⠈⠙⣿⡆⠀⢀⣾⡿⠁⠀⠈⢻⡆⢰⣿⠋⠁⠈⠙⣿⡆⢰⣿⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠻⣦⠀⠀⠀⠀⣴⡿⠟⠋⠁⠀⠀⠀⠈⠙⠻⢿⣦⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⣿⣇⣴⡿⠋⠀⠀⠀⢀⣼⠇⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢠⣤⣤⣤⣤⣄⠀⠀⠀⠀⣿⡆⠀⠀⣼⡟⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⢻⣧⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⣿⡿⠋⠀⠀⠀⢀⣾⡿⠁⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢸⣿⠉⠉⠉⣿⡇⠀⠀⠀⣿⡇⠀⣼⡟⠀⠀⠀⣰⡿⠟⠛⠻⢿⣆⠀⠀⠀⢻⣧⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⠙⠁⠀⠀⢀⣼⡟⠁⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⢸⣿⣶⣶⡶⠋⠀⠀⠀⠀⣿⠇⢰⣿⠀⠀⠀⢰⣿⠀⠀⠀⠀⠀⣿⡆⠀⠀⠀⣿⡆
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣼⠟⠀⢸⣿⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⣿⡇
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⠀⣠⡀⠀⠀⠹⣷⡄⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣤⣄⠀⠀⠀⠀⠹⣿⡅⠀⠀⠸⣿⠀⠀⠀⠸⣿⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⣿⠇
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⣾⡟⣷⡀⠀⠀⠘⣿⣆⠀⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡟⣷⡀⠀⠀⠀⠘⣿⣆⠀⠀⢻⣧⠀⠀⠀⠹⣷⣦⣤⣤⣾⠏⠀⠀⠀⣼⡟
⠀⠀⠀⠀⠀⠀⠀    ⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠈⢻⡇⠀⢸⣿⠀⠀⠀⠀⣿⡇⢸⣿⠀⠀⠀⠀⣿⡇⠹⣷⡀⠀⠀⠀⠈⢻⡇⠀⠀⢻⣧⠀⠀⠀⠀⠉⠉⠉⠀⠀⠀⠀⣼⡟
⠀⠀⠀⠀⠀⠀⠀    ⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⢀⣼⠇⠀⠸⣿⣄⡀⢀⣠⣿⠇⠸⣿⣄⡀⢀⣠⣿⠇⠀⠙⣷⡀⠀⠀⢀⣼⠇⠀⠀⠀⠻⣷⣦⣄⡀⠀⠀⠀⢀⣠⣴⣾⠟
⠀⠀⠀⠀⠀⠀⠀    ⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠈⠻⠿⠿⠟⠁⠀⠀⠀⠀⠀⠈⠙⠻⠿⠿⠿⠿⠟⠋⠁

╭─────────────────────────────── Did you know? ────────────────────────────────╮
│                                                                              │
│     You can see the server load status as well as any warnings or errors     │
│                             associated with /mcp                             │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Model: Auto (/model to change)

After updating to kiro-cli, the q command is still available, but it displays a notice encouraging the use of kiro-cli.

$ q
Warning! Q CLI is now Kiro CLI and should be invoked as kiro-cli rather than q

Functionality Test

I tested the following prompt to see if it could retrieve information about the EC2 instance environment:

Use instance metadata to identify this EC2 instance ID.
Then use CLI to retrieve EC2 instance information.

For all confirmations asking Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:, I selected trust (t).

Execution log:

> EC2インスタンスのメタデータからインスタンスIDを取得し、その情報を確認します。
I will run the following command: curl -s http://169.254.169.254/latest/meta-data/instance-id (using tool: shell)
Purpose: インスタンスメタデータからインスタンスIDを取得

Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:

> t

 - Completed in 0.6s

> メタデータサービスから応答がありませんでした。IMDSv2を使用してトークンベースでアクセスしてみます
。
I will run the following command: TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600" 2>/dev/null) && curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null || echo "メタデータサービスにアクセスできません" (using tool: shell)
Purpose: IMDSv2でトークンを取得してインスタンスIDを確認

i-****
 - Completed in 0.11s

> インスタンスIDが取得できました: i-****

次に、このインスタンスの詳細情報をAWS CLIで取得します。
I will run the following command: TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") && curl -s -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/placement/region (using tool: shell)
Purpose: リージョン情報を取得

ap-northeast-1
 - Completed in 0.11s

Running aws cli command (using tool: aws):

Service name: ec2
Operation name: describe-instances
Parameters: 
- instance-ids: ["i-****"]
Region: ap-northeast-1
Label: EC2インスタンス情報を取得
Allow this action? Use 't' to trust (always allow) this tool for the session. [y/n/t]:

> t

 - Completed in 1.503s

> EC2インスタンス情報を取得しました。

## インスタンス概要

- **インスタンスID**: i-****
- **インスタンスタイプ**: c7i-flex.large
- **状態**: running
- **リージョン**: ap-northeast-1 (東京)
- **アベイラビリティゾーン**: ap-northeast-1c
- **AMI ID**: ami-****
- **起動時刻**: 2025-11-**T**:**:**+00:00

## ネットワーク情報

- **パブリックIP**: 3.**.**.**
- **プライベートIP**: 172.31.**.**
- **VPC ID**: vpc-****
- **サブネットID**: subnet-****
- **セキュリティグループ**: sg-**** (***)

## その他の設定

- **IAMロール**: ec2-***-***
- **キーペア**: ***
- **EBS最適化**: 有効
- **メタデータサービス**: IMDSv2 (HttpTokens: required)
- **ルートデバイス**: /dev/xvda (EBS)
- **プラットフォーム**: Linux/UNIX
 ▸ Time: 33s

It successfully retrieved the instance metadata using IMDSv2 to identify the instance ID, and then retrieved EC2 information using the ReadOnlyAccess policy attached to the EC2.

> EC2インスタンス i-*** の EBS容量とEBSスナップショットの消費状況を教えて

> EBSボリュームとスナップショットの情報を取得します。

Running aws cli command (using tool: aws):

Service name: ec2
Operation name: describe-volumes
Parameters: 
- filters: [{"Name":"attachment.instance-id","Values":["i-***"]}]
Region: ap-northeast-1
Label: インスタンスにアタッチされているEBSボリューム情報を取得Running aws cli command (using tool: aws):

Service name: ec2
Operation name: describe-snapshots
Parameters: 
- owner-ids: ["self"]
Region: ap-northeast-1
Label: アカウント内の全スナップショット情報を取得 - Completed in 0.664s

 - Completed in 0.638s

> ## EBS容量

ボリュームID: vol-***
- **サイズ**: 12 GB
- **タイプ**: gp3
- **IOPS**: 3000
- **スループット**: 125 MB/s
- **状態**: in-use (アタッチ済み)
- **デバイス名**: /dev/xvda
- **暗号化**: なし

## EBSスナップショット消費状況

このインスタンスのボリューム (vol-***) から作成されたスナップショットが2つあります:

### スナップショット1
- **スナップショットID**: snap-***
- **作成日時**: 2025-11-16T22:35:53
- **完了日時**: 2025-11-16T22:40:02
- **実際の消費容量**: 4.82 GB (5,177,868,288 bytes)
- **ボリュームサイズ**: 12 GB
- **説明**: AMI作成用 (ami-09aaa6f09d0ded2ee)

### スナップショット2
- **スナップショットID**: snap-***
- **作成日時**: 2025-11-17T22:30:30
- **完了日時**: 2025-11-17T22:32:54
- **実際の消費容量**: 5.60 GB (6,015,156,224 bytes)
- **ボリュームサイズ**: 12 GB
- **説明**: AMI作成用 (ami-07ac17310d6c6f5c7)

### 合計スナップショット消費容量
約 10.42 GB (実際に使用されているブロックのみ)

スナップショットは増分バックアップのため、実際の課金は重複しないブロックのみです。2つのスナップショ
ットの合計実容量は約10.42GBですが、増分の仕組みにより実際の課金額はこれより少なくなる可能性がありま
す。
 ▸ Time: 17s

I asked about the actual billing amount:

> 実際の課金額は換算できる?

> EBSスナップショットの課金は増分バックアップの仕組みで複雑なため、正確な金額を計算するにはAWS Cost
Explorerやスナップショット間の実際の差分データを確認する必要があります。

現時点で分かっている情報から概算を出してみます:
Running aws cli command (using tool: aws):

Service name: ec2
Operation name: get-snapshot-block-public-access-state
Parameters: 
Region: ap-northeast-1
Label: スナップショットのストレージ情報確認 - Completed in 0.565s

> ## EBS料金の概算

### 東京リージョン (ap-northeast-1) の料金 (2025年11月時点)

EBSボリューム (gp3)
- 12 GB × $0.096/GB/月 = $1.152/月

EBSスナップショット (標準階層)
- スナップショット料金: $0.05/GB/月

スナップショットは増分バックアップのため、実際の課金対象は:
- 1つ目のスナップショット: 4.82 GB (全データ)
- 2つ目のスナップショット: 差分のみ (5.60 GB - 4.82 GB = 0.78 GB程度と推定)

推定スナップショット容量: 約 5.6 GB
- 5.6 GB × $0.05/GB/月 = $0.28/月

### 合計月額概算
- **EBSボリューム**: $1.152
- **スナップショット**: $0.28
- **合計**: 約 $1.43/月 (約 ¥215/月、1ドル=150円換算)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

注意点:
- スナップショットの実際の差分容量は、2つのスナップショット間で変更されたブロックのみです
- 正確な課金額は AWS Cost Explorer や請求ダッシュボードで確認できます
- 料金は変動する可能性があるため、最新の料金は AWS Pricing Calculator (https://calculator.aws) で確
認してください
 ▸ Time: 16s

Summary

While Kiro CLI can be installed on local machines like Mac or Windows, installing it on an EC2 allows you to use Kiro CLI with the IAM role permissions attached to the EC2 instance.

Additionally, by using VSCode's SSH extension, you can edit files and input Japanese prompts smoothly, just like on your local PC.

VScode screen

In local development environments, managing runtimes like Node.js and Python with their dependencies can be challenging, but with an EC2-based development environment, rebuilding the environment is much easier.

When evaluating Kiro CLI's features, I recommend trying it in an SSH-accessible EC2 environment.

Share this article

FacebookHatena blogX

Related articles