추적이란 지정한 S3 버킷에 이벤트를 로그 파일로 입력할 수 있도록 하는 구성입니다. CloudTrail 로그 파일에는 하나 이상의 로그 항목이 포함될 수 있습니다. 이벤트는 모든 소스의 단일 요청을 나타내며 요청된 작업, 작업 날짜와 시간, 요청 파라미터 등에 대한 정보를 포함하고 있습니다. CloudTrail 로그 파일은 퍼블릭 API 직접 호출에 대한 순서 지정된 스택 추적이 아니기 때문에 특정 순서로 표시되지 않습니다.
참고
중요한 정보를 보호하기 위해 CodeBuild 로그에 다음 항목이 숨겨져 있습니다.
-
AWS액세스 키 ID: 자세한 내용은 AWS Identity and Access Management 사용 설명서에서 IAM 사용자의 액세스 키 관리를 참조하세요.
-
파라미터 스토어를 사용하여 지정된 문자열입니다. 자세한 내용은 Amazon EC2 Systems Manager 사용 설명서의 Systems Manager Parameter Store 및 Systems Manager Parameter Store 콘솔 연습을 참조하세요.
-
AWS Secrets Manager을 사용하여 지정한 문자열입니다. 자세한 내용은 키 관리 단원을 참조하십시오.
다음은 CodeBuild에서 빌드 프로젝트 만들기 작업을 보여 주는 CloudTrail 로그 항목의 예입니다.
{
"eventVersion": "1.05",
"userIdentity": {
"type": "FederatedUser",
"principalId": "account-ID
:user-name
",
"arn": "arn:aws:sts::account-ID
:federated-user/user-name
",
"accountId": "account-ID
",
"accessKeyId": "access-key-ID
",
"sessionContext": {
"attributes": {
"mfaAuthenticated": "false",
"creationDate": "2016-09-06T17:59:10Z"
},
"sessionIssuer": {
"type": "IAMUser",
"principalId": "access-key-ID
",
"arn": "arn:aws:iam::account-ID
:user/user-name
",
"accountId": "account-ID
",
"userName": "user-name
"
}
}
},
"eventTime": "2016-09-06T17:59:11Z",
"eventSource": "codebuild.amazonaws.com",
"eventName": "CreateProject",
"awsRegion": "region-ID
",
"sourceIPAddress": "127.0.0.1",
"userAgent": "user-agent
",
"requestParameters": {
"awsActId": "account-ID
"
},
"responseElements": {
"project": {
"environment": {
"image": "image-ID",
"computeType": "BUILD_GENERAL1_SMALL",
"type": "LINUX_CONTAINER",
"environmentVariables": []
},
"name": "codebuild-demo-project",
"description": "This is my demo project",
"arn": "arn:aws:codebuild:region-ID
:account-ID
:project/codebuild-demo-project:project-ID
",
"encryptionKey": "arn:aws:kms:region-ID
:key-ID
",
"timeoutInMinutes": 10,
"artifacts": {
"location": "arn:aws:s3:::codebuild-region-ID
-account-ID
-output-bucket",
"type": "S3",
"packaging": "ZIP",
"outputName": "MyOutputArtifact.zip"
},
"serviceRole": "arn:aws:iam::account-ID
:role/CodeBuildServiceRole",
"lastModified": "Sep 6, 2016 10:59:11 AM",
"source": {
"type": "GITHUB",
"location": "https://github.com/my-repo.git"
},
"created": "Sep 6, 2016 10:59:11 AM"
}
},
"requestID": "9d32b228-745b-11e6-98bb-23b67EXAMPLE",
"eventID": "581f7dd1-8d2e-40b0-aeee-0dbf7EXAMPLE",
"eventType": "AwsApiCall",
"recipientAccountId": "account-ID
"
}