Skip to content

Software companies

Shutting down AWS or GCP: databases and logs to preserve first

By SourceX Editorial · Updated

Short answer

Before you shut down a company's AWS account or GCP projects, preserve production databases, object storage, application and audit logs, and infrastructure code in portable formats stored outside the cloud. Snapshots are not enough, because they stay inside the provider and usually disappear with the account. Freeze, inventory, export, verify and only then delete, keeping encryption keys alive until exports open.

Key takeaways

  • Snapshots and backups usually live inside the account and go when it closes, so export to portable formats stored elsewhere.
  • Never schedule deletion of encryption keys until every export has been opened and verified outside the cloud.
  • Audit trails, deployment history and incident timelines are compact and often the most useful records to keep.
  • Customer data in production databases is usually governed by customer contracts that may require return or deletion.
  • Billing continues while resources exist, so one named owner should hold the account until the last resource is gone.

What should you preserve before shutting down AWS or GCP?#

Before shutting down AWS or GCP, preserve anything that records how the company built, ran and supported its product: production and analytics databases, object storage, application logs, audit trails, infrastructure-as-code, CI/CD history and the billing record. Customer data inside those systems needs separate handling under customer contracts.

The order matters more than the tools. Cloud providers generally keep a closed account's resources only for a limited period before deleting them permanently, and the rules change, so check the provider's current documentation and treat closure as irreversible. Everything worth keeping should sit outside the account, in a format you can open without the provider, before anyone closes it.

The preserve-first checklist#

The preserve-first checklist runs in a fixed order, because each step protects the one after it. Write down each step's date and owner; if the records are later assessed for licensing or needed in a dispute, that log is the proof of what was kept and how.

  • Freeze: stop automated deletion jobs, lifecycle rules and log expiry settings that could remove records during the wind-down.
  • Secure access: confirm who holds root or organization admin credentials, multi-factor devices and billing access.
  • Inventory: list every account, project, region, database, bucket, log group and key, including forgotten test environments.
  • Classify: mark each item as company records, customer data under contract or disposable infrastructure.
  • Export: copy company records to portable formats, such as SQL dumps, CSV or Parquet, and plain-text or JSON logs.
  • Verify: open exports outside the cloud, compare row counts with the source and confirm encrypted files decrypt.
  • Store: place the archive on company-controlled storage or encrypted drives with a named custodian.
  • Delete: remove customer data as contracts require, then resources, then close the account.
  1. 01Your work records
  2. 02Personal details removed
  3. 03You approve the release
  4. 04Licensed to AI developers
How it works with SourceX: Your work records → Personal details removed → You approve the release → Licensed to AI developers.Illustrative

Where the records live in each cloud#

Record types map to different services in each cloud, but the preservation goal is the same: get the data out in a form that does not need the provider to read it. Check each service's current export options in the provider's documentation before planning the work.

Where the records live in each cloud
Record typeCommon AWS servicesCommon GCP servicesPreserve as
Relational databasesRDS, AuroraCloud SQL, AlloyDBLogical dump plus schema and migration history
NoSQL and key-value storesDynamoDBFirestore, BigtableExported files with a field dictionary
Analytics warehouseRedshiftBigQueryTable exports in an open columnar or CSV format
Object storageS3Cloud StorageCopied files keeping the folder structure
Application logsCloudWatch LogsCloud LoggingCompressed text or JSON by service and date
Audit trailsCloudTrailCloud Audit LogsFull export with the event schema
Infrastructure and deploymentsCloudFormation or Terraform, CodePipelineTerraform or Infrastructure Manager, Cloud BuildTemplates in Git plus pipeline run history

Why snapshots and backups are not enough#

Snapshots and backups are not enough because they are stored inside the provider, in a form you restore through the provider's own services, and those kept in the closing account go when the account goes. A database snapshot is a convenience for running systems, not an archive for a closing company; copying it to another account only moves the dependency.

Encryption adds a second trap. Data encrypted with keys held in the provider's key management service cannot be read once those keys are deleted, and key deletion is often scheduled as routine cleanup. Keep keys active until every export has been decrypted and opened outside the cloud.

Schema matters as much as rows. An export of tables with cryptic column names is hard to use a year later, so save the schema, the migration history and a short field dictionary with each database export.

Which logs are worth keeping?#

Logs worth keeping are the ones that record decisions and events, not routine traffic. Audit trails, deployment records and incident timelines are usually compact and explain how the system changed and who changed it.

Check retention obligations before deleting anything. Contracts, tax rules, pending disputes or a litigation hold may require certain records to be kept, and counsel should confirm what applies. Logs also hold personal data such as IP addresses and user IDs, and sometimes secrets; scanners such as TruffleHog look for credentials across logs and object stores and are worth running before an archive changes hands.

Which logs are worth keeping?
Log typeKeep?Why
Cloud audit trailsYesWho changed what, and when, across the account
Deployment and CI/CD historyYesLinks releases to code changes and incidents
Application error logsYes, by service and periodEvidence behind bug reports and support tickets
Incident and alerting historyYesShows how problems were detected and resolved
Load balancer and access logsSample or summarizeHigh volume and heavy with IP addresses
Debug and verbose logsUsually noNoise with little lasting value

Customer data is not yours to keep by default#

Customer data in a SaaS production database is usually governed by the customer agreement and data processing terms, which may require the company to return or delete it at termination. Preserving the company's own records is not a license to keep customers' records.

Separate the two early. Company records, such as engineering history, support tickets, incident reports and internal operating metrics, may be preserved and later assessed. Customer content follows the contract: export it for customers who ask, delete it on schedule and keep a deletion record that names the date, the systems and the person responsible.

Illustrative: a scheduling software company winds down its cloud#

Illustrative: a fictional appointment scheduling software company is closing. Its product runs on AWS with an Aurora PostgreSQL database, S3 buckets for customer uploads and CloudWatch logs, while its analytics sit in a separate GCP project with BigQuery. The CTO is the last engineer still employed.

She disables lifecycle rules and log expiry first, then inventories both clouds and finds a forgotten staging account. Customer data is exported for customers who request it and deleted per contract, with a deletion log. Company records, including CloudTrail history, deployment history, error logs and internal BigQuery tables on support volumes, are exported to Parquet and text files on encrypted drives, then opened and checked on a separate laptop. Only then are keys scheduled for deletion and the accounts closed.

The archive is later assessed for licensing alongside the company's Jira and Zendesk history. Because the export log documents every step, the wind-down officer can show what was kept, what was deleted and why.

How SourceX approaches a cloud shutdown#

SourceX's view is that preservation comes before assessment. A fit check needs only metadata, such as which systems held records and for how long, so a company can preserve first and decide later without sharing files.

If a package proceeds, large archives stay in the company's own storage or ship on encrypted drives; SourceX never hosts multi-terabyte datasets. The Rights step of the SourceX five-step transaction separates company records from customer data under contract, and the SourceX Evidence Packet records provenance and the release authorization from whoever holds authority during the wind-down.

Frequently asked questions

Can we keep the cloud account open in a minimal state instead?

You can, but it keeps costing money and keeps someone responsible for security. Some companies reduce the account to storage only while exports are verified. If you do, remove compute, rotate credentials, keep billing alerts on and set a firm closure date.

What format should database exports use?

Use formats that open without the original database engine where possible, such as CSV or Parquet for tables, plus a logical SQL dump for completeness. Include the schema, migration files and a field dictionary, and test the export by restoring it on a machine outside the cloud.

Who should hold the archive after the company closes?

A named custodian with authority over company records, such as a remaining officer, a wind-down officer or a trustee. Keep at least two encrypted copies in different places, and record who holds the keys and passwords so access does not depend on one person.

Do we need to keep cloud billing records?

Yes. Invoices and usage reports support final accounts, tax filings and any vendor disputes. Download them before the account closes, because access to the billing console may end with the account, and file them with the rest of the company's financial records.

Should we scan the archive for secrets before storing it?

Yes. Logs, configuration files and buckets often contain API keys, database passwords and tokens. Scan the archive, rotate or revoke anything still live and record the scan. This matters even more if the archive will later be assessed or shared with anyone outside the company.

Sources

  • TruffleHog is an open-source secret scanner that scans sources including Git, chats, wikis, logs, object stores and filesystems. Source

Related resources

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies