Registry / devops / cdk-turborepo-remote-cache

cdk-turborepo-remote-cache

JSON →
library0.0.2jsnpmunverified

Deploy turborepo-remote-cache serverless on AWS using AWS CDK. v0.0.2 (initial release). Creates an S3 bucket and Lambda function with function URL to serve as a remote cache for Turborepo. Designed for CDK (Constructs) developers needing simple, API Gateway-free deployment. Requires aws-cdk-lib ^2.51.0 and constructs ^10.0.5. Not yet stable: API may change. Only TypeScript, ESM. Alternative has no security warnings but use with caution.

npm install cdk-turborepo-remote-cache
INSTALL
IMPORT
SIG · CDK-TURBOREPO-REMO
C
cdk-turborepo-remote-cache
devopsjavascriptv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TurborepoRemoteCache
import { TurborepoRemoteCache } from 'cdk-turborepo-remote-cache'
const { TurborepoRemoteCache } = require('cdk-turborepo-remote-cache')
Package is ESM-only; CommonJS require is not supported. Use import.
TurborepoRemoteCacheProps
import type { TurborepoRemoteCacheProps } from 'cdk-turborepo-remote-cache'
import { TurborepoRemoteCacheProps } from 'cdk-turborepo-remote-cache'
Props are exported as a type, not a value. Use import type for clarity in TypeScript.

Deploys a Lambda function with S3 bucket for Turborepo remote cache. The API URL is printed after deployment.

import { Stack, type StackProps, Duration } from 'aws-cdk-lib'; import { type Construct } from 'constructs'; import { TurborepoRemoteCache } from 'cdk-turborepo-remote-cache'; export class AwesomeStack extends Stack { constructor(scope: Construct, id: string, props?: StackProps) { super(scope, id, props); const secretToken = process.env.TURBO_TOKEN ?? 'your-secret-token'; new TurborepoRemoteCache(this, 'TurborepoCache', { secretToken, }); } }
Debug
Known issues
breakingPackage is v0.0.2: no stable release. API may change without notice.
fix
Pin exact version and test upgrades carefully.
affects: <1.0.0
gotchaThe secretToken is stored in Lambda environment variables. AWS Lambda environment variables are visible in the console and API. Do not use highly sensitive tokens.
fix
Use AWS Secrets Manager or SSM Parameter Store for production secrets.
affects: all
deprecatedDnsValidatedCertificate is deprecated. New standard is Certificate in Stack in us-east-1.
fix
Use Certificate with DNS validation in a separate stack deployed in us-east-1.
affects: all
gotchaThe teamid in .turbo/config.json must start with 'team_'. Otherwise turborepo will not use this remote cache.
fix
Set teamid to a string starting with 'team_', e.g., 'team_hello-world'.
affects: all
gotchaThe apiurl in .turbo/config.json must not have a trailing slash. If present, turborepo requests may fail.
fix
Remove trailing slash from the Lambda function URL.
affects: all
Errors
Common errors & fixes
Cannot find module 'cdk-turborepo-remote-cache'
Package not installed or missing from package.json.
fix
Run: npm install cdk-turborepo-remote-cache or yarn add cdk-turborepo-remote-cache
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require instead of import.
fix
Use import statement: import { TurborepoRemoteCache } from 'cdk-turborepo-remote-cache'
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies
aws-cdk-librequiredPeer dependency for CDK constructs
constructsrequiredPeer dependency for construct base class
Agent activity
2 hits · last 30 days
node
2
Resources