Created
March 14, 2024 14:02
-
-
Save leandroribeiro/418c631edfd70c120878c4ec961af719 to your computer and use it in GitHub Desktop.
Serverless Invoke using file data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$token = $args[0] | |
$original_dir = Get-Location | |
Set-Location .. | |
(Get-Content "$original_dir\event.json" -Raw) -replace "#TOKEN#", $token | Set-Content "$original_dir\event.tmp.json" | |
serverless invoke --function validateToken --path "$original_dir\event.tmp.json" --config .\serverless.yml --log | |
Remove-Item "$original_dir\event.tmp.json" | |
Set-Location "$original_dir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment