# FirehoseLogDestination

Use a Firehose delivery stream as a custom access log destination for API Gateway.

Extends: FirehoseLogDestination
Implements: IAccessLogDestination

- Source: [`aws-apigateway/lib/access-log.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-apigateway/lib/access-log.ts#L62)
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

```ts
const destinationBucket = new s3.Bucket(this, 'Bucket');
const deliveryStreamRole = new iam.Role(this, 'Role', {
  assumedBy: new iam.ServicePrincipal('firehose.amazonaws.com'),
});

const stream = new firehose.CfnDeliveryStream(this, 'MyStream', {
  deliveryStreamName: 'amazon-apigateway-delivery-stream',
  s3DestinationConfiguration: {
    bucketArn: destinationBucket.bucketArn,
    roleArn: deliveryStreamRole.roleArn,
  },
});

const api = new apigateway.RestApi(this, 'books', {
  deployOptions: {
    accessLogDestination: new apigateway.FirehoseLogDestination(stream),
    accessLogFormat: apigateway.AccessLogFormat.jsonWithStandardFields(),
  },
});
```

## Initializer

```ts
new FirehoseLogDestination(stream: CfnDeliveryStream)
```

## Methods

- `bind(stage: IStageRef): AccessLogDestinationConfig` — Binds this destination to the Firehose delivery stream.
