There are a lot of AWS errors
out there. Way too many, right?
You as a sysadmin know that for sure – Lambda errors, s3 errors or timeout errors.
Your AWS sometimes drives you crazy.
Here's a list of the most common errors around AWS and the proven solution to them:
- AWS Lambda function errors in Node.js
- AWS Lambda function errors in Python
- AWS Lambda function errors in Ruby
- AWS Lambda function errors in Java
- AWS Lambda function errors in Go
- AWS Lambda function errors in C#
- AWS Lambda function errors in PowerShell
- AWS s3 error codes
- AWS Lambda Timeout Errors
And you'll find the solution to get rid of ALL AWS errors – forever: Test PRTG and get started within minutes!
Quick fix
Lambda generates a JSON representation of the error, when your code causes an error. This error document occurs in the invocation log. For synchronous invocations, the document appears in the output.
{ "errorType": "ReferenceError", "errorMessage": "x is not defined", "trace": [ "ReferenceError: x is not defined", " at Runtime.exports.handler (/var/task/index.js:2:3)", " at Runtime.handleOnce (/var/runtime/Runtime.js:63:25)", " at process._tickCallback (internal/process/next_tick.js:68:7)" ] }
Best solution:
https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-mode-exceptions.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
If your Lambda function triggers an exception, AWS Lambda recognizes the failure and serializes the exception information into JSON and returns it.
{ "errorMessage": "I failed!", "stackTrace": [ [ "/var/task/lambda_function.py", 3, "my_always_fails_handler", "raise Exception('I failed!')" ] ], "errorType": "Exception" }
Best solution
https://docs.aws.amazon.com/lambda/latest/dg/python-exceptions.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
Lambda generates a JSON representation of the error, when your code causes an error. This error document occurs in the invocation log. For synchronous invocations, the document appears in the output.
{ "errorMessage": "no implicit conversion of String into Integer", "errorType": "Function", "stackTrace": [ "/var/task/function.rb:3:in `first'", "/var/task/function.rb:3:in `handler'" ] }
Best solution:
https://docs.aws.amazon.com/lambda/latest/dg/ruby-exceptions.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
If your Lambda function causes an exception, AWS Lambda recognizes the failure and serializes the exception information into JSON and returns it.
{ "errorMessage": "Name John Doe is invalid. Exception occurred...", "errorType": "java.lang.Exception", "stackTrace": [ "example.Hello.handler(Hello.java:9)", "sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)", "sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)", "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)", "java.lang.reflect.Method.invoke(Method.java:497)" ] }
Best solution:
https://docs.aws.amazon.com/lambda/latest/dg/java-exceptions.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
You can create custom error handling to raise an exception directly from your Lambda function and handle it directly.
{ "errorMessage": "something went wrong!", "errorType": "errorString" }
Best solution:
https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model-errors.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
When an exception arises in your Lambda function, Lambda will report the exception information back to you. These exceptions can occur in two different places:
- Initialization
- The Lambda function invocation
The serialized exception information is returned as the payload as a modeled JSON object and given out to CloudWatch logs.
In the initializaion phase, exceptions can be thrown for invalid handler strings, a rule-breaking type or method, or any other validation method. These exceptions are of type LambdaExcpetion.
{ "errorType": "LambdaException", "errorMessage": "Invalid lambda function handler: 'http://this.is.not.a.valid.handler/'. The valid format is 'ASSEMBLY::TYPE::METHOD'." }
Best solution
https://docs.aws.amazon.com/lambda/latest/dg/dotnet-exceptions.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Learn more about AWS monitoring
Quick fix
When your Lambda function has a terminating error, AWS Lambda recognizes the failure, serializes the error information into JSON, and returns it.
{ "errorMessage": "The Account is not found", "errorType": "RuntimeException" }
Best solution
https://docs.aws.amazon.com/lambda/latest/dg/powershell-exceptions.html
More solutions:
https://epsagon.com/blog/how-to-handle-aws-lambda-errors-like-a-pro/
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
List of Error Codes:
Solution Error 403 Access Denied:
- https://aws.amazon.com/premiumsupport/knowledge-center/s3-troubleshoot-403/
- https://forums.aws.amazon.com/thread.jspa?threadID=56531
Solution Error 503:
- https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-503-service-unavailable.html
- https://forums.aws.amazon.com/thread.jspa?threadID=234361
Best solution
https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
ST Best Practices:
https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Quick fix
When an AWS Lambda fuction is invoked using an AWS SDK, the function times out, execution hangs, or an API action is duplicated.
These issues can arise when:
- You call a remote API that takes too long to respond or that is unreachable.
- Your API call doesn't get a response within the socket timeout.
- Your API call doesn't get a response within the timeout period of your Lambda function.
Best solution
https://aws.amazon.com/premiumsupport/knowledge-center/lambda-function-retry-timeout-sdk/
More solutions:
https://epsagon.com/blog/best-practices-for-aws-lambda-timeouts/
Proper fix
PRTG Network Monitor combined with your CloudWatch account helps you to keep an eye on your Amazon Web Services. You can monitor and analyze all Amazon instances and additionally PRTG lets you create data linkages so that you’ll be able to identify correlations while troubleshooting.
Choose your solution: Bugfix or replacement
Trusted by 500,000 users and recognized
by industry analysts as a leader
“Fantastic network and infrastructure monitoring solution that is easy to deploy and easier still to use. Simply the best available.”
“Software is absolutely perfect, Support is superior. Meets all needs and requirements, this is a must have solution if you are needing any form of monitoring.”
“The tool excels at its primary focus of being a unified infrastructure management and network monitoring service.”