View a markdown version of this page

Actions, resources, and condition keys for Amazon SNS - Service Authorization Reference
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Actions, resources, and condition keys for Amazon SNS

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

References:

API operations defined by Amazon SNS

The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.

Operation IAM action Condition key Possible value(s) Access level

AddPermission

sns:AddPermission

Permissions management, Write

CheckIfPhoneNumberIsOptedOut

sns:CheckIfPhoneNumberIsOptedOut

Read

ConfirmSubscription

sns:ConfirmSubscription

Write

CreatePlatformApplication

sns:CreatePlatformApplication

Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

CreatePlatformEndpoint

sns:CreatePlatformEndpoint

Write

CreateSMSSandboxPhoneNumber

sns:CreateSMSSandboxPhoneNumber

Write

CreateTopic

sns:CreateTopic

Write

sns:TagResource

Tagging, Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

DeleteEndpoint

sns:DeleteEndpoint

Write

DeletePlatformApplication

sns:DeletePlatformApplication

Write

DeleteSMSSandboxPhoneNumber

sns:DeleteSMSSandboxPhoneNumber

Write

DeleteTopic

sns:DeleteTopic

Write

GetDataProtectionPolicy

sns:GetDataProtectionPolicy

Read

GetEndpointAttributes

sns:GetEndpointAttributes

Read

GetPlatformApplicationAttributes

sns:GetPlatformApplicationAttributes

Read

GetSMSAttributes

sns:GetSMSAttributes

Read

GetSMSSandboxAccountStatus

sns:GetSMSSandboxAccountStatus

Read

GetSubscriptionAttributes

sns:GetSubscriptionAttributes

Read

GetTopicAttributes

sns:GetTopicAttributes

Read

ListEndpointsByPlatformApplication

sns:ListEndpointsByPlatformApplication

List

ListOriginationNumbers

sns:ListOriginationNumbers

List

ListPhoneNumbersOptedOut

sns:ListPhoneNumbersOptedOut

Read

ListPlatformApplications

sns:ListPlatformApplications

List

ListSMSSandboxPhoneNumbers

sns:ListSMSSandboxPhoneNumbers

List

ListSubscriptions

sns:ListSubscriptions

List

ListSubscriptionsByTopic

sns:ListSubscriptionsByTopic

List

ListTagsForResource

sns:ListTagsForResource

Read

ListTopics

sns:ListTopics

List

OptInPhoneNumber

sns:OptInPhoneNumber

Write

Publish

sns:Publish

Write

PublishBatch

sns:Publish

Write

PutDataProtectionPolicy

sns:PutDataProtectionPolicy

Write

RemovePermission

sns:RemovePermission

Permissions management, Write

SetEndpointAttributes

sns:SetEndpointAttributes

Write

SetPlatformApplicationAttributes

sns:SetPlatformApplicationAttributes

Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

SetSMSAttributes

sns:SetSMSAttributes

Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

SetSubscriptionAttributes

sns:SetSubscriptionAttributes

Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

SetTopicAttributes

sns:SetTopicAttributes

Permissions management, Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

Subscribe

sns:Subscribe

Write

iam:PassRole

iam:PassedToService

sns.amazonaws.com

Write

TagResource

sns:TagResource

Tagging, Write

Unsubscribe

sns:Unsubscribe

Write

UntagResource

sns:UntagResource

Tagging, Write

VerifySMSSandboxPhoneNumber

sns:VerifySMSSandboxPhoneNumber

Write

Actions defined by Amazon SNS

You can specify the following actions in the Action element of an IAM policy statement. Use policies to grant permissions to perform an operation in Amazon. 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.

Actions Description Resource types (*required) Condition keys Access level

AddPermission

Grants permission to add a statement to a topic's access control policy, granting access for the specified Amazon accounts to the specified actions

topic*

aws:ResourceTag/${TagKey}

Permissions management, Write

CheckIfPhoneNumberIsOptedOut

Grants permission to accept a phone number and indicate whether the phone holder has opted out of receiving SMS messages from your account

Read

ConfirmSubscription

Grants permission to verify an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier Subscribe action

topic*

aws:ResourceTag/${TagKey}

Write

CreatePlatformApplication

Grants permission to create 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

Grants permission to create an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS

Write

CreateSMSSandboxPhoneNumber

Grants permission to add a destination phone number and send a one-time password (OTP) to that phone number for an Amazon Web Services account

Write

CreateTopic

Grants permission to create a topic to which notifications can be published

topic*

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Write

DeleteEndpoint

Grants permission to delete the endpoint for a device and mobile app from Amazon SNS

Write

DeletePlatformApplication

Grants permission to delete a platform application object for one of the supported push notification services, such as APNS and GCM

Write

DeleteSMSSandboxPhoneNumber

Grants permission to delete an Amazon Web Services account's verified or pending phone number

