AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

QueuePolicy

The policy for an SQS Queue. Policies define the operations that are allowed on this resource. You almost never need to define this construct directly. All AWS resources that support resource policies have a method called `addToResourcePolicy()`, which will automatically create a new resource policy if one doesn't exist yet, otherwise it will add to the existing policy. Prefer to use `addToResourcePolicy()` instead.

Import

import { QueuePolicy } from 'aws-cdk-lib/aws-sqs';

Or use the module namespace:

import * as sqs from 'aws-cdk-lib/aws-sqs';
// sqs.QueuePolicy

Properties

Configuration passed to the constructor as QueuePolicyProps.

queuesRequired
IQueue[]

The set of queues this policy applies to.

Get the Amazon SQS Cheat Sheet

Everything you need to know about Amazon SQS on one page. HD quality, print-friendly.

Download Free Infographic