Software · head to head
AWS CodeBuild vs AWS Secrets Manager

AWS CodeBuild
Software
Pay-per-minute managed build service for compiling, testing and packaging code
- From
- $0.005/minute
- Free plan
- No

AWS Secrets Manager
Software
Managed store for database credentials and API keys with automatic rotation
- From
- $0.4/month
- Free plan
- No
The short version
- AWS CodeBuild starts at $0.005/mo, AWS Secrets Manager at $0.4/mo.
- Only AWS CodeBuild lists managed build environments; only AWS Secrets Manager lists automatic rotation.
- Where AWS CodeBuild falls short: billing is rounded per minute on EC2 compute, so many short jobs cost more than their actual run time suggests.
- Where AWS Secrets Manager falls short: replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage.
How do AWS CodeBuild and AWS Secrets Manager differ?
AWS CodeBuild and AWS Secrets Manager differ on starting price ($0.005/minute against $0.4/month), pricing model and platforms. Only the attributes on which AWS CodeBuild and AWS Secrets Manager actually diverge.
| Attribute | AWS CodeBuild | AWS Secrets Manager |
|---|---|---|
| Starting price | $0.005/minute | $0.4/month |
| Pricing model | Per build minute by instance type | Per secret per month plus per 10,000 API calls |
| Platforms | Web, Linux, Windows | Web |
Identical on both: free tier (No).
Which features does each one have?
They share no listed features; 6 appear only for AWS CodeBuild and 6 only for AWS Secrets Manager. 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 CodeBuild
- Managed build environments
- Lambda and EC2 compute
- Reserved capacity
- Buildspec files
- Caching
- GitHub Actions runners
Only in AWS Secrets Manager
- Automatic rotation
- KMS encryption
- Cross-Region replication
- Fine-grained access
- Audit trail
- Versioning
What is each one used for?
AWS CodeBuild is most often brought in for building and pushing container images to Amazon ECR from a CodePipeline stage; AWS Secrets Manager for rotating RDS or Aurora database passwords on a schedule without code changes. The jobs each tool is most often brought in to do.
AWS CodeBuild
- Building and pushing container images to Amazon ECR from a CodePipeline stagenot AWS Secrets Manager
- Running unit tests in parallel across many ephemeral containersnot AWS Secrets Manager
- Self-hosted GitHub Actions runners that need IAM access to AWS resourcesnot AWS Secrets Manager
- Compiling for Arm using cheaper Graviton-based build instancesnot AWS Secrets Manager
AWS Secrets Manager
- Rotating RDS or Aurora database passwords on a schedule without code changesnot AWS CodeBuild
- Giving ECS tasks and Lambda functions credentials at runtime instead of in environment filesnot AWS CodeBuild
- Replicating secrets to a second Region for disaster recoverynot AWS CodeBuild
- Centralising third-party API keys with audit logs for compliancenot AWS CodeBuild
Where do AWS CodeBuild and AWS Secrets Manager fall short?
AWS CodeBuild's most cited limit: billing is rounded per minute on EC2 compute, so many short jobs cost more than their actual run time suggests. AWS Secrets Manager's: replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
AWS CodeBuild
- Each build starts from a clean environment, so dependency installs and image pulls repeat unless caching is configured, which inflates build minutes
- Billing is rounded per minute on EC2 compute, so many short jobs cost more than their actual run time suggests
- There is no built-in repository, pipeline UI or code review, so you need CodePipeline or a third-party system to trigger and track releases
- Windows and larger instance types cost several times the Linux small rate, and the pricing table has dozens of instance rows to compare
- Debugging a failed build is slower than on a local runner because you rely on logs or session manager rather than a persistent machine
AWS Secrets Manager
- The $0.40 per secret fee applies to every secret including rarely used ones, so organisations with thousands of per-service secrets see a steady monthly charge
- Replica secrets are billed as full secrets, which doubles or triples the cost of multi-Region storage
- Rotation for anything other than the supported AWS databases means writing and maintaining your own Lambda function
- It stores static secrets only; unlike HashiCorp Vault it does not issue short-lived dynamic credentials for many targets
- It is AWS-only, so workloads on other clouds or on-premises must call AWS APIs across the network, tying their secret access to AWS availability
How much do AWS CodeBuild and AWS Secrets Manager cost?
AWS CodeBuild starts at $0.005/mo; AWS Secrets Manager starts at $0.4/mo. Plan by plan below, from each vendor's own pricing page.
AWS CodeBuild
$0.005/minute- Linux general1.small$0.005/minute
- 3 GB memory, 2 vCPUs
- 100 free build minutes per month on general1.small or arm1.small
- Linux general1.large$0.02/minute
- 15 GB memory, 8 vCPUs
- general1.2xlarge is $0.20 per minute
- Lambda compute$0.00001/second
- Billed per second from $0.00001 (1 GB Arm) to $0.0002 (10 GB x86-64)
- Suited to short builds
AWS Secrets Manager
$0.4/month- Secrets$0.4/mo
- $0.40 per secret per month, prorated hourly
- Each replica secret is billed as a separate secret
- API callsOn request
- $0.05 per 10,000 API calls
- Rotation, retrieval and management calls all count
Which should you pick?
Choose AWS CodeBuild if
- You need managed build environments.
- You work on Web, Linux, Windows.
- You also want lambda and ec2 compute.
Choose AWS Secrets Manager if
- You need automatic rotation.
- You also want kms encryption.
Questions people ask
- Is AWS CodeBuild or AWS Secrets Manager better?
- It depends on the job. AWS CodeBuild fits building and pushing container images to Amazon ECR from a CodePipeline stage; AWS Secrets Manager fits rotating RDS or Aurora database passwords on a schedule without code changes. AWS CodeBuild starts at $0.005/minute and AWS Secrets Manager at $0.4/month.
- Which is cheaper, AWS CodeBuild or AWS Secrets Manager?
- AWS CodeBuild starts at $0.005/minute and AWS Secrets Manager at $0.4/month.
- Does AWS CodeBuild or AWS Secrets Manager run on more platforms?
- AWS CodeBuild runs on Web, Linux, Windows. AWS Secrets Manager runs on Web.
- What is AWS CodeBuild best used for?
- AWS CodeBuild is most often used for building and pushing container images to amazon ecr from a codepipeline stage, running unit tests in parallel across many ephemeral containers, self-hosted github actions runners that need iam access to aws resources, compiling for arm using cheaper graviton-based build instances. Of those, building and pushing container images to amazon ecr from a codepipeline stage and running unit tests in parallel across many ephemeral containers are not what AWS Secrets Manager is typically brought in for.
- What can AWS CodeBuild do that AWS Secrets Manager cannot?
- AWS CodeBuild covers Managed build environments, Lambda and EC2 compute, Reserved capacity, Buildspec files. AWS Secrets Manager covers Automatic rotation, KMS encryption, Cross-Region replication, Fine-grained access.
Answered from the vendors’ own pages
AWS CodeBuild: How much does CodeBuild cost?
Linux general1.small is $0.005 per build minute, general1.medium $0.01 and general1.large $0.02, per the AWS pricing page. 100 build minutes per month on small instances are free.
AWS Secrets Manager: How much does Secrets Manager cost?
$0.40 per secret per month and $0.05 per 10,000 API calls, per the AWS pricing page. A replica in another Region is billed as another secret.
AWS CodeBuild: Does CodeBuild replace Jenkins?
It replaces the build agents, not the orchestration. You still need CodePipeline, webhooks or another trigger for pipeline logic.
AWS Secrets Manager: Is Secrets Manager cheaper than Parameter Store?
Parameter Store standard parameters carry no charge, so for static values that do not need rotation it is cheaper. Secrets Manager adds rotation and replication.
AWS CodeBuild: Can CodeBuild run GitHub Actions?
Yes. CodeBuild can act as managed runners for GitHub Actions workflows, billed at CodeBuild compute rates.
AWS Secrets Manager: Does it rotate secrets automatically?
Yes. It has managed rotation for supported AWS databases and uses Lambda functions for other secret types.
Related pages
More on AWS CodeBuild
More on AWS Secrets Manager
Keep looking
Other head to heads
- AWS CodeBuild vs Buildkite
- AWS CodeBuild vs Garden
- AWS CodeBuild vs LocalStack
- AWS CodeBuild vs Travis CI
- AWS CodeBuild vs Trunk Code Quality
- AWS CodeBuild vs GitLab CI/CD
- AWS CodeBuild vs Bazel
- AWS CodeBuild vs Depot
- AWS CodeBuild vs Nx Cloud
- AWS CodeBuild vs Tilt
- AWS CodeBuild vs Apache Maven
- AWS CodeBuild vs Cloudflare Workers
- AWS CodeBuild vs Claude Code
- AWS CodeBuild vs Postman
- AWS CodeBuild vs Keycloak
- AWS CodeBuild vs Cody
- AWS CodeBuild vs GitHub
- AWS CodeBuild vs GitLab
- AWS CodeBuild vs Doppler
- AWS CodeBuild vs Infisical
- AWS CodeBuild vs HashiCorp Vault
- AWS CodeBuild vs Keeper Password Manager
- AWS CodeBuild vs Delinea
- AWS CodeBuild vs Aikido
- AWS CodeBuild vs Akeyless
- AWS CodeBuild vs Legit Security
- AWS CodeBuild vs HID Global
- AWS CodeBuild vs Teleport
- AWS CodeBuild vs Bitwarden
- AWS CodeBuild vs NordPass
- AWS CodeBuild vs ManageEngine Vulnerability Manager Plus
- AWS CodeBuild vs Mandiant
- AWS CodeBuild vs Menlo Security
- AWS CodeBuild vs Microsoft Defender for Cloud
- AWS CodeBuild vs Nmap
- AWS CodeBuild vs Microsoft Defender XDR
- AWS Secrets Manager vs Buildkite
- AWS Secrets Manager vs Garden
- AWS Secrets Manager vs LocalStack
- AWS Secrets Manager vs Travis CI
- AWS Secrets Manager vs Trunk Code Quality
- AWS Secrets Manager vs GitLab CI/CD
- AWS Secrets Manager vs Bazel
- AWS Secrets Manager vs Depot
- AWS Secrets Manager vs Nx Cloud
- AWS Secrets Manager vs Tilt
- AWS Secrets Manager vs Apache Maven
- AWS Secrets Manager vs Cloudflare Workers
- AWS Secrets Manager vs Claude Code
- AWS Secrets Manager vs Postman
- AWS Secrets Manager vs Keycloak
- AWS Secrets Manager vs Cody
- AWS Secrets Manager vs GitHub
- AWS Secrets Manager vs GitLab
- AWS Secrets Manager vs Doppler
- AWS Secrets Manager vs Infisical
- AWS Secrets Manager vs HashiCorp Vault
- AWS Secrets Manager vs Keeper Password Manager
- AWS Secrets Manager vs Delinea
- AWS Secrets Manager vs Aikido
- AWS Secrets Manager vs Akeyless
- AWS Secrets Manager vs Legit Security
- AWS Secrets Manager vs HID Global
- AWS Secrets Manager vs Teleport
- AWS Secrets Manager vs Bitwarden
- AWS Secrets Manager vs NordPass
- AWS Secrets Manager vs ManageEngine Vulnerability Manager Plus
- AWS Secrets Manager vs Mandiant
- AWS Secrets Manager vs Menlo Security
- AWS Secrets Manager vs Microsoft Defender for Cloud
- AWS Secrets Manager vs Nmap
- AWS Secrets Manager vs Microsoft Defender XDR
