Search⌘ K
AI Features

Invoking System Utilities

Explore how to use Node.js child process features to invoke command-line utilities like mogrify in AWS Lambda. Learn to wrap spawn in promises for async use, modify Lambda functions for image resizing, and deploy with SAM while managing CloudFormation capabilities.

We'll cover the following...

child_process #

Now that mogrify is available to your Lambda function, you can change the source code for the conversion function to execute it.

To start a command-line utility from JavaScript, you’ll need to use the Node.js child process features.

The spawn function from the Node.js child_process module uses callbacks. You need to ...