Closed thorwebdev closed 6 months ago
Do note that this is not a Deno specific issue. It will happen in any environment that doesn't have filesystem. e.g. vercel edge functions, cloudflare workers etc.
Okay, I was able to work around this by mocking the file system for the AWS config files:
In my .env
file I do
AWS_SHARED_CREDENTIALS_FILE="./aws/credentials"
AWS_CONFIG_FILE="./aws/config"
Then in my function I do
import {
prepareVirtualFile,
} from "https://deno.land/x/mock_file@v1.1.2/mod.ts";
prepareVirtualFile("./aws/config");
prepareVirtualFile("./aws/credentials");
This makes it work in Supabase Edge Functions. So feel free to close this issue, but I'm still not sure if the file system should be needed at all in this scenario, so you might want to fix this nonetheless. Thanks.
Hi @thorwebdev ,
The AWS SDK only provides support for AWS resources and not 3rd party tools. So instead of Supabase functions, we offer support for Lambda.
If you need a certain AWS product to work with supabase you'll need to reach out to their support for further assistance.
Thanks, Ran~
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Checkboxes for prior research
Describe the bug
When using
@aws-sdk/client-bedrock-runtime
within the Supabase Edge Runtime I get the following error because this runtime doesn't have access to the file system.SDK version number
@aws-sdk/client-bedrock-runtime@3.583.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
deno 1.43.3 (release, aarch64-apple-darwin); v8 12.4.254.13; typescript 5.4.5
Reproduction Steps
supabase init
supabase functions new bedrock
supabase/functions/bedrock/index.ts
file:supabase/.env
file with your AWS credentialssupabase functions serve --env-file supabase/.env
Observed Behavior
Expected Behavior
Since I'm passing the required configuration
BedrockRuntimeClientConfig
within the code, so in my scenario the client shouldn't need to access the file system.Possible Solution
Would you be able to wrap the file system access in a way that it doesn't throw an error? For context, if I run my code in a local environment that exposes the file system, it works fine.
Additional Information/Context
No response