Skip to content

Commit

Permalink
minor docs update
Browse files Browse the repository at this point in the history
* use proper JSON in example
* add hint on how to update example Lambda
  • Loading branch information
ChristianUlbrich committed Aug 21, 2024
1 parent 420a370 commit d63a165
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static invocation_response my_handler(invocation_request const& req)
"error type here" /*error_type*/);
}

return invocation_response::success("json payload here" /*payload*/,
return invocation_response::success("{\"message:\":\"I fail if body length is bigger than 42!\"}" /*payload*/,
"application/json" /*MIME type*/);
}

Expand Down Expand Up @@ -139,6 +139,10 @@ And to invoke the function:
```bash
$ aws lambda invoke --function-name demo --cli-binary-format raw-in-base64-out --payload '{"answer":42}' output.txt
```

You can update your supplied function:
```bash
$ aws lambda update-function-code --function-name demo --zip-file fileb://demo.zip
```

## Using the C++ SDK for AWS with this runtime
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static invocation_response my_handler(invocation_request const& req)
"error type here" /*error_type*/);
}

return invocation_response::success("json payload here" /*payload*/,
return invocation_response::success("{\"message:\":\"I fail if body length is bigger than 42!\"}" /*payload*/,
"application/json" /*MIME type*/);
}

Expand Down

0 comments on commit d63a165

Please sign in to comment.