AWS SNS send message error

Hi everyone,

I’m trying to use AWS SNS node in order to publish messages in my SNS topic. I have configured N8N with docker compose and it’s running inside an EC2 instance (private VPC).

After creating the AWS account credentials (region, AWS Access Key Id and AWS Secret Access key) and trying to find the list of topic available in this AWS account, I’m facing the following error:

ERROR: AWS Error: Error: AWS error response [403]: 403 - “<ErrorResponse xmlns=“http://sns.amazonaws.com/doc/2010-03-31/”>\n \n Sender\n InvalidClientTokenId\n The security token included in the request is invalid.\n \n \n\n”

Error: AWS Error: Error: AWS error response [403]: 403 - “<ErrorResponse xmlns=“http://sns.amazonaws.com/doc/2010-03-31/”>\n \n Sender\n InvalidClientTokenId\n The security token included in the request is invalid.\n \n \n\n”
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/AwsSns.node.js:138:23)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:416:47

Does anyone faced this issue before?

Thanks in advance for your help.

Hey @perezdev,

It looks like AWS is unhappy with the credentials, Before double checking / creating new ones though what version of n8n are you running?

Hey @jon , thanks for your prompt reply!

I’m running n8n with version 0.140.0. Credentials are configured with region=eu-west-1 with the corresponding AWS Access Key Id and AWS Secret Access key. Updated error message:

@perezdev that version should be ok with some of the recent issues, The problem here is AWS is saying the credentials are wrong or at least what is being sent. I would maybe make a new set and see if that helps. It might be worth making sure there is no white space characters as well.

1 Like

Did you attach a policy rule giving that user access to AWS SNS?

The problem was related to the policy attached to my user in AWS.
Thank you for the help!

2 Likes