© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•13mo ago•
2 replies
lavisht22

Unable to use AWS SDK v3 in edge functions.

I want to call Bedrock API using AWS SDK v3. It was working fine earlier, suddenly it stopped working.

Here is my code:

  const bedrockClient = new BedrockRuntimeClient({
          region: "ap-south-1",

          credentials: {
            accessKeyId: Deno.env.get("AWS_ACCESS_KEY_ID") || "",
            secretAccessKey: Deno.env.get("AWS_SECRET_ACCESS_KEY") ||
              "",
          },
        });

        const response = await bedrockClient.send(
          new InvokeModelCommand({
            modelId: "amazon.titan-embed-image-v1",
            contentType: "application/json",
            accept: "application/json",
            body: JSON.stringify({
              inputText: query,
              

            }),
          }),
        );
  const bedrockClient = new BedrockRuntimeClient({
          region: "ap-south-1",

          credentials: {
            accessKeyId: Deno.env.get("AWS_ACCESS_KEY_ID") || "",
            secretAccessKey: Deno.env.get("AWS_SECRET_ACCESS_KEY") ||
              "",
          },
        });

        const response = await bedrockClient.send(
          new InvokeModelCommand({
            modelId: "amazon.titan-embed-image-v1",
            contentType: "application/json",
            accept: "application/json",
            body: JSON.stringify({
              inputText: query,
              

            }),
          }),
        );



Here is the error:

Error: [unenv] fs.readFile is not implemented yet!\n    at n (https://esm.sh/node/chunk-5A4BT3HD.mjs:1:22)\n    at Object.assign.__unenv__ (https://esm.sh/node/chunk-5A4BT3HD.mjs:1:118)\n    at l (https://esm.sh/@smithy/shared-ini-file-loader@3.1.12/es2022/shared-ini-file-loader.mjs:3:2129)\n    at I (https://esm.sh/@smithy/shared-ini-file-loader@3.1.12/es2022/shared-ini-file-loader.mjs:3:2352)\n    at https://esm.sh/@smithy/node-config-provider@3.1.12/es2022/node-config-provider.mjs:3:852\n    at https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:757\n    at eventLoopTick (ext:core/01_core.js:168:7)\n    at async c (https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:910)\n    at async https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:1009
Error: [unenv] fs.readFile is not implemented yet!\n    at n (https://esm.sh/node/chunk-5A4BT3HD.mjs:1:22)\n    at Object.assign.__unenv__ (https://esm.sh/node/chunk-5A4BT3HD.mjs:1:118)\n    at l (https://esm.sh/@smithy/shared-ini-file-loader@3.1.12/es2022/shared-ini-file-loader.mjs:3:2129)\n    at I (https://esm.sh/@smithy/shared-ini-file-loader@3.1.12/es2022/shared-ini-file-loader.mjs:3:2352)\n    at https://esm.sh/@smithy/node-config-provider@3.1.12/es2022/node-config-provider.mjs:3:852\n    at https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:757\n    at eventLoopTick (ext:core/01_core.js:168:7)\n    at async c (https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:910)\n    at async https://esm.sh/@smithy/property-provider@3.1.11/es2022/property-provider.mjs:2:1009
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Edge Functions unable to connect?
SupabaseSSupabase / help-and-questions
13mo ago
Unable to log my edge functions
SupabaseSSupabase / help-and-questions
4mo ago
Use python libraries in supabase edge functions
SupabaseSSupabase / help-and-questions
3y ago
Directories in edge functions.
SupabaseSSupabase / help-and-questions
4y ago