Skip to content
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

Adds instruction to invoke a function via its url #7595

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johnpc
Copy link
Contributor

@johnpc johnpc commented May 15, 2024

Description of changes:

This PR updates the Set up a Function page to include instructions on how to to invoke the function you've created via a function url.

We may prefer to edit this to put the function behind the data schema instead, but this option works. It also fixes the existing type issue in #7594 because it is able to type the function event as a LambdaFunctionURLEvent.

Related GitHub issue #, if available:

Fixes #7594

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@renebrandel renebrandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be the "primary flow", as it'll likely result in a few unexpected situations for the customer. There's no authZ protection, e2e type safety, and customers need to think about "CORS".

I think we should this "Enable function URLs" as a separate with a callout that we don't recommend this directly.

@renebrandel
Copy link
Contributor

Instead the default flow, should go through data.

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.

Gen 2 Set up a Function yields compilation error
3 participants