Write

DeleteTopic

Grants permission to delete a topic and all its subscriptions

topic*

aws:ResourceTag/${TagKey}

Write

GetDataProtectionPolicy

Grants permission to return the data protection policy of the topic

topic*

aws:ResourceTag/${TagKey}

Read

GetEndpointAttributes

Grants permission to retrieve the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS

Read

GetPlatformApplicationAttributes

Grants permission to retrieve the attributes of the platform application object for the supported push notification services, such as APNS and GCM

Read

GetSMSAttributes

Grants permission to return the settings for sending SMS messages from your account

Read

GetSMSSandboxAccountStatus

Grants permission to retrieve the sandbox status for the calling account in the target region

Read

GetSubscriptionAttributes

Grants permission to return all of the properties of a subscription

topic

aws:ResourceTag/${TagKey}

Read

GetTopicAttributes

Grants permission to return all of the properties of a topic

topic*

aws:ResourceTag/${TagKey}

Read

ListEndpointsByPlatformApplication

Grants permission to list the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS

List

ListOriginationNumbers

Grants permission to list all origination numbers, and their metadata

List

ListPhoneNumbersOptedOut

Grants permission to return a list of phone numbers that are opted out, meaning you cannot send SMS messages to them

Read

ListPlatformApplications

Grants permission to list the platform application objects for the supported push notification services, such as APNS and GCM

List

ListSMSSandboxPhoneNumbers

Grants permission to list the calling account's current pending and verified destination phone numbers

List

ListSubscriptions

Grants permission to return a list of the requester's subscriptions

List

ListSubscriptionsByTopic

Grants permission to return a list of the subscriptions to a specific topic

topic*

aws:ResourceTag/${TagKey}

List

ListTagsForResource

Grants permission to list all tags added to the specified Amazon SNS topic

topic

aws:ResourceTag/${TagKey}

Read

ListTopics

Grants permission to return a list of the requester's topics

List

OptInPhoneNumber

Grants permission to opt in a phone number that is currently opted out, which enables you to resume sending SMS messages to the number

Write

Publish

Grants permission to send a message to all of a topic's subscribed endpoints

topic*

aws:ResourceTag/${TagKey}

Write

PutDataProtectionPolicy

Grants permission to allow a topic owner to set the data protection policy

topic*

aws:ResourceTag/${TagKey}

Write

RemovePermission

Grants permission to remove a statement from a topic's access control policy

topic*

aws:ResourceTag/${TagKey}

Permissions management, Write

SetEndpointAttributes

Grants permission to set the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS

Write

SetPlatformApplicationAttributes

Grants permission to set the attributes of the platform application object for the supported push notification services, such as APNS and GCM

Write

SetSMSAttributes

Grants permission to set the default settings for sending SMS messages and receiving daily SMS usage reports

Write

SetSubscriptionAttributes

Grants permission to allow a subscription owner to set an attribute of the topic to a new value

topic

aws:ResourceTag/${TagKey}

Write

SetTopicAttributes

Grants permission to allow a topic owner to set an attribute of the topic to a new value

topic*

aws:ResourceTag/${TagKey}

Permissions management, Write

Subscribe

Grants permission to prepare to subscribe an endpoint by sending the endpoint a confirmation message

topic*

aws:ResourceTag/${TagKey}

sns:Endpoint

sns:Protocol

Write

TagResource

Grants permission to add tags to the specified Amazon SNS topic

topic

aws:RequestTag/${TagKey}

aws:ResourceTag/${TagKey}

aws:TagKeys

Tagging, Write

Unsubscribe

Grants permission to delete a subscription

topic

aws:ResourceTag/${TagKey}

Write

UntagResource

Grants permission to remove tags from the specified Amazon SNS topic

topic

aws:ResourceTag/${TagKey}

aws:TagKeys

Tagging, Write

VerifySMSSandboxPhoneNumber

Grants permission to verify a destination phone number with a one-time password (OTP) for an Amazon Web Services account

Write

Resource types defined by Amazon SNS

The following resource types are defined by this service and can be used in the Resource element of IAM permission policy statements.

Resource types ARN Condition keys

topic

arn:${Partition}:sns:${Region}:${Account}:${TopicName}

aws:ResourceTag/${TagKey}

Condition keys for Amazon SNS

Amazon SNS defines the following condition keys that can be used in the Condition element of an IAM policy.

Condition keys Description Type

aws:RequestTag/${TagKey}

Filters access by tags from request

String

aws:ResourceTag/${TagKey}

Filters access by tags associated with the resource

String

aws:TagKeys

Filters access by tag keys from request

ArrayOfString

sns:Endpoint

Filters access by the URL, email address, or ARN from a Subscribe request or a previously confirmed subscription

String

sns:Protocol

Filters access by the protocol value from a Subscribe request or a previously confirmed subscription

String