Choosing a managed secrets service is only the first step. This guide compares AWS Secrets Manager, Azure Key Vault, and Google Secret Manager, then provides practical checklists for application access, CI systems, rotation, auditing, and cloud migrations.
Overview
Cloud secrets management replaces hard-coded credentials and scattered configuration files with a controlled system for storing, retrieving, rotating, and auditing sensitive values. Typical secrets include database passwords, API tokens, private keys, signing material, and third-party service credentials.
A managed service is usually preferable to placing secrets in source control, container images, Terraform variables, or ordinary configuration stores. However, it does not eliminate design decisions. Your team still needs to define who can read each secret, how applications authenticate, how rotation is tested, and how access is reviewed.
The three major cloud options fit naturally into their respective ecosystems:
- AWS Secrets Manager: a strong default for workloads already using AWS identity, deployment, and monitoring patterns.
- Azure Key Vault: a natural choice for Azure workloads and teams that also need a broader platform for secrets, keys, or certificates.
- Google Secret Manager: a straightforward fit for Google Cloud workloads that use Google Cloud identity and resource-level access controls.
There is no universal winner. The right choice depends on cloud alignment, identity architecture, rotation requirements, regional deployment, compliance expectations, operational maturity, and the cost model confirmed for your account and region.
Feature comparison at a glance
| Decision area | AWS Secrets Manager | Azure Key Vault | Google Secret Manager |
|---|---|---|---|
| Best starting point | AWS-native applications and services | Azure-native applications and Microsoft identity environments | Google Cloud-native applications and services |
| Primary access model | AWS IAM policies and workload identity patterns | Microsoft Entra identity and Key Vault access controls | Google Cloud IAM and workload identity patterns |
| Common integration targets | Compute, containers, serverless workloads, and deployment pipelines | Azure compute, applications, pipelines, and certificate or key workflows | Google Cloud compute, Kubernetes workloads, serverless services, and CI systems |
| Rotation approach | Use provider-supported patterns where suitable, or build a tested application-specific workflow | Use supported rotation and automation patterns appropriate to the secret type | Use versioning and an external or pipeline-driven rotation workflow when required |
| Pricing review | Check secret storage, API operations, and related integration charges | Check vault operations, secret or key usage, and the selected service tier | Check active secret storage, access operations, and related platform charges |
Pricing, quotas, supported integrations, regional behavior, and rotation features can change. Treat this table as a decision framework, not a substitute for reviewing the provider documentation and your expected usage.
Checklist by scenario
Scenario 1: Choosing a provider for a new application
- Identify where the application runs and which cloud identity system it already uses.
- List every secret by owner, consumer, environment, and rotation requirement.
- Decide whether the application needs only secret values or also keys, certificates, signing operations, or hardware-backed protection.
- Confirm that the service is available in the regions required for production, disaster recovery, and development.
- Check how the application will authenticate without storing a second long-lived credential.
- Estimate reads, writes, versions, and environments before reviewing the current pricing page.
- Document a migration path if the application may later become multicloud.
Scenario 2: Connecting an application securely
- Create a workload identity for the application rather than sharing a human user account.
- Grant read access only to the specific secret paths or resources required by that workload.
- Retrieve secrets at runtime or during a controlled startup process; do not bake them into an image or repository.
- Keep secret values out of logs, error messages, traces, crash dumps, and deployment output.
- Define behavior for temporary unavailability, including bounded retries and a clear failure mode.
- Test whether the application can move to a new secret version without requiring an unsafe manual change.
For containerized workloads, include secret access in the production deployment review rather than treating it as an application-only concern. The Kubernetes production deployment checklist provides a useful companion for workload identity, rollout, and operational checks.
Scenario 3: Using secrets in CI/CD
- Prefer short-lived workload authentication from the CI platform to the cloud provider.
- Separate build-time secrets from deploy-time secrets. Most build jobs should not receive production credentials.
- Limit a pipeline's permissions to the environment it is deploying.
- Mask sensitive output, but do not rely on masking as a replacement for least privilege.
- Prevent secrets from being written into build artifacts, cache layers, test reports, or generated configuration.
- Use approval gates for production changes that alter secret values, access policies, or rotation behavior.
Scenario 4: Rotating a credential
- Record the secret's owner, consumer list, rotation interval, and rollback procedure.
- Confirm that the dependent service supports overlapping credentials or a safe handoff.
- Create the new credential and store it as a new version where the service supports versioning.
- Deploy or reload consumers in a controlled order.
- Validate real application behavior, not just a successful secret retrieval.
- Revoke the old credential only after the replacement is confirmed across all consumers.
- Record the result and investigate any access from the retired value.
What to double-check
Before approving a design, verify the details that are easy to overlook:
- Identity boundaries: distinguish human administration, application runtime access, deployment access, and emergency access.
- Policy scope: check whether a wildcard resource, broad project, subscription, account, or environment grants more access than intended.
- Audit coverage: confirm that reads, writes, policy changes, version changes, and deletions reach a retained audit destination.
- Regional behavior: understand where values and replicas are stored, how applications in other regions retrieve them, and what happens during a regional outage.
- Version semantics: learn how applications select the latest value, a fixed version, or an explicit label, and choose deliberately.
- Failure handling: test startup, rotation, provider API errors, expired credentials, and revoked permissions.
- Cost controls: review request volume, polling frequency, redundant retrieval, and unused secrets. A monitoring and alerting plan should cover both access failures and unusual access patterns. See the cloud monitoring tools comparison for broader observability planning.
- Infrastructure as Code: store policies, resource configuration, and references in code, but keep secret values out of state and plan output. Review the Terraform state backup and recovery runbook before managing secret-related infrastructure with Terraform.
Common mistakes
- Choosing by brand alone: cloud alignment matters, but identity, rotation, regional, and recovery requirements should decide the design.
- Using one shared secret everywhere: separate production, staging, development, and tenant boundaries where practical.
- Confusing encryption with access control: encryption protects stored data, while IAM and application identity determine who can retrieve it.
- Rotating without testing consumers: a successful update in the vault does not prove that every application has reloaded the value.
- Leaving old versions indefinitely: define retention and deletion rules that preserve rollback capability without creating an unmanaged archive.
- Logging retrieved values: review debug logs, exception handlers, CI output, and tracing instrumentation for accidental disclosure.
- Ignoring break-glass access: emergency access should be tightly limited, monitored, documented, and tested before an incident.
- Assuming provider defaults are sufficient: explicitly review network paths, audit retention, alerts, and access-review ownership.
When to revisit
Revisit the comparison before seasonal planning cycles, security reviews, major migrations, and credential-rotation campaigns. Also reassess it whenever your team changes cloud providers, introduces Kubernetes or a new CI platform, adds a regulated workload, expands into another region, or replaces an application identity model.
As part of the review, confirm current service limits, authentication integrations, rotation capabilities, regional behavior, audit features, and pricing examples. Recalculate expected API usage rather than copying an earlier estimate. If provider features or your workflows change, update the implementation runbook and test the rotation path in a nonproduction environment.
Action checklist: name an owner for every secret, inventory its consumers, verify least-privilege access, test one complete rotation, inspect audit records, remove unused credentials, and schedule the next review. A managed secrets service is most effective when these operational habits are maintained alongside the technology.