Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

473
Views
ClientError: An error occurred (InternalFailure) when calling the Publish operation (reached max retries: 4)

I am simply trying to publish to an SNS topic using a lambda function. The function code as follows, with ARN being the actual SNS topic ARN:

import boto3
print('Loading function')

def lambda_handler(event, context):
    client = boto3.client('sns')
    response = client.publish(
        TargetArn='ARN',   
        Message="Test",   
    )
    return response

The function execution role as access to SNS. In fact I even gave SNS full access. But I keep getting the error:

{
  "errorMessage": "An error occurred (InternalFailure) when calling the Publish operation (reached max retries: 4): Unknown",
  "errorType": "ClientError",
  "stackTrace": [
    "  File \"/var/task/lambda_function.py\", line 6, in lambda_handler\n    response = client.publish(\n",
    "  File \"/var/runtime/botocore/client.py\", line 316, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n",
    "  File \"/var/runtime/botocore/client.py\", line 626, in _make_api_call\n    raise error_class(parsed_response, operation_name)\n"
  ]
}

I do not find any access denied errors in cloudtrail either. Any idea on what is the issue here ?

Edit: Its my bad, I used the subscription ARN instead of the topic ARN causing this issue.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In case if anyone is facing this issue, make sure you use the correct ARN - use the ARN of the Topic instead of the subscription.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!