Pinpoint

Get started with Pinpoint on LocalStack

Introduction

Pinpoint is a customer engagement service to facilitate communication across multiple channels, including email, SMS, and push notifications. Pinpoint allows developers to create and manage customer segments based on various attributes, such as user behavior and demographics, while integrating with other AWS services to send targeted messages to customers.

LocalStack supports Pinpoint via the Pro/Team offering, allowing you to mock the Pinpoint APIs in your local environment. The supported APIs are available on our API coverage page, which provides information on the extent of Pinpoint’s integration with LocalStack.

Getting started

This guide is designed for users new to Pinpoint and assumes basic knowledge of the AWS CLI and our awslocal wrapper script.

Start your LocalStack container using your preferred method. We will demonstrate how to create a Pinpoint application, retrieve all applications, and list tags for the resource.

Create an application

Create a Pinpoint application using the CreateApp API. Execute the following command:

$ awslocal pinpoint create-app \
    --create-application-request Name=ExampleCorp,tags={"Stack"="Test"}

The following output would be retrieved:

{
    "ApplicationResponse": {
        "Arn": "arn:aws:mobiletargeting:us-east-1:000000000000:apps/4487a55ac6fb4a2699a1b90727c978e7",
        "Id": "4487a55ac6fb4a2699a1b90727c978e7",
        "Name": "ExampleCorp",
        "CreationDate": 1706609789.906863
    }
}

List applications

You can list all applications using the GetApps API. Execute the following command:

$ awslocal pinpoint get-apps

The following output would be retrieved:

{
    "ApplicationsResponse": {
        "Item": [
            {
                "Arn": "arn:aws:mobiletargeting:us-east-1:000000000000:apps/4487a55ac6fb4a2699a1b90727c978e7",
                "Id": "4487a55ac6fb4a2699a1b90727c978e7",
                "Name": "ExampleCorp",
                "CreationDate": 1706609789.906863
            }
        ]
    }
}

List tags for the application

You can list all tags for the application using the GetApp API. Execute the following command:

$ awslocal pinpoint list-tags-for-resource \
    --resource-arn arn:aws:mobiletargeting:us-east-1:000000000000:apps/4487a55ac6fb4a2699a1b90727c978e7

Replace the resource-arn with the ARN of the application you created earlier. The following output would be retrieved:

{
    "TagsModel": {
        "tags": {
            "Stack": "Test"
        }
    }
}

Last modified January 31, 2024: add docs on pinpoint (#1048) (667619975)