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"]


However, I also note from the Cloudflare docs (https://developers.cloudflare.com/workers/runtime-apis/nodejs/) that the
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'; 
(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
Cloudflare Workers template for accessing AWS services such as DynamoDB and SQS - cloudflare/workers-aws-template
Cloudflare Docs
Implemented Node.js runtime APIs and enablement instructions for your Worker project.
Was this page helpful?