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:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
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 |
Permissions management, Write |
|||
|
CheckIfPhoneNumberIsOptedOut |
Read |
|||
|
ConfirmSubscription |
Write |
|||
|
CreatePlatformApplication |
Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
CreatePlatformEndpoint |
Write |
|||
|
CreateSMSSandboxPhoneNumber |
Write |
|||
|
CreateTopic |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
DeleteEndpoint |
Write |
|||
|
DeletePlatformApplication |
Write |
|||
|
DeleteSMSSandboxPhoneNumber |
Write |
|||
|
DeleteTopic |
Write |
|||
|
GetDataProtectionPolicy |
Read |
|||
|
GetEndpointAttributes |
Read |
|||
|
GetPlatformApplicationAttributes |
Read |
|||
|
GetSMSAttributes |
Read |
|||
|
GetSMSSandboxAccountStatus |
Read |
|||
|
GetSubscriptionAttributes |
Read |
|||
|
GetTopicAttributes |
Read |
|||
|
ListEndpointsByPlatformApplication |
List |
|||
|
ListOriginationNumbers |
List |
|||
|
ListPhoneNumbersOptedOut |
Read |
|||
|
ListPlatformApplications |
List |
|||
|
ListSMSSandboxPhoneNumbers |
List |
|||
|
ListSubscriptions |
List |
|||
|
ListSubscriptionsByTopic |
List |
|||
|
ListTagsForResource |
Read |
|||
|
ListTopics |
List |
|||
|
OptInPhoneNumber |
Write |
|||
|
Publish |
Write |
|||
|
PublishBatch |
Write |
|||
|
PutDataProtectionPolicy |
Write |
|||
|
RemovePermission |
Permissions management, Write |
|||
|
SetEndpointAttributes |
Write |
|||
|
SetPlatformApplicationAttributes |
Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
SetSMSAttributes |
Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
SetSubscriptionAttributes |
Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
SetTopicAttributes |
Permissions management, Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
Subscribe |
Write |
|||
iam:PassedToService |
sns.amazonaws.com |
Write |
||
|
TagResource |
Tagging, Write |
|||
|
Unsubscribe |
Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
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 |
|---|---|---|---|---|
Grants permission to add a statement to a topic's access control policy, granting access for the specified Amazon accounts to the specified actions |
Permissions management, Write |
|||
Grants permission to accept a phone number and indicate whether the phone holder has opted out of receiving SMS messages from your account |
Read |
|||
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 |
Write |
|||
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 |
|||
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 |
|||
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 |
|||
Grants permission to create a topic to which notifications can be published |
Write |
|||
Grants permission to delete the endpoint for a device and mobile app from Amazon SNS |
Write |
|||
Grants permission to delete a platform application object for one of the supported push notification services, such as APNS and GCM |
Write |
|||
Grants permission to delete an Amazon Web Services account's verified or pending phone number |
Write |
|||
Grants permission to delete a topic and all its subscriptions |
Write |
|||
Grants permission to return the data protection policy of the topic |
Read |
|||
Grants permission to retrieve the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS |
Read |
|||
Grants permission to retrieve the attributes of the platform application object for the supported push notification services, such as APNS and GCM |
Read |
|||
Grants permission to return the settings for sending SMS messages from your account |
Read |
|||
Grants permission to retrieve the sandbox status for the calling account in the target region |
Read |
|||
Grants permission to return all of the properties of a subscription |
Read |
|||
Grants permission to return all of the properties of a topic |
Read |
|||
Grants permission to list the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS |
List |
|||
Grants permission to list all origination numbers, and their metadata |
List |
|||
Grants permission to return a list of phone numbers that are opted out, meaning you cannot send SMS messages to them |
Read |
|||
Grants permission to list the platform application objects for the supported push notification services, such as APNS and GCM |
List |
|||
Grants permission to list the calling account's current pending and verified destination phone numbers |
List |
|||
Grants permission to return a list of the requester's subscriptions |
List |
|||
Grants permission to return a list of the subscriptions to a specific topic |
List |
|||
Grants permission to list all tags added to the specified Amazon SNS topic |
Read |
|||
Grants permission to return a list of the requester's topics |
List |
|||
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 |
|||
Grants permission to send a message to all of a topic's subscribed endpoints |
Write |
|||
Grants permission to allow a topic owner to set the data protection policy |
Write |
|||
Grants permission to remove a statement from a topic's access control policy |
Permissions management, Write |
|||
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 |
|||
Grants permission to set the attributes of the platform application object for the supported push notification services, such as APNS and GCM |
Write |
|||
Grants permission to set the default settings for sending SMS messages and receiving daily SMS usage reports |
Write |
|||
Grants permission to allow a subscription owner to set an attribute of the topic to a new value |
Write |
|||
Grants permission to allow a topic owner to set an attribute of the topic to a new value |
Permissions management, Write |
|||
Grants permission to prepare to subscribe an endpoint by sending the endpoint a confirmation message |
Write |
|||
Grants permission to add tags to the specified Amazon SNS topic |
Tagging, Write |
|||
Grants permission to delete a subscription |
Write |
|||
Grants permission to remove tags from the specified Amazon SNS topic |
Tagging, Write |
|||
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 |
|---|---|---|
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.
| Condition keys | Description | Type |
|---|---|---|
Filters access by tags from request |
String |
|
Filters access by tags associated with the resource |
String |
|
Filters access by tag keys from request |
ArrayOfString |
|
Filters access by the URL, email address, or ARN from a Subscribe request or a previously confirmed subscription |
String |
|
Filters access by the protocol value from a Subscribe request or a previously confirmed subscription |
String |