Skip to Content
๐ŸŽ‰ Bref 3.0 is released. Read more โ†’

CLI commands

We can run CLI commands and scripts on AWS Lambda by deploying a โ€œconsoleโ€ function with serverless.yml.

functions: cli: handler: the-php-script-to-run.php runtime: php-84-console

The function uses the Console runtime.

To execute the script on Lambda, run the command below:

serverless bref:cli

We can also pass arguments to the script:

serverless bref:cli --args="extra command line arguments and options"

Our script will be invoked inside AWS Lambda and the result will be printed to the console.

To learn more, read the โ€œConsoleโ€ guide.

Last updated on