Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

467
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda