Skip to main content

Subscription

Manages an SNS Subscription.

Sample code

exports.createResources = () => [
{
type: "Subscription",
group: "SNS",
properties: ({}) => ({
RawMessageDelivery: "false",
PendingConfirmation: "false",
ConfirmationWasAuthenticated: "true",
}),
dependencies: () => ({
snsTopic: "app-MySnsTopic",
lambdaFunction: "app-TopicConsumerFunction1",
}),
},
];

Properties

Dependencies

Full Examples

List

The subscription can be filtered with the Subscription type:

gc l -t Subscription
Listing resources on 1 provider: aws
✓ aws us-east-1
✓ Initialising
✓ Listing 2/2
┌───────────────────────────────────────────────────────────────────────────┐
│ 1 SNS::Subscription from aws │
├───────────────────────────────────────────────────────────────────────────┤
│ name: subscription::sam-app-MySnsTopic-1Q2VS8SMOPR20::lambda::sam-app-To… │
│ managedByUs: Yes │
│ live: │
│ Owner: 840541460064 │
│ RawMessageDelivery: false │
│ TopicArn: arn:aws:sns:us-east-1:840541460064:sam-app-MySnsTopic-1Q2VS8… │
│ Endpoint: arn:aws:lambda:us-east-1:840541460064:function:sam-app-Topic… │
│ Protocol: lambda │
│ PendingConfirmation: false │
│ ConfirmationWasAuthenticated: true │
│ SubscriptionArn: arn:aws:sns:us-east-1:840541460064:sam-app-MySnsTopic… │
│ │
└───────────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌──────────────────────────────────────────────────────────────────────────┐
│ aws │
├───────────────────┬──────────────────────────────────────────────────────┤
│ SNS::Subscription │ subscription::sam-app-MySnsTopic-1Q2VS8SMOPR20::lam… │
└───────────────────┴──────────────────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc l -t Subscription" executed in 4s, 105 MB