1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. sns
  5. Subscription

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.sns.Subscription

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

Resource Type definition for AWS::SNS::Subscription

Create Subscription Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Subscription(name: string, args: SubscriptionArgs, opts?: CustomResourceOptions);
@overload
def Subscription(resource_name: str,
                 args: SubscriptionArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def Subscription(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 protocol: Optional[str] = None,
                 topic_arn: Optional[str] = None,
                 delivery_policy: Optional[Any] = None,
                 endpoint: Optional[str] = None,
                 filter_policy: Optional[Any] = None,
                 filter_policy_scope: Optional[str] = None,
                 raw_message_delivery: Optional[bool] = None,
                 redrive_policy: Optional[Any] = None,
                 region: Optional[str] = None,
                 replay_policy: Optional[Any] = None,
                 subscription_role_arn: Optional[str] = None)
func NewSubscription(ctx *Context, name string, args SubscriptionArgs, opts ...ResourceOption) (*Subscription, error)
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions? opts = null)
public Subscription(String name, SubscriptionArgs args)
public Subscription(String name, SubscriptionArgs args, CustomResourceOptions options)
type: aws-native:sns:Subscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Subscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Subscription resource accepts the following input properties:

Protocol This property is required. string
The subscription's protocol.
TopicArn This property is required. string
The ARN of the topic to subscribe to.
DeliveryPolicy object

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

Endpoint string
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
FilterPolicy object

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

FilterPolicyScope string
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
RawMessageDelivery bool
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
RedrivePolicy object

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

Region string
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
ReplayPolicy object

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

SubscriptionRoleArn string
This property applies only to Amazon Data Firehose delivery stream subscriptions.
Protocol This property is required. string
The subscription's protocol.
TopicArn This property is required. string
The ARN of the topic to subscribe to.
DeliveryPolicy interface{}

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

Endpoint string
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
FilterPolicy interface{}

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

FilterPolicyScope string
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
RawMessageDelivery bool
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
RedrivePolicy interface{}

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

Region string
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
ReplayPolicy interface{}

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

SubscriptionRoleArn string
This property applies only to Amazon Data Firehose delivery stream subscriptions.
protocol This property is required. String
The subscription's protocol.
topicArn This property is required. String
The ARN of the topic to subscribe to.
deliveryPolicy Object

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

endpoint String
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
filterPolicy Object

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

filterPolicyScope String
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
rawMessageDelivery Boolean
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
redrivePolicy Object

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

region String
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
replayPolicy Object

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

subscriptionRoleArn String
This property applies only to Amazon Data Firehose delivery stream subscriptions.
protocol This property is required. string
The subscription's protocol.
topicArn This property is required. string
The ARN of the topic to subscribe to.
deliveryPolicy any

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

endpoint string
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
filterPolicy any

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

filterPolicyScope string
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
rawMessageDelivery boolean
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
redrivePolicy any

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

region string
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
replayPolicy any

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

subscriptionRoleArn string
This property applies only to Amazon Data Firehose delivery stream subscriptions.
protocol This property is required. str
The subscription's protocol.
topic_arn This property is required. str
The ARN of the topic to subscribe to.
delivery_policy Any

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

endpoint str
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
filter_policy Any

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

filter_policy_scope str
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
raw_message_delivery bool
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
redrive_policy Any

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

region str
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
replay_policy Any

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

subscription_role_arn str
This property applies only to Amazon Data Firehose delivery stream subscriptions.
protocol This property is required. String
The subscription's protocol.
topicArn This property is required. String
The ARN of the topic to subscribe to.
deliveryPolicy Any

The delivery policy JSON assigned to the subscription. Enables the subscriber to define the message delivery retry strategy in the case of an HTTP/S endpoint subscribed to the topic.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

endpoint String
The subscription's endpoint. The endpoint value depends on the protocol that you specify.
filterPolicy Any

The filter policy JSON assigned to the subscription. Enables the subscriber to filter out unwanted messages.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

filterPolicyScope String
This attribute lets you choose the filtering scope by using one of the following string value types: MessageAttributes (default) and MessageBody.
rawMessageDelivery Boolean
When set to true, enables raw message delivery. Raw messages don't contain any JSON formatting and can be sent to Amazon SQS and HTTP/S endpoints.
redrivePolicy Any

When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. Messages that can't be delivered due to client errors are held in the dead-letter queue for further analysis or reprocessing.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

region String
For cross-region subscriptions, the region in which the topic resides.If no region is specified, AWS CloudFormation uses the region of the caller as the default.
replayPolicy Any

Specifies whether Amazon SNS resends the notification to the subscription when a message's attribute changes.

Search the CloudFormation User Guide for AWS::SNS::Subscription for more information about the expected schema for this property.

subscriptionRoleArn String
This property applies only to Amazon Data Firehose delivery stream subscriptions.

Outputs

All input properties are implicitly available as output properties. Additionally, the Subscription resource produces the following output properties:

Arn string
Arn of the subscription
Id string
The provider-assigned unique ID for this managed resource.
Arn string
Arn of the subscription
Id string
The provider-assigned unique ID for this managed resource.
arn String
Arn of the subscription
id String
The provider-assigned unique ID for this managed resource.
arn string
Arn of the subscription
id string
The provider-assigned unique ID for this managed resource.
arn str
Arn of the subscription
id str
The provider-assigned unique ID for this managed resource.
arn String
Arn of the subscription
id String
The provider-assigned unique ID for this managed resource.

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi