© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•2y ago•
6 replies
Richard

AWS SDK in Tail Worker?

Is it possible to use aws sdks in workers?

I see Cloudflare have an example repo https://github.com/cloudflare/workers-aws-template/blob/master/index.js

However, when I try to deploy my worker it fails due to the SDK requiring Node APIs under the hood (see screenshot).

My worker has Node compatibility specified in the wrangler file i.e.

compatibility_flags = ["nodejs_compat"]
compatibility_flags = ["nodejs_compat"]


However, I also note from the Cloudflare docs (https://developers.cloudflare.com/workers/runtime-apis/nodejs/) that the
fs
fs
module is not supported. Additionally, the sdk does not import the modules as suggested by the docs e.g.
import { Buffer } from 'node:buffer'; 
import { Buffer } from 'node:buffer'; 
(which I obviously can not change).

Has anyone managed to get this to work? Or is it a known limitation?

My thinking was since they provide an example then it must be possible.
workers-pic.png
GitHub
workers-aws-template/index.js at master · cloudflare/workers-aws-te...
Cloudflare Workers template for accessing AWS services such as DynamoDB and SQS - cloudflare/workers-aws-template
Cloudflare Docs
Node.js compatibility · Cloudflare Workers docs
Implemented Node.js runtime APIs and enablement instructions for your Worker project.
Node.js compatibility · Cloudflare Workers docs
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Errors in websocket worker tail
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
4mo ago
Cloudflare Worker Rust Tail Worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Tail Worker Error Handling
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
[Tail Worker]: Exceptions Stacktraces
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago