Wednesday, April 09, 2025

AWS Lambda error: Sandbox.Timedout 3.00 Seconds

In a AWS lambda, we suddenly started seeing this error:

 {

  "errorType": "Sandbox.Timedout",

  "errorMessage": "RequestId: xxxxxx-xxxx-xxx-xxxxxxxxxxx Error: Task timed out after 3.00 seconds"

}

The "Sandbox.Timeout" threw me and I could not figure out where it was coming from.

Turned out, the error was being thrown by the AWS Lambda Infrastructure, because it was configured to run for only 3 seconds. This is done via the Configuration tab and editing the "General Configuration" and increasing the timeout setting.



Tuesday, April 01, 2025

PowerBI + PostGreSql + AWS-RDS

 I was getting an error when trying to connect using the PostGreSQL connector in PowerBi.

    The remote certificate is invalid according to the validation procedure

The basic solution is informed by this AWS post: Set up SSL/TLS client connections to Amazon RDS for SQL Server and Amazon RDS for Oracle | AWS Database Blog, but I found it didnt work exactly the way in that post (PEM file didnt work).

Luckily for us, AWS now provides a PKCS7 file. So, go to Using SSL/TLS to encrypt a connection to a DB instance or cluster - Amazon Relational Database Service and download the bundle appropriate for your AWS Region. (You can use the global bundle, but the problem with that is you will have to hit approve in the Import Wizard many times (approximately 3 for every zone)). So, using your region's cert bundle will lessen the number of clicks.

Once downloaded, you will have to open your Windows Certificate Manager (Windows >> Run >> CertMgr.msc).

In the CertMgr, click on "Trusted Root Certification Authorities" >> Certificates and then Import.

In the Import Wizard, you will have to find the P7B file you downloaded from AWS and import it. Approve the next few steps. You should now be able to connect to PostgreSql running AWS-RDS.

These steps should also work for connecting SQL Server to PostgreSql in AWS.