Ship .NET to AWS. From scratch in 10 minutes.

A command-line companion for .NET teams shipping to AWS — from the first scaffold to every release after. One manifest powers the entire delivery pipeline: preview stacks for every PR, promotion through dev, stage, and prod, and five-second rollbacks. All with the reproducibility and audit trail hand-rolled CI scripts never gave you.

~/Kanject.Analytics — zsh

Start fast.

Install the tool, check the machine, scaffold, deploy.

Free · .NET global tool
$ dotnet tool install -g Kanject.Cli
  1. Install

    dotnet tool install -g Kanject.Cli

    .NET global tool, straight from NuGet.org.

  2. Check

    kanject doctor

    Verifies .NET, AWS CLI, Lambda tools, PATH, and project shape.

  3. Scaffold

    kanject new webapi --name Kanject.Analytics

    Creates the solution, manifest, lockfile, stages, tests, and Lambda defaults.

  4. Deploy

    kanject aws deploy --env dev

    Packages, deploys, flips the alias, writes the ledger, then prints the URL.

One manifest, many targets.

Your .NET service is described once, in the manifest. Today it ships to AWS Lambda or ECS Fargate from that one contract — and more compute targets plug in without changing how you deploy.

you write
your .NET service csproj + handlers
one contract
manifest.json one contract · in git
devstageprod
where it runs
AWS Lambda shipped
zip / image → API Gateway
ECS Fargate shipped
container → load balancer
More targets coming
the same manifest, new compute
fans out across stagesregionspreviews Every deploy is recorded in the S3 ledger — audit and rollback read one source of truth.

Pick your path.

Different teams arrive with different problems. The CLI meets them where they are.

Green field

New .NET service

Go from an empty folder to a deployed dev API with stages, tests, manifest, and rollback already wired.

kanject new webapi
Existing app

Bring a Lambda under control

Add kanject beside an existing project without rewriting your app or replacing the AWS Lambda toolchain.

kanject init
Debugging

Reproduce cloud-only bugs locally

Run the app or Lambda TestTool with stage-shaped env, including clear warnings when secrets enter the local process.

kanject test --pull-env
Delivery

Ship every PR safely

Use preview stacks for ephemeral review environments, then deploy the same manifest to dev, stage, or prod.

kanject aws preview
Operations

Audit and recover

Browse the deployment ledger, mark bad versions, and flip prod back to a known-good Lambda version without rebuilding.

kanject aws rollback
Platform

Add CI, VPC, and domains

Scaffold CodePipeline/CodeBuild when you want AWS-native CI, or keep GitHub Actions and run deploy non-interactively.

kanject aws configure

Know what changes.

Six artifacts make the workflow predictable: reviewed inputs in git, one generated file, and an audit ledger in S3.

workflow artifacts
you edit · in git
manifest.json service identity Service name, provider, stages, entries, package type, and cross-repo dependencies.
manifest.lock.json sync output Pinned SHAs and content hashes so CI builds the same dependency graph every time.
stages/<stage>.json stage config Region, profile, stack, bucket, parameter path, and env references for each target.
preview.json optional policy TTL, base stage, stack naming, and sharing rules for ephemeral preview stacks.
kanject
aws deploy
kanject writes
aws-lambda-tools.<stage>.json deploy input · regenerated each deploy Regenerated from stage config before deploy. It is an output, not a file to hand-edit.
S3 deployment ledger audit + rollback Append-only version snapshots with commit SHA, deployer, env hashes, status, and alias target.
you edit (git) generated, ephemeral recorded in S3

CI that survives a cross-repo dependency.

If your service pulls shared libraries from other repos, a clean CI checkout can't find them — ..\..\Shared\Foo.csproj resolves on your machine and nowhere else, and the build goes red. kanject sync resolves each one from git at a pinned commit, so any runner builds the same graph.

without kanject
ci · fresh runner
$ git clone … && dotnet restore
Determining projects to restore…
✗ error NU1105: unable to find project information
for '..\..\Shared\Acme.Shared.csproj'.
✗ Build FAILED.
with kanject
ci · with kanject
$ kanject sync && dotnet build
✓ Acme.Shared cloned @ a1b2c3d · packed
✓ rewritten → <PackageReference> · lock pinned
✓ Build succeeded.

On a fresh runner kanject sync runs first — cloning each cross-repo dependency at the commit pinned in manifest.lock.json, packing it, and rewriting the project reference to a package — so restore finds everything and every runner builds the same graph.

Roll back.

Five seconds. No rebuild.

kanject-analytics — zsh

Command map.

Every command has a place in the loop.

01
Set up

Create or adopt a project, then verify the local toolchain.

  • kanject new

    Scaffold a new project from a template.

  • kanject init

    Initialise kanject in an existing project.

  • kanject doctor

    Pre-flight checks against the toolchain and stages.

  • kanject update

    Pull the newest CLI + template pack from NuGet.

02
Daily

