Menu
AWS Identity and Access Management
User Guide

Actions, Resources, and Condition Keys for Amazon SNS

Amazon SNS (service prefix: sns) provides the following service-specific resources, actions, and condition context keys for use in IAM permission policies.

References:

Actions Defined by Amazon SNS

You can specify the following actions in the Action element of an IAM policy statement. By using policies, you define the permissions for anyone performing an operation in AWS. When you use an action in a policy, you usually allow or deny access to the API operation or CLI command with the same name. However, in some cases, a single action controls access to more than one operation. Alternatively, some operations require several different actions. For details about the columns in the following table, see The Actions Table.

Actions Description Access Level Resource Types (*required) Condition Keys Dependent Actions
AddPermission Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions. Permissions management

topic*

CheckIfPhoneNumberIsOptedOut Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. Read
ConfirmSubscription Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action. Write

topic*

CreatePlatformApplication Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. Write
CreatePlatformEndpoint Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. Write
CreateTopic Creates a topic to which notifications can be published. Write

topic*

DeleteEndpoint Deletes the endpoint for a device and mobile app from Amazon SNS. Write
DeletePlatformApplication Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. Write
DeleteTopic Deletes a topic and all its subscriptions. Write

topic*

GetEndpointAttributes Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. Read
GetPlatformApplicationAttributes Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. Read
GetSMSAttributes Returns the settings for sending SMS messages from your account. Read
GetSubscriptionAttributes Returns all of the properties of a subscription. Read
GetTopicAttributes Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user. Read

topic*

ListEndpointsByPlatformApplication Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. List
ListPhoneNumbersOptedOut Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them. Read
ListPlatformApplications Lists the platform application objects for the supported push notification services, such as APNS and GCM. List
ListSubscriptions Returns a list of the requester's subscriptions. List
ListSubscriptionsByTopic Returns a list of the subscriptions to a specific topic. List

topic*

ListTopics Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. List
OptInPhoneNumber Opts in a phone number that is currently opted out, which enables you to resume sending SMS messages to the number. Write
Publish Sends a message to all of a topic's subscribed endpoints. Write

topic*

RemovePermission Removes a statement from a topic's access control policy. Permissions management

topic*

SetEndpointAttributes Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. Write
SetPlatformApplicationAttributes Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. Write
SetSubscriptionAttributes Allows a subscription owner to set an attribute of the topic to a new value. Write
SetTopicAttributes Allows a topic owner to set an attribute of the topic to a new value. Write

topic*

Subscribe Prepares to subscribe an endpoint by sending the endpoint a confirmation message. Write

topic*

sns:Endpoint

sns:Protocol

Unsubscribe Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. Write

Resources Defined by SNS

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements. Each action in the Actions table identifies the resource types that can be specified with that action. A resource type can also define which condition keys you can include in a policy. These keys are displayed in the last column of the table. For details about the columns in the following table, see The Resource Types Table.

Resource Types ARN Condition Keys
topic arn:${Partition}:sns:${Region}:${Account}:${TopicName}

Condition Keys for Amazon SNS

Amazon SNS defines the following condition keys that can be used in the Condition element of an IAM policy. You can use these keys to further refine the conditions under which the policy statement applies. For details about the columns in the following table, see The Condition Keys Table.

To view the global condition keys that are available to all services, see Available Global Condition Keys in the IAM Policy Reference.

Condition Keys Description Type
sns:Endpoint The URL, email address, or ARN from a Subscribe request or a previously confirmed subscription. String
sns:Protocol The protocol value from a Subscribe request or a previously confirmed subscription. String