

# Code examples for Amazon SNS using AWS SDKs
<a name="service_code_examples"></a>

The following code examples show how to use Amazon SNS with an AWS software development kit (SDK). 

*Actions* are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.

*Scenarios* are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.

For a complete list of AWS SDK developer guides and code examples, see [Using Amazon SNS with an AWS SDK](sdk-general-information-section.md). This topic also includes information about getting started and details about previous SDK versions.

**Contents**
+ [Basics](service_code_examples_basics.md)
  + [Hello Amazon SNS](example_sns_Hello_section.md)
  + [Actions](service_code_examples_actions.md)
    + [`CheckIfPhoneNumberIsOptedOut`](example_sns_CheckIfPhoneNumberIsOptedOut_section.md)
    + [`ConfirmSubscription`](example_sns_ConfirmSubscription_section.md)
    + [`CreateTopic`](example_sns_CreateTopic_section.md)
    + [`DeleteTopic`](example_sns_DeleteTopic_section.md)
    + [`GetSMSAttributes`](example_sns_GetSMSAttributes_section.md)
    + [`GetTopicAttributes`](example_sns_GetTopicAttributes_section.md)
    + [`ListPhoneNumbersOptedOut`](example_sns_ListPhoneNumbersOptedOut_section.md)
    + [`ListSubscriptions`](example_sns_ListSubscriptions_section.md)
    + [`ListTopics`](example_sns_ListTopics_section.md)
    + [`Publish`](example_sns_Publish_section.md)
    + [`SetSMSAttributes`](example_sns_SetSMSAttributes_section.md)
    + [`SetSubscriptionAttributes`](example_sns_SetSubscriptionAttributes_section.md)
    + [`SetSubscriptionAttributesRedrivePolicy`](example_sns_SetSubscriptionAttributesRedrivePolicy_section.md)
    + [`SetTopicAttributes`](example_sns_SetTopicAttributes_section.md)
    + [`Subscribe`](example_sns_Subscribe_section.md)
    + [`TagResource`](example_sns_TagResource_section.md)
    + [`Unsubscribe`](example_sns_Unsubscribe_section.md)
+ [Scenarios](service_code_examples_scenarios.md)
  + [Build an app to submit data to a DynamoDB table](example_cross_SubmitDataApp_section.md)
  + [Building an Amazon SNS application](example_cross_SnsPublishSubscription_section.md)
  + [Create a platform endpoint for push notifications](example_sns_CreatePlatformEndpoint_section.md)
  + [Create a serverless application to manage photos](example_cross_PAM_section.md)
  + [Create an Amazon Textract explorer application](example_cross_TextractExplorer_section.md)
  + [Create an Amazon SNS topic and publish messages](example_sns_GettingStarted_048_section.md)
  + [Create and publish to a FIFO topic](example_sns_PublishFifoTopic_section.md)
  + [Detect people and objects in a video](example_cross_RekognitionVideoDetection_section.md)
  + [Getting Started with IoT Device Defender](example_iot_GettingStarted_079_section.md)
  + [Getting started with Config](example_config_service_GettingStarted_053_section.md)
  + [Publish SMS messages to a topic](example_sns_UsageSmsTopic_section.md)
  + [Publish a large message](example_sns_PublishLargeMessage_section.md)
  + [Publish an SMS text message](example_sns_PublishTextSMS_section.md)
  + [Publish messages to queues](example_sqs_Scenario_TopicsAndQueues_section.md)
  + [Use API Gateway to invoke a Lambda function](example_cross_LambdaAPIGateway_section.md)
  + [Use scheduled events to invoke a Lambda function](example_cross_LambdaScheduledEvents_section.md)
+ [Serverless examples](service_code_examples_serverless_examples.md)
  + [Invoke a Lambda function from an Amazon SNS trigger](example_serverless_SNS_Lambda_section.md)