Issues Triggering Llamda Functions

Hi Folks,

This is my first time working with Llamda functions and I’m having issues triggering functions. I’m trying to get geo-specific redirects for my site https://www.bipbapbop.com/

When I type the addresses of the functions (or URLs that should redirect to the functions) into my browser I get 404 errors:

https://www.bipbapbop.com/.netlify/functions/redirect.mjs
https://www.bipbapbop.com/.netlify/functions/hello.mjs

However when I access the endpoints direct that works:
https://www.bipbapbop.com/.netlify/functions/hello

Here is my site name: lovely-semifreddo-4bea40
I’ve attached details of the toml file and site structure.

Thanks for your help!

File Structure

from: Lambda compatibility for Functions | Netlify Docs


For example, to create a function with an endpoint name of `hello`, save the function file in one of the following ways:

* `netlify/functions/hello.js`
* `netlify/functions/hello/hello.js`
* `netlify/functions/hello/index.js`

These formats would deploy a synchronous function that can be called on the following endpoint: `/.netlify/functions/hello`. The endpoint is relative to the base URL of your site. Here are some example full endpoint URLs: `yoursitename.netlify.app/.netlify/functions/hello` for a site using the default Netlify subdomain or `www.yourcustomdomain.com/.netlify/functions/hello` for a site using a custom domain.

maybe you can try
https://www.bipbapbop.com/.netlify/functions/redirect
instead of https//www.bipbapbop.com/.netlify/functions/redirect.mjs

1 Like

Thanks Andre,

That solved the issue!!