Softwr

Developer Tools · head to head

AWS CDK vs Google Cloud Run

AWS CDK logo

AWS CDK

Developer Tools

Open source framework for defining AWS infrastructure in programming languages

From
Free
Free plan
Yes
Google Cloud Run logo

Google Cloud Run

Cloud

Managed platform for running containers and functions on Google Cloud

From
On request
Free plan
No

The short version

  • AWS CDK is an Apache 2.
  • AWS CDK is free; Google Cloud Run prices on request.
  • Only AWS CDK lists construct Library of reusable components; only Google Cloud Run lists deploy any container image.
  • Where AWS CDK falls short: targets AWS only, so it does not provision resources on other clouds.
  • Where Google Cloud Run falls short: runs only on Google Cloud, so there is no self-hosted option.

How do AWS CDK and Google Cloud Run differ?

AWS CDK and Google Cloud Run differ on starting price (Free against On request), pricing model (Open-source against Usage-based) and free tier (Yes against No). Only the attributes on which AWS CDK and Google Cloud Run actually diverge.

Attributes where AWS CDK and Google Cloud Run differ
AttributeAWS CDKGoogle Cloud Run
Starting priceFreeOn request
Pricing modelOpen-sourceUsage-based
Free tierYesNo
PlatformsWindows, macOS, LinuxWeb
CategoryDeveloper ToolsCloud

Which features does each one have?

They share no listed features; 8 appear only for AWS CDK and 9 only for Google Cloud Run. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in AWS CDK

  • Construct Library of reusable components
  • CDK CLI for synthesis and deployment
  • Programmatic CDK Toolkit Library
  • Support for TypeScript, JavaScript, Python, Java, C# and Go
  • Deployment through AWS CloudFormation
  • Custom and shareable constructs
  • Construct Hub registry
  • Open source under Apache 2.0

Only in Google Cloud Run

  • Deploy any container image
  • Source-based builds for common languages
  • Services with automatic scaling and scale to zero
  • Jobs for scheduled or manual tasks
  • Worker pools for background processing
  • Traffic splitting and rollback between revisions
  • Custom domains and managed TLS
  • Request-based and instance-based billing

What is each one used for?

AWS CDK is most often brought in for defining AWS infrastructure in TypeScript or Python; Google Cloud Run for hosting web APIs and microservices. The jobs each tool is most often brought in to do.

AWS CDK

  • Defining AWS infrastructure in TypeScript or Pythonnot Google Cloud Run
  • Reusable internal infrastructure modulesnot Google Cloud Run
  • Serverless application stacksnot Google Cloud Run
  • Testing infrastructure with unit testsnot Google Cloud Run
  • Standardising environments across accountsnot Google Cloud Run

Google Cloud Run

  • Hosting web APIs and microservicesnot AWS CDK
  • Scheduled batch jobsnot AWS CDK
  • Queue consumers on worker poolsnot AWS CDK
  • Deploying containers without managing clustersnot AWS CDK
  • Event-driven backends with Pub/Subnot AWS CDK

Where do AWS CDK and Google Cloud Run fall short?

AWS CDK's most cited limit: targets AWS only, so it does not provision resources on other clouds. Google Cloud Run's: runs only on Google Cloud, so there is no self-hosted option. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

AWS CDK

  • Targets AWS only, so it does not provision resources on other clouds
  • Deploys through CloudFormation, so its resource coverage and limits apply
  • Infrastructure written in code can be harder to review than declarative templates
  • The AWS resources it creates are billed separately at standard AWS rates

Google Cloud Run

  • Runs only on Google Cloud, so there is no self-hosted option
  • The container file system is in memory and not persistent
  • Worker pools do not autoscale natively and need at least one instance
  • Services are stateless, so state needs external storage

How much do AWS CDK and Google Cloud Run cost?

AWS CDK is free to use. Plan by plan below, from each vendor's own pricing page.

AWS CDK

Free

No published plan breakdown. See the AWS CDK review.

Google Cloud Run

On request

No published plan breakdown. See the Google Cloud Run review.

Which should you pick?

Choose AWS CDK if

  • You need construct library of reusable components.
  • You want to start without paying.
  • You work on Windows, macOS, Linux.
  • You also want cdk cli for synthesis and deployment.

Choose Google Cloud Run if

  • You need deploy any container image.
  • You also want source-based builds for common languages.

Questions people ask

Is AWS CDK or Google Cloud Run better?
It depends on the job. AWS CDK fits defining AWS infrastructure in TypeScript or Python; Google Cloud Run fits hosting web APIs and microservices. AWS CDK starts at Free and Google Cloud Run at On request.
Which is cheaper, AWS CDK or Google Cloud Run?
AWS CDK has a free tier; the other does not. Paid plans start at Free for AWS CDK and On request for Google Cloud Run.
Does AWS CDK or Google Cloud Run run on more platforms?
AWS CDK runs on Windows, macOS, Linux. Google Cloud Run runs on Web.
Can I use AWS CDK for free?
Yes. AWS CDK has a free tier, so you can try it without paying. Google Cloud Run starts at On request.
What is AWS CDK best used for?
AWS CDK is most often used for defining aws infrastructure in typescript or python, reusable internal infrastructure modules, serverless application stacks, testing infrastructure with unit tests. Of those, defining aws infrastructure in typescript or python and reusable internal infrastructure modules are not what Google Cloud Run is typically brought in for.
What can AWS CDK do that Google Cloud Run cannot?
AWS CDK covers Construct Library of reusable components, CDK CLI for synthesis and deployment, Programmatic CDK Toolkit Library, Support for TypeScript, JavaScript, Python, Java, C# and Go. Google Cloud Run covers Deploy any container image, Source-based builds for common languages, Services with automatic scaling and scale to zero, Jobs for scheduled or manual tasks.

Answered from the vendors’ own pages

AWS CDK: Which languages does AWS CDK support?

The AWS documentation lists TypeScript, JavaScript, Python, Java, C# and .NET, and Go. Infrastructure is defined as constructs composed into stacks and apps.

Source
Google Cloud Run: What can Cloud Run run?

Any container image, or source code for Go, Node.js, Python, Java.NET and Ruby that Google builds into a container.

Source
AWS CDK: How does AWS CDK deploy resources?

CDK apps are synthesised and deployed through AWS CloudFormation. The documentation states this gives predictable, repeatable deployments with rollback on error.

Source
Google Cloud Run: How is Cloud Run billed?

Allocated CPU and memory are billed in 100 millisecond granularity, in request-based or instance-based mode. A free tier is available.

Source
AWS CDK: Is AWS CDK free?

It is open source under the Apache 2.0 licence according to its GitHub repository. The AWS resources you provision with it are charged at their normal rates.

Source
Google Cloud Run: Can Cloud Run scale to zero?

Yes. Services scale to zero when idle unless a minimum number of instances is set.

Source
AWS CDK: When was AWS CDK first released?

Wikipedia reports a developer preview announced in 2018 and general availability on 11 July 2019. CDK v2 followed in 2021.

Source
Share

Related pages

Other head to heads