AWS DevOps Agent GA — CDK / SDK / CloudFormation の対応状況まとめ

記事タイトルとURLをコピーする

はじめに

2026年3月31日、以前にAWS re:Invent 2025で発表されたAWS DevOps Agentの一般公開開始(GA)しました。 本記事ではCDK・SDK・CloudFormationに焦点を当てて、どんな変更が入ったかを紹介します。

この記事のポイント

  • GA で @aws-sdk/client-devops-agent と AWS CLI aws devops-agent が正式公開。Preview 時代にできなかった SDK 経由の操作が解禁された
  • CloudFormation(CDK L1)で MCP Server 登録が自動化可能に。CfnAssociation の MCPServer タイプが GA で追加
  • CDK L2 は @aws-cdk/aws-bedrock-agentcore-alpha が alpha のまま。DevOps Agent 専用の L2 Construct は存在しない

この記事のスコープ

AWS DevOps Agent の GA に伴う変更点全体(IAM 設定変更、料金体系、リージョン拡大など)については別記事「AWS DevOps Agent が GA — 料金・新機能・移行ポイントまとめ」でまとめています。この記事では CDK / SDK / CloudFormation の対応状況 に絞って、「何が自動化できるようになったのか」「何がまだ手動なのか」を整理します。

SDK: @aws-sdk/client-devops-agent が正式公開

Preview 期間中は DevOps Agent 専用の SDK パッケージが公開されておらず、マネジメントコンソールからの手動操作が必須でした。GA でようやく SDK が正式公開され、プログラマティックな操作が可能になっています。

npm install @aws-sdk/client-devops-agent

主要なオペレーションを用途別に分類するとこうなります。

用途 オペレーション
Agent Space 管理 CreateAgentSpaceCommand
サービス連携 RegisterServiceCommand, AssociateServiceCommand
Operator App 管理 EnableOperatorAppCommand, DisableOperatorAppCommand, UpdateOperatorAppIdpConfigCommand
チャット・メッセージ CreateChatCommand, SendMessageCommand(ストリーミング対応)
タスク・実行管理 CreateBacklogTaskCommand, ListExecutionsCommand
調査・推奨 ListJournalRecordsCommand, GetRecommendationCommand
Webhook ListWebhooksCommand
接続・検証 CreatePrivateConnectionCommand, ValidateAwsAssociationsCommand
タグ TagResourceCommand, UntagResourceCommand

AWS CLI も aws devops-agent サブコマンドとして正式利用可能になりました。Preview 時代は非公開エンドポイントを指定する必要がありましたが、GA 後はそのまま使えます。

# Agent Space の一覧を取得
aws devops-agent list-agent-spaces

# サービスの一覧を取得
aws devops-agent list-services

TypeScript からの使用例はこんな感じです。

import { DevOpsAgentClient, ListAgentSpacesCommand } from '@aws-sdk/client-devops-agent';

const client = new DevOpsAgentClient({ region: 'ap-northeast-1' });
const response = await client.send(new ListAgentSpacesCommand({}));
console.log(response.agentSpaceSummaries);

手動で行っていた Webhook 作成や Operator App の有効化を、デプロイスクリプトに組み込めるようになったのは大きな改善です。

CloudFormation / CDK L1 の対応状況

DevOps Agent 固有のリソースは aws-cdk-lib/aws-devopsagent で L1 Construct(CloudFormation リソースの薄いラッパー)として利用できます。

L1 Construct CloudFormation リソース 用途 CDK L1 対応
CfnAgentSpace AWS::DevOpsAgent::AgentSpace Agent Space の定義
CfnAssociation AWS::DevOpsAgent::Association サービス関連付け
CfnService AWS::DevOpsAgent::Service サービス登録

3 つとも aws-cdk-lib/aws-devopsagent に L1 Construct として収録されています。

GA で変わったポイント: MCP Server 登録の CDK 自動化

GA 前の Preview 環境では、MCP Server の登録はコンソールからの手動操作が必須でした。GA で AWS::DevOpsAgent::Service が追加され、CloudFormation / CDK で MCP Server 登録を自動化できるようになっています。

import * as devopsagent from 'aws-cdk-lib/aws-devopsagent';

// Agent Space の定義
const agentSpace = new devopsagent.CfnAgentSpace(this, 'AgentSpace', {
  name: 'my-agent-space',
});

// サービス(MCP Server)の登録
const mcpService = new devopsagent.CfnService(this, 'McpService', {
  serviceType: 'mcpserver',
  serviceDetails: {
    mcpServer: {
      name: 'my-mcp-server',
      endpoint: 'https://mcp-server.example.com/mcp',
      description: 'MCP Server の説明',
      authorizationConfig: {
        oauthClientCredentials: {
          clientId: 'your-client-id',
          clientSecret: 'your-client-secret',
          exchangeUrl: 'https://auth.example.com/oauth2/token',
          scopes: ['scope1', 'scope2'],
        },
      },
    },
  },
});

