# SqsSubscriptionProps

Properties for an SQS subscription.

Extends: SqsSubscriptionProps
Extends: SubscriptionProps
Used as props by: SqsSubscription

- Source: [`aws-sns-subscriptions/lib/sqs.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-sns-subscriptions/lib/sqs.ts#L14)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sns as sns } from 'aws-cdk-lib';
import { aws_sns_subscriptions as sns_subscriptions } from 'aws-cdk-lib';
import { aws_sqs as sqs } from 'aws-cdk-lib';

declare const filterOrPolicy: sns.FilterOrPolicy;
declare const queue: sqs.Queue;
declare const subscriptionFilter: sns.SubscriptionFilter;
const sqsSubscriptionProps: sns_subscriptions.SqsSubscriptionProps = {
  deadLetterQueue: queue,
  filterPolicy: {
    filterPolicyKey: subscriptionFilter,
  },
  filterPolicyWithMessageBody: {
    filterPolicyWithMessageBodyKey: filterOrPolicy,
  },
  rawMessageDelivery: false,
};
```

## Properties

- `deadLetterQueue`: [IQueue](/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.IQueue.html) — Queue to be used as dead letter queue.

  **Default:** No dead letter queue enabled.

  If not passed no dead letter queue is enabled.

- `filterPolicy`: { [key: string]: [SubscriptionFilter](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.SubscriptionFilter.html) } — The filter policy.

  **Default:** all messages are delivered

- `filterPolicyWithMessageBody`: { [key: string]: [FilterOrPolicy](/cdk/api/v2/docs/aws-cdk-lib.aws_sns.FilterOrPolicy.html) } — The filter policy that is applied on the message body.

  **Default:** all messages are delivered

  To apply a filter policy to the message attributes, use `filterPolicy`. A maximum of one of `filterPolicyWithMessageBody` and `filterPolicy` may be used.

- `rawMessageDelivery`: boolean = false — The message to the queue is the same as it was sent to the topic.

  If false, the message will be wrapped in an SNS envelope.
