diff --git a/internal/lambdas/data-import/main.go b/internal/lambdas/data-import/main.go index fe488803..00213b61 100644 --- a/internal/lambdas/data-import/main.go +++ b/internal/lambdas/data-import/main.go @@ -30,6 +30,7 @@ import ( "github.com/pixlise/core/v4/core/fileaccess" "github.com/pixlise/core/v4/core/logger" "github.com/pixlise/core/v4/core/mongoDBConnection" + "github.com/pixlise/core/v4/core/utils" ) func HandleRequest(ctx context.Context, event awsutil.Event) (string, error) { @@ -80,6 +81,13 @@ func HandleRequest(ctx context.Context, event awsutil.Event) (string, error) { // and it'll be useful for initial debugging fmt.Printf("ImportForTrigger: \"%v\"\n", record.SNS.Message) + freeBytes, err := utils.GetDiskAvailableBytes() + if err != nil { + fmt.Printf("Failed to read disk free space: %v\n", err) + } else { + fmt.Printf("Disk free space: %v\n", freeBytes) + } + mongoClient, _, err := mongoDBConnection.Connect(sess, mongoSecret, iLog) if err != nil { log.Fatal(err)