Response { "errorMessage": "An error occurred (AuthorizationError) when calling the Publish operation: User: arn:aws:sts::240006421420:assumed-role/testaSite-role-b2tbu2jg/testaSite is not authorized to perform: SNS:Publish on resource: arn:aws:sns:us-east-1:240006421420:Default_Gmail", "errorType": "AuthorizationErrorException", "stackTrace": [ [ "/var/task/lambda_function.py", 16, "lambda_handler", "envia_notificacao()" ], [ "/var/task/lambda_function.py", 22, "envia_notificacao", "Subject='ALERTA')" ], [ "/var/runtime/botocore/client.py", 357, "apicall", "return self.makeapi_call(operation_name, kwargs)" ], [ "/var/runtime/botocore/client.py", 676, "makeapi_call", "raise error_class(parsed_response, operation_name)" ] ] }
Function Logs START RequestId: 3e008807-f315-4bb8-a2c0-17728e7eb963 Version: $LATEST /var/runtime/botocore/vendored/requests/api.py:72: DeprecationWarning: You are using the get() function from 'botocore.vendored.requests'. This dependency was removed from Botocore and will be removed from Lambda after 2021-12-01. https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/. Install the requests package, 'import requests' directly, and use the requests.get() function instead. DeprecationWarning Houston, we have a problem! An error occurred (AuthorizationError) when calling the Publish operation: User: arn:aws:sts::240006421420:assumed-role/testaSite-role-b2tbu2jg/testaSite is not authorized to perform: SNS:Publish on resource: arn:aws:sns:us-east-1:240006421420:Default_Gmail: AuthorizationErrorException Traceback (most recent call last): File "/var/task/lambda_function.py", line 16, in lambda_handler envia_notificacao() File "/var/task/lambda_function.py", line 22, in envia_notificacao Subject='ALERTA') File "/var/runtime/botocore/client.py", line 357, in apicall return self.makeapi_call(operation_name, kwargs) File "/var/runtime/botocore/client.py", line 676, in makeapi_call raise error_class(parsed_response, operation_name) botocore.errorfactory.AuthorizationErrorException: An error occurred (AuthorizationError) when calling the Publish operation: User: arn:aws:sts::240006421420:assumed-role/testaSite-role-b2tbu2jg/testaSite is not authorized to perform: SNS:Publish on resource: arn:aws:sns:us-east-1:240006421420:Default_Gmail
END RequestId: 3e008807-f315-4bb8-a2c0-17728e7eb963 REPORT RequestId: 3e008807-f315-4bb8-a2c0-17728e7eb963 Duration: 209.75 ms Billed Duration: 210 ms Memory Size: 128 MB Max Memory Used: 72 MB
Request ID 3e008807-f315-4bb8-a2c0-17728e7eb963