How do I resolve a "too many attributes" error in Amazon Pinpoint?

3 minute read
0

When I run an API to create an endpoint in Amazon Pinpoint, I get an "Too many user attributes", "Too many total additional attributes", or "Too many custom attributes" error.

Short description

To create endpoints in Amazon Pinpoint, you can use APIs, such as UpdateEndpointsBatch, UpdateEndpoint, or PutEvents. If you exceed the endpoint quota for the maximum number of unique attributes across all endpoints in an application, then you get an error.

To resolve this issue, get a list of unique attributes across all your endpoints. Use this list to calculate your total number of attributes, and remove attributes as needed.

Resolution

Find the number of attributes

To find all the attributes in your application, run the remove-attributes command for each of the following attribute types:

  • endpoint-custom-attributes
  • endpoint-user-attributes
  • endpoint-metric-attributes

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

  1. Run the remove-attributes command with one of the attribute types. This example uses endpoint-custom-attributes:

    aws pinpoint remove-attributes --application-id MyApplicationID --attribute-type endpoint-user-attributes --update-attributes-request Blacklist=AttributeName

    Note: In the preceding command, replace MyApplicationID with the application ID for your Amazon Pinpoint project. Replace AttributeName with an attribute name that doesn't exist in your application.

    Because the attribute name doesn't exist, the output provides a list of remaining attributes of the specified attribute type.
    The output looks similar to the following one:

    {
        "ApplicationId": "string",
        "AttributeType": "endpoint-custom-attributes",
        "Attributes": [
            "ea20",
            "ea21",
            "ea22",
            "ea23",
            "ea24",
            "ea25",
            "ea26",
            "ea27",
            "ea17",
            "ea18",
            "ea19",
            "ea10",
            "ea11",
            "ea12",
            "ea13",
            "ea14",
            "ea15",
            "ea16",
            "eaCommon",
            "ea1",
            "ea5",
            "ea4",
            "ea3",
            "ea2",
            "ea9",
            "ea8",
            "ea7",
            "ea6",
            "ea28",
            "ea29"
        ]
    }
  2. Repeat Step 1 for each attribute type. Note the total number of attributes that are returned in each command.

  3. Add the total number of attributes that are returned from the three commands. This number is the total attribute count for the application.

Remove unused attributes

The maximum number of attributes that each Amazon Pinpoint application supports is 250. If your total count exceeds the quota for the attributes that are collectively assigned to the  Attributes, Metrics, and UserAttributes parameters, then remove unused attributes.

Use the RemoveAttributes API to remove attributes.

Related information

Customize marketing messages and promotions for personalized outreach

AWS OFFICIAL
AWS OFFICIALUpdated 5 months ago