Skip to content

docs/refactor: add documentation for invoking HTTP functions locally #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 18, 2023
Merged

docs/refactor: add documentation for invoking HTTP functions locally #601

merged 6 commits into from
Feb 18, 2023

Conversation

winstxnhdw
Copy link
Contributor

@winstxnhdw winstxnhdw commented Feb 17, 2023

Summary

As mentioned in #599, I have added some light documentation for invoking the HTTP Lambda functions locally. Additionally, I have fixed all of the non-visual markdown lint warnings/errors. I did not fix all of them to preserve the styling of the original authors in the case that it was done intentionally.

I have also converted Utc.ymd to the non-deprecated Utc.with_ymd_and_hms. Tested and functional.

Explanation

When a reader looks at Deploying with Cargo Lambda, the reader has likely not read the official cargo-lambda documentation. It is then possible that there may be an assumption, through disjunction, that it is possible to execute cargo lambda invoke without the --remote flag.

The user may then try this command on the first given example to find that the command runs successfully. Later on, they may write a HTTP function and assume that the command is a signal of correctness, only to find that the command fails.

Inevitably, after several futile attempts at debugging, the user may come back to the documentation and notice there is no documentation describing their issue until they finally choose to look at the cargo-lambda documentation where they must notice the following in a glance, along with the context of the first paragraph.

image

With the updated documentation, the user will likely perform a search for data did not match any variant of untagged enum LambdaRequest and quickly realise their blunder.

Disclaimer

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

- use `cargo lambda watch` instead of `start` because `start` is not listed in `cargo lambda --help`
- fix incorrect redirect to `cargo lambda watch` instead of `cargo lambda invoke`
@bnusunny bnusunny merged commit 26b330d into awslabs:main Feb 18, 2023
@greenwoodcm
Copy link
Contributor

good change, thanks!

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

Successfully merging this pull request may close these issues.

3 participants