// Agent Space とサービスの関連付け
new devopsagent.CfnAssociation(this, 'McpAssociation', {
  agentSpaceId: agentSpace.attrAgentSpaceId,
  serviceId: mcpService.attrServiceId,
  configuration: {
    mcpServer: {
      name: 'my-mcp-server',
      endpoint: 'https://mcp-server.example.com/mcp',
      tools: ['tool-name'],
    },
  },
});

L1 Construct なのでプロパティ名は camelCase です。最新のプロパティ定義は CloudFormation リファレンス を確認してください。

Preview 時代に「MCP Server の登録だけ手動で、CDK スタックと別管理になる」という状態が解消され、IaC で一元管理できるようになりました。

CDK L2 alpha の状況

「L2 Construct(高レベルの抽象化)はないの?」という点についても整理します。

現時点で関連するのは @aws-cdk/aws-bedrock-agentcore-alpha パッケージです。ただし、これは DevOps Agent 専用の L2 ではなく、AgentCore 基盤用 のパッケージです。AgentCore は DevOps Agent が利用する基盤インフラ(Gateway、Runtime、Memory、Browser、Code Interpreter)を提供するレイヤーで、DevOps Agent はその上に構築されたサービスという位置づけになります。

npm install @aws-cdk/aws-bedrock-agentcore-alpha
# 執筆時点(2026年4月)の最新: v2.248.0-alpha.0

DevOps Agent に関連する主要なコンストラクトは Gateway です。

import * as agentcore from '@aws-cdk/aws-bedrock-agentcore-alpha';

// Gateway の作成(MCP プロトコル、Cognito 認証がデフォルト)
const gateway = new agentcore.Gateway(this, 'Gateway', {
  gatewayName: 'my-gateway',
  protocolConfiguration: agentcore.GatewayProtocol.usingMcp({
    searchType: agentcore.McpGatewaySearchType.SEMANTIC,
  }),
});

// GA で追加されたメソッド: MCP Server ターゲット
gateway.addMcpServerTarget('MyMcpServer', {
  mcpServerUrl: 'https://mcp-server.example.com/sse',
  credentialProviderConfigurations: [
    agentcore.GatewayCredentialProvider.fromOauthIdentityArn({
      oauthCredentialProviderArn: 'arn:aws:bedrock-agentcore:...:credentialprovider/...',
    }),
  ],
});

※ 上記コードは執筆時点(v2.248.0-alpha.0)の API に基づいています。alpha パッケージのため API が変更される可能性があります。

GA で addMcpServerTarget()addApiGatewayTarget() が追加され、Gateway 経由の MCP Server 接続を L2 レベルで定義できるようになりました。認証方式も OAuth2、Cognito、JWT、IAM に対応しています。

alpha パッケージの注意点

パッケージ名に alpha とある通り、stable 昇格のアナウンスは出ていません。

  • Breaking Change が入る可能性がある
  • package.json でバージョンを固定しておくのが無難
  • 万が一 Breaking Change が来ても、L1(CloudFormation)にフォールバックできる

まとめ: 何が自動化できて何がまだ手動か

Preview → GA での自動化レベルの変化をまとめます。

# 設定項目 Preview GA 後 自動化レベル
1 Agent Space の作成 L1 CFn L1 CFn(変更なし) CDK 自動化可
2 IAM Role / Policy L2 stable L2 stable(ポリシー名変更あり) CDK 自動化可
3 MCP Server 登録 手動必須 CDK L1 対応CfnService で定義可能) CDK 自動化可(GA で解禁)
4 Webhook の作成 手動必須 SDK 公開済み SDK 経由で可能
5 Operator App 管理 手動必須 SDK 公開済み SDK 経由で可能
6 AgentCore Gateway L2 alpha L2 alpha(メソッド追加) CDK 自動化可

ポイントをまとめると:

  • CDK だけで完結するもの: Agent Space 作成、IAM、MCP Server 登録(CfnService)、AgentCore Gateway
  • SDK / CLI でスクリプト化できるもの: Webhook 作成、Operator App 管理
  • CDK L2 で対応を待ちたいもの: Webhook、Operator App(現状は L1 または SDK でカバー)

GA によって「Preview 時代に手動必須だった MCP Server 登録」が CfnService で CDK 自動化できるようになったのが最大の改善点です。Webhook と Operator App 管理も SDK が公開されたことでスクリプト化は可能になりましたが、CDK L2 での宣言的な管理にはまだ対応していません。

L2 alpha パッケージの stable 昇格は未定ですが、L1 で十分カバーできる範囲なので、まずは L1 ベースで IaC を整備しておくのが現実的です。

参考リンク

越後 元貴 (記事一覧)

アプリケーションサービス本部ディベロップメントサービス4課

2023年新卒入社