View a markdown version of this page

StartAnalysisLogExport - AWS Clean Rooms

StartAnalysisLogExport

Starts an export of the Apache Spark logs for a protected query to an Amazon S3 bucket that you own. Use the exported logs to diagnose a query that failed or that ran more slowly than you expected.

AWS Clean Rooms exports a redacted copy of the Spark logs instead of the raw logs. Analyze the exported logs with the tooling of your choice, such as Spark History Server. For details about what the exported logs contain, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs-contents.html.

The export runs asynchronously and returns with a status of IN_PROGRESS. Call GetAnalysisLogExport to poll for the final status.

Important

To use this operation, you must have the CAN_EXPORT_QUERY_ANALYSIS_LOG ability for your membership. You must also be the query runner or the query payer. Having the ability alone is not sufficient.

The query must have reached a terminal state, and it must have reached the execution stage. A query that failed validation or that was canceled before it started produces no Spark logs.

Log export isn't supported for queries that use differential privacy, and isn't supported for PySpark jobs.

The destination bucket must be in the same AWS Region as the collaboration. Cross-Region export isn't supported.

For more information, see https://docs.aws.amazon.com/clean-rooms/latest/userguide/export-analysis-logs.html.

Request Syntax

POST /memberships/membershipIdentifier/analysislogexports HTTP/1.1 Content-type: application/json { "analysisId": "string", "analysisType": "string", "resultConfiguration": { "outputConfiguration": { "s3": { "bucket": "string", "keyPrefix": "string" } } } }

URI Request Parameters

The request uses the following URI parameters.

membershipIdentifier

A unique identifier for the membership to export the analysis logs for. Currently accepts a membership ID.

Length Constraints: Fixed length of 36.

Pattern: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Required: Yes

Request Body

The request accepts the following data in JSON format.

analysisId

The unique identifier of the protected query that you want to export the analysis logs for.

Type: String

Length Constraints: Fixed length of 36.

Pattern: [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Required: Yes

analysisType

The type of analysis that the logs are exported for. Currently, only PROTECTED_QUERY is supported.

Type: String

Valid Values: PROTECTED_QUERY

Required: Yes

resultConfiguration

The details needed to write the exported analysis logs.

You don't need to create an IAM role for log export. AWS Clean Rooms writes the exported logs using your own identity, so AWS Clean Rooms writes the exported logs only where your existing permissions allow.

Type: AnalysisLogExportResultConfiguration object

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "analysisLogExport": { "analysisId": "string", "analysisLogExportId": "string", "analysisType": "string", "createTime": number, "error": { "code": "string", "message": "string" }, "membershipId": "string", "resultConfiguration": { "outputConfiguration": { "s3": { "bucket": "string", "keyPrefix": "string" } } }, "status": "string", "updateTime": number } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

analysisLogExport

The analysis log export that was started. The status is IN_PROGRESS.

Type: AnalysisLogExport object

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

Caller does not have sufficient access to perform this action.

reason

A reason code for the exception.

HTTP Status Code: 403

InternalServerException

Unexpected error during processing of request.

HTTP Status Code: 500

ResourceNotFoundException

Request references a resource which does not exist.

resourceId

The Id of the missing resource.

resourceType

The type of the missing resource.

HTTP Status Code: 404

ServiceQuotaExceededException

Request denied because service quota has been exceeded.

quotaName

The name of the quota.

quotaValue

The value of the quota.

HTTP Status Code: 402

ThrottlingException

Request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the specified constraints.

fieldList

Validation errors for specific input parameters.

reason

A reason code for the exception.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: