DynamoDBはリージョンサービスの為、資格情報とインターネット接続環境があればどこからでも操作可能です。
監査等でデータイベントの記録を取得する要件もあると思いますので、CloudTrailでのログ記録の設定手順を記載します。
https://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/logging-using-cloudtrail.html
CloudTrailの証跡作成手順はAws/CloudTrail/証跡の作成を参照してください。
[ { "name": "", "fieldSelectors": [ { "field": "eventCategory", "equals": [ "Data" ] }, { "field": "resources.type", "equals": [ "AWS::DynamoDB::Table" ] } ] } ]
[ { "name": "", "fieldSelectors": [ { "field": "eventCategory", "equals": [ "Data" ] }, { "field": "resources.type", "equals": [ "AWS::DynamoDB::Table" ] }, { "field": "resources.ARN", "equals": [ "arn:aws:dynamodb:ap-northeast-1:{アカウントID}:table/{Table名}" ] } ] } ]
例では、[Scan][GetItem][PutItem][DeleteItem]を対象としています。
[ { "name": "", "fieldSelectors": [ { "field": "eventCategory", "equals": [ "Data" ] }, { "field": "resources.type", "equals": [ "AWS::DynamoDB::Table" ] }, { "field": "eventName", "equals": [ "DeleteItem", "Scan", "GetItem", "PutItem" ] } ] } ]
{ "Records": [ { "eventVersion": "1.08", "userIdentity": { "type": "IAMUser", "principalId": "AIXCEWSFXSWQDVHCOX32D", "arn": "arn:aws:iam::{アカウントID}:user/{ユーザー名}", "accountId": "{アカウントID}", "accessKeyId": "{アクセスキー}", "userName": "{ユーザー名}", "sessionContext": { "attributes": { "creationDate": "2021-05-23T03:28:58Z", "mfaAuthenticated": "false" } } }, "eventTime": "2021-05-23T04:08:14Z", "eventSource": "dynamodb.amazonaws.com", "eventName": "DeleteItem", "awsRegion": "ap-northeast-1", "sourceIPAddress": "{IPアドレス}", "userAgent": "aws-internal/3 aws-sdk-java/1.11.1005 Linux/5.4.109-57.183.amzn2int.x86_64 OpenJDK_64-Bit_Server_VM/25.292-b10 java/1.8.0_292 vendor/Oracle_Corporation cfg/retry-mode/legacy", "requestParameters": { "tableName": "{テーブル名}", "key": { "SensorID": "tokyo", "DeviceID": "001" } }, "responseElements": null, "requestID": "QBRJP4PRL7VHE3UVGD8CIK10DNVV4KQNSO5AEMVJF66Q9ASUAAJG", "eventID": "6b9c78ad-5564-4a9b-aaa1-fae09259f0fb", "readOnly": false, "resources": [ { "accountId": "{アカウントID}", "type": "AWS::DynamoDB::Table", "ARN": "arn:aws:dynamodb:ap-northeast-1:{アカウントID}:table/{テーブル名}" } ], "eventType": "AwsApiCall", "apiVersion": "2012-08-10", "managementEvent": false, "recipientAccountId": "{アカウントID}", "eventCategory": "Data" } ] }