I Tried Out Kiro Crew on an Amazon Linux 2023 EC2 Instance

I Tried Out Kiro Crew on an Amazon Linux 2023 EC2 Instance

I ran Kiro Crew on Amazon EC2 with Amazon Linux 2023 and used its Dashboard from a local browser via an SSH tunnel. Covers CloudFormation setup, model selection, and chat response checks.
2026.08.05

This page has been translated by machine translation. View original

Introduction

Kiro Crew was announced on the official blog on August 4, 2026 (local time).
https://kiro.dev/blog/introducing-kiro-crew/

For installation on macOS and Slack integration, please see Iwasa's article.
https://dev.classmethod.jp/articles/kiro-crew/

This article introduces installing Kiro CLI and Kiro Crew on an Amazon Linux 2023 EC2 instance, starting the Gateway, and using the Dashboard via an SSH tunnel.

Verification

Verification Environment

The verification was performed in the following environment.

Item Value
EC2 instance type t3a.medium
Architecture x86_64
OS Amazon Linux 2023
Region ap-northeast-1
kiro-cli 2.16.1
kirocrew 0.1.2
Build method CloudFormation (IAM stack + EC2 stack)

The full CloudFormation templates are included in the reproduction information at the end. They are for x86_64 t3a.medium.

Setting Up Kiro Crew on an Amazon Linux 2023 EC2 Instance

Deploy the IAM stack and then the EC2 stack with CloudFormation.

export AWS_REGION=ap-northeast-1
export KEY_NAME=<EC2_KEY_PAIR_NAME>
export IAM_STACK_NAME=kirocrew-iam
export EC2_STACK_NAME=kirocrew

aws cloudformation deploy \
  --region "$AWS_REGION" \
  --template-file kirocrew-iam.yaml \
  --stack-name "$IAM_STACK_NAME" \
  --capabilities CAPABILITY_NAMED_IAM

aws cloudformation deploy \
  --region "$AWS_REGION" \
  --template-file kirocrew-ec2.yaml \
  --stack-name "$EC2_STACK_NAME" \
  --parameter-overrides \
    KeyName="$KEY_NAME" \
    IamStackName="$IAM_STACK_NAME"

After the installation of kiro-cli and kirocrew finishes via the EC2 UserData, log in over SSH.

Log in to Kiro CLI

kiro-cli login

Enter your organization's Start URL and region, then approve the device code in the browser to log in. Note that the Start URL, device code, and authentication URL are not shown here.

The procedure for signing in with IAM Identity Center is introduced in the article below.
https://dev.classmethod.jp/articles/kiro-iam-identity-center-user-signin-setup-202605/

Initial Setup of Kiro Crew

kirocrew setup

This time I used the default workspace. I skipped Slack integration and launching on AWS, and specified Asia/Tokyo for the timezone. The flow of the interaction is as follows.

Interaction log of kirocrew setup
Kiro Crew Setup 👻

── Workspace Directory ──
Default: /home/ec2-user/workplace/kirocrew-workspace
Workspace path [/home/ec2-user/workplace/kirocrew-workspace]:
✅ Workspace: /home/ec2-user/workplace/kirocrew-workspace

Installing agent config...
✅ Agent installed: /home/ec2-user/.kiro/agents/kirocrew.json

── Slack Credentials ──
Configure Slack tokens? [Y/n]: n
⏭ Skipped. Slack integration will be disabled.

── Slash Command ──
Slash command name [kirocrew]:
✅ Slash command: /kirocrew

── Timezone ──
IANA timezone (e.g. America/Los_Angeles): Asia/Tokyo
✅ Timezone saved: Asia/Tokyo

── Run on AWS (optional) ──
Launch KiroCrew on AWS now? [y/N]: n
⏭ Skipped. Launch later: kirocrew cloud launch

👻 Done! Try: kirocrew doctor && kirocrew gateway

I completed the Kiro CLI login and the initial setup of Kiro Crew.

Starting the Gateway and Connecting via an SSH Tunnel

Start the Gateway on the EC2 instance.

kirocrew gateway
Startup log of kirocrew gateway
👻 Kiro Crew gateway starting…

⚠️  Do not enter sensitive, secret, or regulated data into KiroCrew.
   Treat anything you send as potentially logged or processed by the
   configured model provider.

👻 Dashboard: ssh -NL 5476:localhost:5476 <EC2_HOST>
             then open http://localhost:5476?token=<GATEWAY_TOKEN>
👻 Run 24/7: see docs/remote-desktop-setup.md for systemd service setup
👻 Headless remote session — skipping browser auto-open
ss -ltnp | grep ':5476'

The Gateway was listening on 127.0.0.1:5476. I will use the Dashboard URL in the form http://localhost:5476?token=<GATEWAY_TOKEN> shown at startup later.

ssh -N -L 45476:127.0.0.1:5476 ec2-user@<EC2_HOST>

The local 45476 is a free port I used during verification. If 45476 is in use, substitute any free port, and change the port number in the URL opened in the browser to the same value.

With the SSH tunnel established, change the port number of the Dashboard URL to 45476. Open http://localhost:45476?token=<GATEWAY_TOKEN> in the local browser.

Dashboard Sessions screen

I was able to display the Dashboard in the local browser.

Running a Chat from the Dashboard

I opened the model selection UI in a session.

Model selection screen

I was able to choose from the list of available models.

I asked the agent in the session about the OS and architecture it was running on.

Response to the question about OS information

The response showed Amazon Linux 2023 and x86_64.

I asked it to check the caller's credentials with STS.

Response to the STS check request

I was able to confirm the STS caller using the temporary credentials of the instance profile.

Summary

I started Kiro Crew on an Amazon Linux 2023 EC2 instance and was able to use the Dashboard from a local browser via an SSH tunnel.