Work locally, manage stages and env, and keep dependencies reproducible.

  • kanject add function

    Add a Lambda entry to a multi-function service.

  • kanject add stage

    Add a stage (qa, prod-eu, canary…) to the manifest.

  • kanject add lib

    Register a cross-repo class library as a dep.

  • kanject add env

    Bind plain, SSM, or Secrets Manager values into a stage.

  • kanject env

    Inspect the resolved env for a stage.

  • kanject sync

    Resolve and pack every cross-repo dep at its pinned ref.

  • kanject test

    Run locally — webapi, Lambda TestTool, library aware.

  • kanject migrate

    Convert legacy ProjectReference paths into manifest deps.

03
AWS

Deploy, preview, configure, audit, and recover against the active provider.

  • kanject aws deploy

    Build, package, deploy, publish version, flip alias, write ledger.

  • kanject aws rollback

    Pick a prior version. Alias-flip in five seconds.

  • kanject aws deployments

    Browse the ledger. Mark versions stable or broken.

  • kanject aws preview

    Per-PR ephemeral stacks: ls, rm, url, extend.

  • kanject aws pipeline

    Scaffold and bootstrap CodePipeline + CodeBuild.

  • kanject aws distribute

    Build + publish apps/libraries to CodeArtifact, GitHub Releases, or S3. (Pro)

  • kanject aws configure

    Wizards for VPC + custom-domain stage config.

What’s in the box.

The sharp edges kanject smooths over without replacing the tools you already trust.

Proof: kanject sync

Cross-repo dependencies

Declare a class library by git URL, ref, and project path. Kanject packs it into a local feed and rewrites consumers to use <PackageReference> so CI builds on a fresh machine.

Proof: _ledger/versions/*.json

Deployment ledger

Every deploy writes an append-only snapshot with version ARN, commit SHA, lockfile hash, deployer, and env hashes. Audit and rollback read the same source of truth.

Proof: kanject aws preview url

Preview stacks

Per-PR CloudFormation stacks inherit region, profile, and parameter path from a base stage, expire on a TTL, and can be cleaned up on a daily job.

Proof: kanject add function

Multi-Lambda single stack

Schema v2 lets one service host multiple Lambda entries in a single CloudFormation stack when they should deploy and roll back as one atomic unit.

Proof: aws.provider

Plugin-loaded providers

AWS is the product path today. The provider host keeps cloud-bound commands behind adapters, with owner checks and isolated plugin loading for future provider packages.

Proof: kanject aws deploy --yes

CI scaffolding (or not)

Generate CodePipeline and CodeBuild when you want AWS-native CI, or keep any runner that has .NET, AWS credentials, and the CLI installed.

You own every resource.

Kanject deploys into your own AWS account — real CloudFormation you never have to write. Inspect the stack, diff it, tear it down. You pay AWS directly; nothing runs on Kanject's infrastructure.

Every deploy Created and managed for you on the first deploy.

AWS Lambda · ECS Fargate

Runs your .NET service — a Lambda function (new version + alias flip each deploy), or an autoscaling ECS Fargate service behind an Application Load Balancer.

CloudFormation

Your whole service is one stack — a Lambda + API Gateway, or an ECS service with its load balancer, IAM roles, and log groups. Generated for you, never hand-authored: inspect it, diff it, delete it.

Amazon S3 · ECR

S3 keeps the append-only deployment ledger — every version, who shipped it, the hashes rollback trusts. ECR holds your container image when you ship an image package or an ECS service.

Only when you opt in Nothing here exists until you ask for it.

CodePipeline + CodeBuild

AWS-native CI, scaffolded by kanject aws pipeline. Skip it and run deploys from GitHub Actions instead.

SSM + Secrets Manager

Where stage environment values resolve from when you bind them — Parameter Store or Secrets Manager.

VPC + custom domains

Wired through the kanject aws configure wizards when a stage needs them.

One CloudFormation stack per service. You own it, you can read every line, and the bill comes from AWS — not from us.

Ship the apps and libraries, too.

deploy puts your service on AWS. kanject distribute ships everything else — class libraries and desktop apps — built per edition and runtime, signed, and published where each kind belongs.

$kanject aws distribute --env release
library Acme.Sdk
communitypro
CodeArtifact private NuGet feed
desktop app Acme.App
win-x64osx-arm64linux-x64
GitHub Releases signed binaries

One run fans out every distributable × edition × RID cell to its mapped destination — CodeArtifact, GitHub Releases, or S3 — and records what shipped where in a distribution ledger. kanject github distribute scopes a run to releases only.

We build and ship DynoStudio — our own desktop app — with kanject distribute.

Make the code as clean as the deploy.

You've scaffolded and deployed with the free CLI — and inside those projects you can write whatever you like, straight against the AWS SDK. Kanject Core is the optional paid layer that does it for you: twelve .NET libraries that trade SDK boilerplate for clean, typed, testable C#, all in your own AWS account.

NoSqlDatabaseSqlDatabaseCacheDbFileRepositorySecretsQueueCloudFunctionApiAdapterLogsRecurringEtlTaskManager
Ready to run?

Start with the CLI docs.

Install Kanject CLI, scaffold a .NET service, and deploy your first AWS stage from the quick-start guide.