Skip to content

Run Artisan Command on Lambda Function #1892

Closed Answered by h-kenji1
h-kenji1 asked this question in Support
Discussion options

You must be logged in to vote

Hey, man! Thanks one more time!
I finally could solve it!

Actually, the cli key is necessary indeed but it also needs to be escaped with backslashes like you mentioned previously.

This is it how worked for me:
aws lambda invoke --function-name functionName --cli-binary-format raw-in-base64-out --payload '{ \"cli\":\"route:list\"}' out

The bref documentation says:(https://bref.sh/docs/runtimes/console)
Note: The --payload needs to contain a JSON string, that is why it is quoted twice: '"..."'. This is intentional.

So maybe the command itself doesn't need to be quoted twice anymore I suppose? I'm not sure..
Anyway, thanks for the help!

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@mnapoli
Comment options

@h-kenji1
Comment options

Answer selected by h-kenji1
@mnapoli
Comment options

@h-kenji1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants