The Simplest Way to Make CircleCI and S3 Work Like They Should
Teams use CircleCI and S3 together to build code and store output files. A build job runs tests and sends the final files to cloud storage. This workflow keeps build runners light and fast. Other apps can then read those stored files for release or review. Setting this up the right way protects your cloud storage from leaks. How CircleCI and S3 move data and check identity A build pipeline needs permission before it can write files to a bucket. In the past, teams saved static cloud keys insi
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams use CircleCI and S3 together to build code and store output files. A build job runs tests and sends the final files to cloud storage.
This workflow keeps build runners light and fast. Other apps can then read those stored files for release or review. Setting this up the right way protects your cloud storage from leaks.
How CircleCI and S3 move data and check identity
A build pipeline needs permission before it can write files to a bucket. In the past, teams saved static cloud keys inside their build settings. The job would read those keys and log in to the cloud account.
Today, identity federation offers a much safer path for both tools. CircleCI creates a signed identity token at the start of every job run. The build runner sends this token to the cloud provider to check identity.
The cloud provider checks the token against a trust rule you set up. If the token matches, the cloud grants temporary credentials for that single job. The job then uploads build output or test reports to the bucket. When the job ends, those temporary credentials expire on their own.
Common failure modes and how to scope roles
Many teams still share one static cloud key across all their build projects. If that shared key leaks, an attacker can read or delete every bucket. Rotating a shared key also breaks builds across many teams at once.
Overbroad permissions create another big risk for your cloud storage. A role that allows access to all buckets lets a bad script wander. A simple typo in a build script could overwrite production files by mistake.
End-to-End Encryption + CircleCI Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged bucket actions make it hard to track down broken builds or breaches. Without clear logs, you cannot see which job wrote a bad file. You also cannot tell if a test branch read private production data.
To fix this, scope each cloud role to one project and one bucket. Set the trust rule to check the project ID and branch name. Let main branch jobs write to release buckets while feature branches use test buckets. Turn on cloud storage access logs so every read and write leaves a record.
Keeping build pipelines clean and fast
Good pipeline rules also control what happens to files after the upload finishes. Old build files pile up fast and raise your monthly storage bill. You can set bucket lifecycle rules to delete test files after seven days.
Keep release files in a separate bucket with strict object lock rules. This stops any future build job from deleting or changing a shipped release. Clear separation between test data and release data keeps audits simple.
You should also check network paths between your build runners and cloud buckets. If you run private build agents inside your own cloud network, use private endpoints. Private endpoints keep your file transfers off the public internet and cut data costs.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
How do we stop storing static cloud keys in CircleCI?
Use OpenID Connect tokens to trade job identity for short-lived cloud credentials. Set up a trust relationship in your cloud account that matches your project ID. The build job will then get fresh keys on every run without stored secrets.
How can we limit a build job to one specific S3 folder?
Write a role policy that limits actions to one bucket and one folder prefix. You can match the folder prefix to the branch name or project name. This stops a feature branch job from overwriting files in your main release folder.
What should we log when build jobs read or write S3 files?
Turn on data event logging in your cloud audit trail for key buckets. These logs record the role name, source IP, timestamp, and file path for each call. Linking the role session name to the build number makes tracing any job simple.
Related guides
In this post