AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::SQS::QueuePolicy

CfnQueuePolicy

The `AWS::SQS::QueuePolicy` type applies a policy to Amazon SQS queues. For an example snippet, see [Declaring an Amazon SQS policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-iam.html#scenario-sqs-policy) in the *CloudFormation User Guide* .

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnQueuePolicyProps.

policyDocumentRequired
any

A policy document that contains the permissions for the specified Amazon SQS queues. For more information about Amazon SQS policies, see [Using custom policies with the Amazon SQS access policy language](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html) in the *Amazon SQS Developer Guide* .

queuesRequired
string[]

The URLs of the queues to which you want to add the policy. You can use the `[Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)` function to specify an `[AWS::SQS::Queue](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html)` resource.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon SQS Cheat Sheet

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

Download Free Infographic