[小ネタ] AWS Resource Groups のリソースグループは自動作成されることがある

[小ネタ] AWS Resource Groups のリソースグループは自動作成されることがある

2026.10.08

What are resource groups? - AWS Resource Groups

You can use resource groups to organize your AWS resources. AWS Resource Groups is the service that lets you manage and automate tasks on large numbers of resources at one time.

AWS では複数のリソースをリソースグループとして整理することができます。
例えば、特定のタグが付与されたリソースを 1 つのグループとして整理できます。

今回は明示的にリソースグループを作成していなくても自動的にリソースグループが作成されることがあるという挙動を紹介します。

結論

  • CloudFormation スタックをデプロイするとリソースグループが自動作成される場合がある
  • Systems Manager Application Manager の利用と関連性がある可能性がある

検証

VPC を作成するだけの以下の CloudFormation テンプレートで CloudFormation スタックをデプロイします。

AWSTemplateFormatVersion: "2010-09-09"

Resources:
  VPC:
    Type: AWS::EC2::VPC
    Properties:
      CidrBlock: 10.0.0.0/16

デプロイ完了後、リソースグループに AppManager-CFN-test というグループが追加されていました。

CloudTrail にも CreateGroup が記録されていました。

CreateGroup
{
  "eventVersion": "1.11",
  "userIdentity": {
    "type": "AssumedRole",
    "principalId": "xxx:xxx",
    "arn": "arn:aws:sts::012345678901:assumed-role/xxx/xxx",
    "accountId": "012345678901",
    "accessKeyId": "xxx",
    "sessionContext": {
      "sessionIssuer": {
        "type": "Role",
        "principalId": "xxx",
        "arn": "arn:aws:iam::012345678901:role/xxx",
        "accountId": "012345678901",
        "userName": "xxx"
      },
      "attributes": {
        "creationDate": "2026-10-07T22:46:44Z",
        "mfaAuthenticated": "true"
      }
    }
  },
  "eventTime": "2026-10-07T23:15:24Z",
  "eventSource": "resource-groups.amazonaws.com",
  "eventName": "CreateGroup",
  "awsRegion": "ap-northeast-1",
  "sourceIPAddress": "xxx",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.0.0 Safari/537.36",
  "requestParameters": {
    "Description": "Auto-generated by AWS Systems Manager Application Manager for CloudFormation resource test",
    "Name": "AppManager-CFN-test",
    "ResourceQuery": {
      "Type": "CLOUDFORMATION_STACK_1_0",
      "Query": "{\"ResourceTypeFilters\":[\"AWS::AllSupported\"],\"StackIdentifier\":\"arn:aws:cloudformation:ap-northeast-1:172454386805:stack/test/3b54ed90-c2a5-11f1-97cd-061a959880b9\"}"
    }
  },
  "responseElements": {
    "Group": {
      "GroupArn": "arn:aws:resource-groups:ap-northeast-1:012345678901:group/AppManager-CFN-test",
      "Name": "AppManager-CFN-test",
      "Description": "Auto-generated by AWS Systems Manager Application Manager for CloudFormation resource test",
      "OwnerId": "012345678901"
    },
    "ResourceQuery": {
      "Type": "CLOUDFORMATION_STACK_1_0",
      "Query": "{\"ResourceTypeFilters\":[\"AWS::AllSupported\"],\"StackIdentifier\":\"arn:aws:cloudformation:ap-northeast-1:172454386805:stack/test/3b54ed90-c2a5-11f1-97cd-061a959880b9\"}"
    }
  },
  "requestID": "75f508dd-e988-44fb-8695-811bfdf0fafb",
  "eventID": "36fd96aa-8722-4092-8afb-536ac96f2ac6",
  "readOnly": false,
  "eventType": "AwsApiCall",
  "managementEvent": true,
  "recipientAccountId": "012345678901",
  "eventCategory": "Management",
  "tlsDetails": {
    "tlsVersion": "TLSv1.3",
    "cipherSuite": "TLS_AES_128_GCM_SHA256"
  },
  "sessionCredentialFromConsole": "true"
}

グループの説明には以下の通り Systems Manager Application Manager によって自動作成された旨が記載されています。

Auto-generated by AWS Systems Manager Application Manager for CloudFormation resource test

そこで、Systems Manager Application Manager を確認したところ、test というアプリケーションが自動作成されていました。

Application Manager がリソースグループを自動的にインポートする旨についてはドキュメントに記載されていました。
しかしながら、CloudFormation スタックのデプロイによってリソースグループを自動的に作成する点については確認できませんでした。
関連サービスのセットアップ - AWS Systems Manager

Application Manager は、すべてのリソースグループを自動的にインポートし、カスタムアプリケーションカテゴリに表示します。

ここまでの検証で Application Manager が関与していることがわかったので、Application Manager を利用できない状態でのデプロイも検証してみました。

今回検証したアカウントの東京リージョンでは Application Manager を使用できましたが、大阪リージョンでは以下の画面が表示されており Application Manager を使用できない状況でした。

この状況で CloudFormation スタックをデプロイしてみましたが、リソースグループは作成されませんでした。

以上より、Application Manager の利用可否によってリソースグループの自動作成の有無も変わる点を確認できました。
ただし、ドキュメントに明記がないため動作の保証ができない点についてはご注意ください。

まとめ

今回は AWS Resource Groups のリソースグループは自動作成されることがあるという内容を紹介しました。
どなたかの参考になれば幸いです。

参考資料

この記事をシェアする

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

関連記事