SNS GCM PlatformApplication requires actual PlatformCredential

Hi Everyone,

I am working on an application that uses AWS SNS Platform Applications to notify users on some activity. It uses GCM Firebase for the notifications. We have decided to use Localstack for running our integration tests locally instead of utilizing real AWS cloud infrastructure.

The service simply publishes a message to an endpoint within a Platform Application. I have done all the pre-requisite steps and set up localstack with the Platform Application and endpoints. However, when I publish a message I get an InvalidCredential error unless I provide the real PlatformCredential i.e. our real Firebase Google API Key.

I do not want to publish messages to our actual Firebase account when doing integration tests. That would defeat the purpose of doing the tests locally. Is there any way I can disable this credential validation? Linking some resources below for reference. Thank You!

create-platform-application — AWS CLI 1.27.5 Command Reference (amazon.com)
create-platform-endpoint — AWS CLI 1.27.5 Command Reference (amazon.com)

Hi @knightr0 and thanks for your message.

You’re right, this is something we overlooked while implementing a feature request. The ability to publish against real GCM is going to be being a flag going forward, and you won’t need credentials to be able to test SNS Platform Applications anymore. I’ll come back here once this is implemented! And again, sorry for the problem you’ve been encountering.

Hi @knightr0,

Just to let you know that this feature is now disabled by default, and you should be able to test it properly.
You can try it by running docker pull localstack/localstack:latest. Let me know if you have any feedback! If you encounter any problem, make sure to open a GitHub issue.