- Node.js (version 20.x or later)
- AWS CLI configured with appropriate credentials
- AWS CDK CLI installed (
pnpm install -g aws-cdk
)
-
Clone the repository:
git clone https://github.com/your-username/turbo-remote-cache-api.git cd turbo-remote-cache-api
-
Install dependencies:
pnpm install
-
Configure AWS CDK (if not already done):
cdk bootstrap
To deploy the stack to your AWS account:
cdk deploy
This command will output the API Gateway URL, which you'll use to interact with the Remote Cache API.
PUT /v8/artifacts/{hash}
: Upload an artifactGET /v8/artifacts/{hash}
: Download an artifactHEAD /v8/artifacts/{hash}
: Check if an artifact existsPOST /v8/artifacts/events
: Record cache eventsGET /v8/artifacts/status
: Check API status
For detailed API documentation, refer to openapi.yaml
in the docs/api/
directory.
The lib/
directory contains the CDK stack definition. Lambda function implementations are located in the lambda/
directory.
To add a new feature or modify existing ones:
- Update the CDK stack in
lib/turbo-remote-cache-stack.ts
if necessary. - Implement or modify Lambda functions in the
lambda/
directory. - Update the OpenAPI specification in
docs/api/openapi.yaml
if the API changes. - Run
cdk diff
to see changes before deploying.
(Add information about running tests once they are implemented)