AWS CloudTrail 로그 파일 항목 분석 - Amazon EKS

이 페이지 개선에 도움 주기

이 사용자 가이드에 기여하려면 모든 페이지의 오른쪽 창에 있는 GitHub에서 이 페이지 편집 링크를 선택합니다.

AWS CloudTrail 로그 파일 항목 분석

추적이란 지정한 Amazon S3 버킷에 이벤트를 로그 파일로 입력할 수 있게 하는 구성입니다. CloudTrail 로그 파일에는 하나 이상의 로그 항목이 포함될 수 있습니다. 이벤트는 모든 소스로부터의 단일 요청을 나타내며 요청 작업에 대한 정보가 들어 있습니다. 여기에는 작업 날짜와 시간, 사용된 요청 파라미터에 대한 정보가 들어 있습니다. CloudTrail 로그 파일은 퍼블릭 API 호출에 대한 순서가 지정된 스택 추적이 아니므로 특정 순서로 표시되지 않습니다.

다음은 CreateCluster 작업을 보여 주는 CloudTrail 로그 항목이 나타낸 예제입니다.

{ "eventVersion": "1.05", "userIdentity": { "type": "IAMUser", "principalId": "AKIAIOSFODNN7EXAMPLE", "arn": "arn:aws:iam::111122223333:user/username", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "username" }, "eventTime": "2018-05-28T19:16:43Z", "eventSource": "eks.amazonaws.com", "eventName": "CreateCluster", "awsRegion": "region-code", "sourceIPAddress": "205.251.233.178", "userAgent": "PostmanRuntime/6.4.0", "requestParameters": { "resourcesVpcConfig": { "subnetIds": [ "subnet-a670c2df", "subnet-4f8c5004" ] }, "roleArn": "arn:aws:iam::111122223333:role/AWSServiceRoleForAmazonEKS-CAC1G1VH3ZKZ", "clusterName": "test" }, "responseElements": { "cluster": { "clusterName": "test", "status": "CREATING", "createdAt": 1527535003.208, "certificateAuthority": {}, "arn": "arn:aws:eks:region-code:111122223333:cluster/test", "roleArn": "arn:aws:iam::111122223333:role/AWSServiceRoleForAmazonEKS-CAC1G1VH3ZKZ", "version": "1.10", "resourcesVpcConfig": { "securityGroupIds": [], "vpcId": "vpc-21277358", "subnetIds": [ "subnet-a670c2df", "subnet-4f8c5004" ] } } }, "requestID": "a7a0735d-62ab-11e8-9f79-81ce5b2b7d37", "eventID": "eab22523-174a-499c-9dd6-91e7be3ff8e3", "readOnly": false, "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }

Amazon EKS 서비스 연결 역할에 대한 로그 항목

Amazon EKS 서비스 연결 역할은 AWS 리소스에 대한 API 호출을 수행합니다. Amazon EKS 서비스 연결 역할에서 수행한 호출의 경우 CloudTrail 로그 항목에 username: AWSServiceRoleForAmazonEKSusername: AWSServiceRoleForAmazonEKSNodegroup이 표시됩니다. Amazon EKS 및 서비스 연결 역할에 대한 자세한 내용은 Amazon EKS에 대해 서비스 연결 역할 사용 섹션을 참조하세요.

다음 예에서는 sessionContext에 표시된 AWSServiceRoleForAmazonEKSNodegroup 서비스 연결 역할에서 생성된 DeleteInstanceProfile 작업을 보여주는 CloudTrail 로그 항목을 표시합니다.

{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "AROA3WHGPEZ7SJ2CW55C5:EKS", "arn": "arn:aws:sts::111122223333:assumed-role/AWSServiceRoleForAmazonEKSNodegroup/EKS", "accountId": "111122223333", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROA3WHGPEZ7SJ2CW55C5", "arn": "arn:aws:iam::111122223333:role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup", "accountId": "111122223333", "userName": "AWSServiceRoleForAmazonEKSNodegroup" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2020-02-26T00:56:33Z" } }, "invokedBy": "eks-nodegroup.amazonaws.com" }, "eventTime": "2020-02-26T00:56:34Z", "eventSource": "iam.amazonaws.com", "eventName": "DeleteInstanceProfile", "awsRegion": "region-code", "sourceIPAddress": "eks-nodegroup.amazonaws.com", "userAgent": "eks-nodegroup.amazonaws.com", "requestParameters": { "instanceProfileName": "eks-11111111-2222-3333-4444-abcdef123456" }, "responseElements": null, "requestID": "11111111-2222-3333-4444-abcdef123456", "eventID": "11111111-2222-3333-4444-abcdef123456", "eventType": "AwsApiCall", "recipientAccountId": "111122223333" }