Hi Folks. How do I get the resource name (example:...
# help
n
Hi Folks. How do I get the resource name (example:Bucket) for reference in the backend? Is there a way to get it by the ID used to create the resource in the stack?
a
You can pass the bucket name as an environment variable to the function:
n
can i do that with graphql?
n
so i pass the resource to the function and then it sets it as an env var that i can reference in the backend?
a
That's correct. You'll pass the bucket name since I believe env vars can only be strings.
n
Thanks!
f
Thanks @Aaron Eaton 🎯