-
Notifications
You must be signed in to change notification settings - Fork 74
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
how are you meant to pass the API URL for use within a lambda function? #2448
Comments
Hey @cookiejest, thank you for reaching out. The documentation has been recently updated providing additional information on this. Could you refer to the following documentation: https://docs.amplify.aws/react/build-a-backend/troubleshooting/circular-dependency/ |
Unfortunately that's not particularly useful. It's a lot of text with no real workable solution to it. In summary it says 'put all your stuff in the same stack.. but if you still get the error there is an issue' If that page was to be helpful there should be an example and how to actually fix it. |
@cookiejest could you provide us the full error message and information on the resources the lambda function is currently being used in? |
I have ended up going around it by setting the api URL as an environment variable. Not ideal |
@cookiejest if the error message indicates the circular dependency found between nested stacks when using a custom resource, for example
if you could provide us information on your existing architecture and error message, this would help us in diving into the issue. |
both of those are complete opposite solutions. Here is my backend.ts
|
Hey @cookiejest, thank you for providing the information on the resource. On creating a minimal reproduction, currently CloudFormation throws minimal reproduction:
To break the circular dependency, I was able to group the api resource and the function in the auth stack
|
Environment information
Describe the bug
API URL not accessible inside a lambda function
Reproduction steps
Any example please?
The text was updated successfully, but these errors were encountered: