Generate SNS topic policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Step 1
Set the region and account ID used when generating sample SNS topic ARNs.
Step 2
The action list is scoped to AWS Policy Generator's SNS Topic Policy actions.
Step 3
No SNS actions selected yet.
Search for an SNS action above to start generating a topic policy.
This generator uses AWS Policy Generator's SNS Topic Policy action list and enriches it with Amazon SNS Service Authorization Reference metadata so you can build topic policies with actions, principals, resources, and condition keys in one place.
SNS topic policies include a Principal element because the policy lives on the topic and defines who can publish, subscribe, manage permissions, or perform other SNS actions against that resource.
Need a different policy type? Switch to the IAM policy generator, S3 bucket policy generator, SQS queue policy generator, or VPC endpoint policy generator.
Use an IAM identity policy to grant permissions to users, roles, or applications in your account. Use an SNS topic policy when the permission must live on the topic itself, especially for cross-account access, service integrations, or publish and subscribe permissions controlled at the topic boundary.
SNS topic policies are resource policies. The Principal element identifies who the statement applies to, such as an AWS account, IAM role ARN, federated principal, or AWS service principal.
Yes. Service principals are useful when AWS services need access to a topic. The generator reuses the generated AWS service principal dataset so you can search for entries such as events.amazonaws.com or s3.amazonaws.com instead of typing them from memory.
You can use *, but topic policies are usually safer when scoped to one or more specific topic ARNs. The wildcard option is useful for drafts or broad administrative statements, but production policies should normally target explicit topics.
Start with the condition keys AWS documents for the selected SNS action, then add global IAM keys when needed. Common examples include restricting protocol, source account, source ARN, organization ID, or request tags depending on the action and integration.
Yes. The JSON output is a standard SNS topic policy document, the Terraform output includes an aws_iam_policy_document data source with aws_sns_topic_policy, and the CloudFormation output creates an AWS::SNS::TopicPolicy snippet.
Related tools
Generate VPC endpoint policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Generate SQS queue policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Generate S3 bucket policies from AWS Policy Generator action metadata and export JSON, Terraform, or CloudFormation snippets.
Next step
I build these tools to make AWS easier to manage. If this level of quality is what you want in your own cloud platform, Towards The Cloud can help with landing zones, infrastructure as code, security reviews, migrations, and cost optimization.