By installing Kiro Crew on EC2, you can treat the EC2 instance as a sandbox dedicated to the agent. The impact of commands executed by the agent stays within the instance and does not reach your local machine. When you are done trying it out, you can clean up the whole environment just by deleting the stacks. Even when having the agent operate AWS APIs, you can use the temporary credentials of the instance profile as they are.

For light workloads such as chatting from the Dashboard, Kiro Crew ran on a t3a.medium. If you want to try Kiro Crew first, give running it on EC2 a try.

References

Reproduction Information

kirocrew-iam.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: KiroCrew IAM - EC2 Instance Profile with SSM access

Resources:
  KiroCrewRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName: !Sub '${AWS::StackName}-role'
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: ec2.amazonaws.com
            Action: sts:AssumeRole
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore

  KiroCrewInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Roles:
        - !Ref KiroCrewRole

Outputs:
  InstanceProfileName:
    Value: !Ref KiroCrewInstanceProfile
    Export:
      Name: !Sub '${AWS::StackName}-instance-profile'
  RoleName:
    Value: !Ref KiroCrewRole
    Export:
      Name: !Sub '${AWS::StackName}-role'
kirocrew-ec2.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: KiroCrew EC2 - x86_64 / AL2023 / kiro-cli + kirocrew auto-install

Parameters:
  KeyName:
    Type: AWS::EC2::KeyPair::KeyName
    Default: m4mini
    Description: EC2 キーペア名
  IamStackName:
    Type: String
    Default: kirocrew-iam
    Description: IAM スタック名(InstanceProfile のエクスポート元)

Resources:
  KiroCrewSG:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: !Sub '${AWS::StackName} - SSH only'
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 22
          ToPort: 22
          CidrIp: 0.0.0.0/0

  KiroCrewInstance:
    Type: AWS::EC2::Instance
    DeletionPolicy: Delete
    UpdateReplacePolicy: Delete
    Properties:
      InstanceType: t3a.medium
      ImageId: !Sub '{{resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64}}'
      KeyName: !Ref KeyName
      IamInstanceProfile: !ImportValue
        Fn::Sub: '${IamStackName}-instance-profile'
      SecurityGroupIds:
        - !Ref KiroCrewSG
      MetadataOptions:
        HttpTokens: required
        HttpEndpoint: enabled
      BlockDeviceMappings:
        - DeviceName: /dev/xvda
          Ebs:
            VolumeSize: 20
            VolumeType: gp3
            Encrypted: true
            DeleteOnTermination: true
      Tags:
        - Key: Name
          Value: !Sub '${AWS::StackName}'
      UserData:
        Fn::Base64: !Sub |
          #!/bin/bash
          set -euo pipefail
          LOG="/var/log/kirocrew-setup.log"
          exec > >(tee -a "$LOG") 2>&1
          echo "===== KiroCrew setup started: $(date) ====="

          # ---- 1. /tmp 拡張 ----
          mount -o remount,size=2G /tmp
          echo "[1/6] /tmp 拡張: $(df -h /tmp | tail -1 | awk '{print $4}') 空き"

          # ---- 2. スワップ 1GB ----
          fallocate -l 1G /swapfile
          chmod 600 /swapfile
          mkswap /swapfile
          swapon /swapfile
          echo '/swapfile none swap sw 0 0' >> /etc/fstab
          echo "[2/6] スワップ完了: $(swapon --show --noheadings)"

          # ---- 3. システムパッケージ ----
          dnf install -y python3.11 python3.11-pip nodejs npm git unzip
          echo "[3/6] パッケージ完了"

          # ---- 4. kiro-cli インストール (ec2-user) ----
          sudo -u ec2-user bash << 'EOF'
          set -euo pipefail
          export HOME=/home/ec2-user
          echo "[4/6] kiro-cli インストール中..."
          KIRO_CLI_SKIP_SETUP=1 bash <(curl -fsSL https://cli.kiro.dev/install) <<< "y"
          echo "[4/6] kiro-cli 完了: $(ls $HOME/.local/bin/kiro* | tr '\n' ' ')"
          EOF

          # ---- 5. kirocrew インストール (ec2-user) ----
          sudo -u ec2-user bash << 'EOF'
          set -euo pipefail
          export HOME=/home/ec2-user
          echo "[5/6] kirocrew インストール中..."
          curl -fsSL https://download.crew.kiro.dev/cli.sh | sh
          echo "[5/6] kirocrew 完了: $($HOME/.local/bin/kirocrew --version 2>/dev/null || echo installed)"
          EOF

          # ---- 6. PATH (.bashrc) ----
          sudo -u ec2-user bash -c \
            "grep -q '\.local/bin' ~/.bashrc || echo 'export PATH=\"\$HOME/.local/bin:\$PATH\"' >> ~/.bashrc"
          echo "[6/6] .bashrc 更新完了"

          echo "===== KiroCrew setup finished: $(date) ====="
          echo "KIROCREW_SETUP_DONE" > /tmp/kirocrew-setup-done

Outputs:
  InstanceId:
    Value: !Ref KiroCrewInstance
  PublicIp:
    Value: !GetAtt KiroCrewInstance.PublicIp
  SSMConnect:
    Value: !Sub 'aws ssm start-session --target ${KiroCrewInstance} --region ${AWS::Region}'
  SSHConnect:
    Value: !Sub 'ssh -i ~/.ssh/${KeyName}.pem ec2-user@${KiroCrewInstance.PublicIp}'
  NextStep:
    Value: 'kirocrew setup && kirocrew config set agent.allow_unsandboxed_exec true && kirocrew gateway'

Share this article

AWSのお困り事はクラスメソッドへ