# Amazon CloudWatch Logs API

> Amazon CloudWatch Logs API on Apizie: 48 endpoints (Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch…, Cancels the specified export task. The task must be in the PENDING or RUNNING state., Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When…, Creates a log group with the specified name. You can create up to 20,000 log groups per account. You must…, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/cloud:amazonaws-logs/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `cloud:amazonaws-logs`
- Category: Cloud
- Status: byok
- Source: https://github.com/mermade/aws2openapi
- Page: https://zieapi.vercel.app/api/cloud/amazonaws-logs
- OpenAPI: https://zieapi.vercel.app/api/cloud/amazonaws-logs/openapi.json

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, CloudTrail, and other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch…

## Endpoints

### Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/associate-kms-key` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Cancels the specified export task. The task must be in the PENDING or RUNNING state.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/cancel-export-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/create-export-task` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates a log group with the specified name. You can create up to 20,000 log groups per account. You must…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/create-log-group` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates a log stream for the specified log group. A log stream is a sequence of log events that originate…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/create-log-stream` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes a CloudWatch Logs account policy. To use this operation, you must be signed on with the…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-account-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the data protection policy from the specified log group. For more information about data protection…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-data-protection-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified destination, and eventually disables all the subscription filters that publish to it.…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-destination` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified log group and permanently deletes all the archived log events associated with the log…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-log-group` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified log stream and permanently deletes all the archived log events associated with the log…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-log-stream` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified metric filter.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-metric-filter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-query-definition` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes a resource policy from this account. This revokes the access of the identities in that policy to put…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-resource-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified retention policy. Log events do not expire if they belong to log groups without a…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-retention-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Deletes the specified subscription filter.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/delete-subscription-filter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Returns a list of all CloudWatch Logs account policies in the account.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-account-policies` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists all your destinations. The results are ASCII-sorted by destination name.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-destinations` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Lists the specified export tasks. You can list all your export tasks or filter the results based on task ID…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-export-tasks` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists the specified log groups. You can list all your log groups or filter the results by prefix. The…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-log-groups` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Lists the log streams for the specified log group. You can list all the log streams or filter the results by…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-log-streams` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Lists the specified metric filters. You can list all of the metric filters or filter the results by log…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-metric-filters` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Returns a list of CloudWatch Logs Insights queries that are scheduled, running, or have been run recently in…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-queries` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### This operation returns a paginated list of your saved CloudWatch Logs Insights query definitions. You can…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-query-definitions` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists the resource policies in this account.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-resource-policies` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists the subscription filters for the specified log group. You can list all the subscription filters or…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/describe-subscription-filters` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Disassociates the specified KMS key from the specified log group or from all CloudWatch Logs Insights query…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/disassociate-kms-key` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists log events from the specified log group. You can list all the log events or filter the results using a…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/filter-log-events` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Returns information about a log group data protection policy.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/get-data-protection-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Lists log events from the specified log stream. You can list all of the log events or filter using a time…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/get-log-events` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| limit | string | no | Pagination limit |
| nextToken | string | no | Pagination token |
| body | object | no | JSON request body |

### Returns a list of the fields that are included in log events in the specified log group. Includes the…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/get-log-group-fields` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Retrieves all of the fields and values of a single log event. All fields are retrieved, even if the original…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/get-log-record` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Returns the results from the specified query. Only the fields requested in the query are returned, along…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/get-query-results` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Displays the tags associated with a CloudWatch Logs resource. Currently, log groups and destinations support…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/list-tags-for-resource` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates an account-level data protection policy that applies to all log groups in the account. A data…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-account-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates a data protection policy for the specified log group. A data protection policy can help safeguard…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-data-protection-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates a destination. This operation is used only to create destinations for cross-account…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-destination` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates an access policy associated with an existing destination. An access policy is an IAM…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-destination-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Uploads a batch of log events to the specified log stream. The sequence token is now ignored in PutLogEvents…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-log-events` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates a metric filter and associates it with the specified log group. With metric filters, you…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-metric-filter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates a query definition for CloudWatch Logs Insights. For more information, see Analyzing Log…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-query-definition` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates a resource policy allowing other Amazon Web Services services to put log events to this…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-resource-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Sets the retention of the specified log group. With a retention policy, you can configure the number of days…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-retention-policy` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Creates or updates a subscription filter and associates it with the specified log group. With subscription…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/put-subscription-filter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/start-query` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Stops a CloudWatch Logs Insights query that is in progress. If the query has already ended, the operation…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/stop-query` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Assigns one or more tags (key-value pairs) to the specified CloudWatch Logs resource. Currently, the only…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/tag-resource` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Tests the filter pattern of a metric filter against a sample of log event messages. You can use this…
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/test-metric-filter` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

### Removes one or more tags from the specified resource.
`POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/untag-resource` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | no | The AWS region |
| body | object | no | JSON request body |

## Example
```
curl "https://zieapi.vercel.app/v1/cloud:amazonaws-logs/associate-kms-key" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Amazon CloudWatch Logs API?
Create a free Apizie key, then send POST https://zieapi.vercel.app/v1/cloud:amazonaws-logs/associate-kms-key with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Amazon CloudWatch Logs API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Amazon CloudWatch Logs itself also needs your own key from amazonaws.com.

### Can AI agents use the Amazon CloudWatch Logs API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key cloud:amazonaws-logs.

### What is the status of the Amazon CloudWatch Logs API?
Needs your own provider key (bring your own key)
