Question: How do I resolve the invalid parameter error that I receive in Amazon SNS in response to API calls?

I receive an invalid parameter error message in Amazon Simple Notification Service (Amazon SNS) in response to API calls.

Short descriptionIf you receive the following error:InvalidParameter - Error message: Invalid parameter: Attributes Reason: Platform credentials are invalidComplete the steps in the Resolve platform credential errors section.If you receive the following error:"message": "Invalid parameter: The MessageGroupId parameter is required for FIFO topics" even if the customer has provided MessageGroupIdComplete the steps in the Resolve FIFO errors section.If you receive the following error:Couldn't set text messaging attributes.Error code: InvalidParameter - Error message: Invalid parameter:Complete the steps in the Resolve text messaging (SMS) errors section.If you receive the following error:Couldn't delete subscription.Error code: InvalidParameter - Error message: Invalid parameter: SubscriptionArn Reason: An ARN must have at least 6 elements, not 1Complete the steps in the Resolve subscription delete errors section.

ResolutionResolve platform credential errorsImportant: Before completing the following steps, check the provider certificate type in your Apple Developer account. Then, download the certificate.1.    Open the Amazon SNS console.2.    On the navigation pane, choose Push notifications.3.    Choose Create platform application.4.    For Application name, enter a name for your application.5.    For Push notification platform, select Apple iOS/VoIP/Mac.6.    In the Apple Credentials section, select the Used for development in sandbox check box if you're using a certificate of type Sandbox.Important: You must not select this check box if you're using a certificate of type Sandbox & Production. Otherwise, you receive an error.7.    For Push certificate type, select your type of certificate.8.    Choose Choose file, and then select the certificate that you want to load credentials from.9.    Choose Create platform application.Resolve FIFO errorsVerify that you're using AWS SDK for JavaScript in the Browser or AWS SDK for JavaScript in Node.js version 2.777.0 or above.You can receive Amazon SNS FIFO errors related to an invalid MessageGroupId or invalid MessageDeduplicationId even though the IDs are provided in the API request. Amazon SNS FIFO attributes are available for newer SDK versions only. For more information, see Changelog for AWS SDK for JavaScript.Resolve text messaging (SMS) errors1.    Open the Amazon SNS console.2.    On the navigation pane, choose Text messaging (SMS).3.    For Text messaging preferences, choose Edit.4.    For Account spend limit - Optional Parameter, enter the numeric value 1. This default value is the monthly spend limit in USD. You can request an account spend limit increase if you want the account monthly spend limit to be greater than $1.Note: By default, every Amazon SNS account has a spend quota of $1 in every AWS Region. You receive an error in the Amazon SNS console when the value is greater than 1.5.    Choose Save changes.Resolve subscription delete errorsYou receive this error when you try to remove a subscription that's in PendingConfirmation status. To remove a subscription, the Amazon SNS Unsubscribe API is called, which requires SubscriptionARN. If you use the console to delete the subscription, then the Amazon SNS console automatically selects the SubscriptionARN from the selected subscription. For a subscription in PendingSubscription status, the console doesn't show SubscriptionId. As a result, the console uses the PendingConfirmation as a SubscriptionId. Then, the API calls fails and returns an error.For a subscription in Pending confirmation status:1.    Open the Amazon SNS console.2.    On the navigation pane, choose Topics, and then choose your topic.3.    Select the topic with the subscription in Pending confirmation status, and then select the subscription in Pending confirmation status.4.    Choose Request confirmation.A subscribe notification is sent to the endpoint to confirm the subscription.5.    Copy the subscribe URL from the notification. This URL looks similar to the following:https://sns.us-east-1.amazonaws.com/confirmation.html?TopicArn=arn:aws:sns:your-aws-region:your-account-number:your-topic-name&Token=your-token&Endpoint=your-endpoint6.    On the navigation menu in Amazon SNS, choose Subscriptions, and then select your subscription.7.    Choose Confirm subscription.8.    Paste the subscribe URL from step 5 into the dialog box, and then choose Confirm subscription9.    Select your subscription, and then choose Delete.For a subscription with Deleted status:Check the endpoint where the unsubscribe link was chosen. After the subscription is unsubscribed, the endpoint receives another notification similar to the following:Your subscription to the topic below has been deactivated:arn:aws:sns:Your-AWS-Region:Your-Account-Number:Your-Topic-NameIf this was in error or you wish to resubscribe, click or visit the link below:ResubscribePlease click on the resubscribe link present in the notification. This will confirm the subscription. On success, please select the specific subscription and click on Delete button.-or-Wait three days for the subscription to be removed. By default, Amazon SNS automatically removes subscriptions with PendingConfirmation in three days.