Amazon Macie とは

S3 に保存されたデータから機密情報を自動検出するセキュリティサービス

出典: Amazon Macie features

“Amazon Macie is a data security service that discovers sensitive data using machine learning and pattern matching, provides visibility into data security risks, and enables you to automate protection against those risks.”

機械学習とパターンマッチングを使って機密データを検出し、リスクの可視化と保護の自動化を実現する


何をするサービスか

Macie は大きく2つのことを行う

1. S3 バケットのセキュリティ評価

出典: Amazon Macie features

“Macie continually evaluates your S3 buckets for security and access controls, and generates findings to notify you of issues such as unencrypted buckets, publicly accessible buckets, and buckets that are shared with AWS accounts outside your organization.”

S3 バケットの設定を継続的にチェックし、以下のような問題を検出する:

  • 暗号化されていないバケット
  • 公開アクセス可能なバケット
  • 組織外のアカウントと共有されているバケット

2. 機密データの検出

出典: Amazon Macie features

“Macie then automatically samples and analyzes objects in your S3 buckets, inspecting them for sensitive data such as personally identifiable information (PII), builds an interactive data map of where your sensitive data in S3 resides across accounts, and provides a sensitivity score for each bucket.”

S3 オブジェクトの中身を分析し、個人情報(PII)などの機密データがどこにあるかを特定する


どうやって機密データを見つけるか

Macie は「このパターンに一致するデータは機密データ」というルールに基づいて検出する

出典: Using managed data identifiers

“Amazon Macie uses a combination of criteria and techniques, including machine learning and pattern matching, to detect sensitive data in Amazon Simple Storage Service (Amazon S3) objects.”

例えば:

  • 16桁の数字でチェックサムが一致 → クレジットカード番号
  • 特定のパターンの英数字 → AWS シークレットキー
  • 特定の形式の番号 → パスポート番号

このルールを「データ識別子」と呼ぶ

AWS が用意したルール(マネージドデータ識別子)

出典: Using managed data identifiers

“Macie can detect the following categories of sensitive data by using managed data identifiers: Credentials, for credentials data such as private keys and AWS secret access keys. Financial information, for financial data such as credit card numbers and bank account numbers. Personal information, for PHI such as health insurance and medical identification numbers, and PII such as driver’s license identification numbers and passport numbers.”

AWS があらかじめ用意している検出ルール:

  • 認証情報: 秘密鍵、AWS シークレットアクセスキー
  • 金融情報: クレジットカード番号、銀行口座番号
  • 個人情報: 健康保険番号、運転免許証番号、パスポート番号

自分で作るルール(カスタムデータ識別子)

出典: Discovering sensitive data with Macie

“Custom data identifiers – These are custom criteria that you define to detect sensitive data. Each custom data identifier specifies a regular expression (regex) that defines a text pattern to match.”

正規表現で独自のパターンを定義できる。例えば:

  • 社員番号(EMP-XXXXX 形式)
  • 顧客 ID(独自フォーマット)

検出のタイミング

出典: Discovering sensitive data with Macie

“You can do this in two ways: by configuring Macie to perform automated sensitive data discovery, and by creating and running sensitive data discovery jobs.”

方法説明
自動検出Macie が毎日自動でサンプリング分析
検出ジョブユーザーが対象と頻度を指定して実行

検出結果はどうなるか

出典: Amazon Macie features

“All Macie findings are sent to Amazon EventBridge and can also be published to AWS Security Hub to initiate automated remediation such as blocking public access to your S3 storage.”

検出結果は:

  • Amazon EventBridge に送信 → 自動処理のトリガーに使える
  • AWS Security Hub に公開 → 他のセキュリティ情報と統合管理

例: 公開バケットを検出 → EventBridge → Lambda → 自動でパブリックアクセスをブロック


ユースケース

出典: Amazon Macie features

“Running targeted sensitive data discovery jobs can help you meet regulations, such as Health Insurance Portability and Accountability Act (HIPAA) and General Data Privacy Regulation (GDPR).”

  • HIPAA、GDPR などの規制対応
  • 「うちの S3 に個人情報が入ってないか」の棚卸し
  • 設定ミスで公開されているバケットの発見