← All news and guides
Data protection

DPDP One-Year Log Retention: How to Configure It on AWS, Azure and GCP

Rule 6(1)(e) asks you to keep access logs for one year. The cloud defaults are 30 to 90 days. Here is what to change on AWS, Azure and GCP, and how to lock it.

Mono Team ·

A long server-room aisle, out of focus, with rows of small green and blue status lights.

Short answer: Rule 6(1)(e) of the DPDP Rules, 2025 asks you to keep the logs that show access to personal data for one year, unless another law requires otherwise. Most cloud log stores keep far less by default: 90 days for AWS CloudTrail event history and the Azure Activity log, 30 days for a Log Analytics workspace and the GCP `_Default` log bucket. The fix is a handful of settings per cloud, plus a lock so the logs can't be quietly deleted. The duty starts on 13 May 2027.

Below: what the Rule says and doesn't say, which logs count, how to keep personal data out of them, and the settings to change on each cloud. Defaults were checked against vendor documentation in November 2026.

What Rule 6 asks, word for word

Rule 6 lists the minimum security safeguards a Data Fiduciary must take. Two clauses matter for logs. Rule 6(1)(c) asks for:

  • "visibility on the accessing of such personal data, through appropriate logs, monitoring and review, for enabling detection of unauthorised access, its investigation and remediation to prevent recurrence;"

Rule 6(1)(e) then sets the period:

  • "for enabling the detection of unauthorised access, its investigation, remediation to prevent recurrence and continued processing in the event of such a compromise, retain such logs and personal data for a period of one year, unless compliance with any law for the time being in force requires otherwise;"

"Such logs" points back to the logs in Rule 6(1)(c): the ones that give visibility on who accessed personal data. A separate rule, Rule 8(3), has every Data Fiduciary keep personal data, its traffic data and processing logs for at least one year from the date of processing, for the purposes listed in the Seventh Schedule. Our Rule 6 checklist quotes every clause with the checks we run against it.

What the Rule does not say

  • It doesn't name log types or tools. There is no list of CloudTrail, database audit or SIEM requirements. You decide which logs give "visibility on the accessing" of personal data, and you should be able to explain why.
  • It doesn't ask for immutable storage. Tamper resistance is our engineering advice, not the Rule's wording. A log that an attacker or an admin can delete is weak evidence in an investigation, which is what the clause is for.
  • It doesn't say the logs must be stored in India. On our reading, Rule 6 sets a period, not a location. Sector rules, such as those for regulated financial entities, may say more. Check those with your lawyers.
  • It doesn't say "at least" in Rule 6(1)(e). Rule 8(3) does set a minimum. In practice, set each log store to a little over a year, then delete. Keeping logs forever creates its own problem, covered below.

Rule 6 starts on 13 May 2027, eighteen months after the Rules were published on 13 November 2025. A longer retention setting can't bring back logs that have already been deleted, so change the settings well before that date.

Which logs count

Start from the question the Rule wants answered: who accessed personal data, when, from where, and was it allowed? These five log sources usually answer it between them.

Log sourceWhat it showsExamples
Application audit logWhat it shows: Which user viewed, changed or exported which recordExamples: Your own audit table or event stream: user ID, action, record ID, time
Database audit logWhat it shows: Direct queries against tables that hold personal data, including by adminsExamples: pgAudit on PostgreSQL, Azure SQL auditing, Cloud SQL audit logs
Cloud control planeWhat it shows: Who changed access, keys, buckets, firewalls or the logging itselfExamples: AWS CloudTrail, Azure Activity log, GCP Admin Activity audit logs
Data access in cloud storageWhat it shows: Reads of objects and rows in managed storesExamples: CloudTrail data events, Azure resource logs, GCP Data Access audit logs
AI and LLM gateway logsWhat it shows: Which user or service sent which kind of data to which modelExamples: Your AI gateway or proxy, logged by request ID and data category

Two of these are off by default on every major cloud. AWS trails don't record data events unless you add them. Azure resource logs aren't collected until you create a diagnostic setting. GCP Data Access audit logs are disabled for every service except BigQuery. If your personal data sits in S3, Blob Storage or Cloud SQL, turning these on is usually the first real gap.

AI tools are the newest source. If staff or your product send personal data to an AI model, log the request at your own gateway, because the vendor's logs are not yours to keep. Our DPDP and AI tools page covers where personal data reaches AI.

The tension with data minimisation

Logs hold personal data too: user IDs, IP addresses, email addresses in error messages, whole request bodies. A year of verbose logs is a second copy of your customer database, usually with weaker access control than the first. Rule 6(1)(e) asks you to keep the logs. It doesn't ask you to fill them with personal data.

  • Log the event, not the content. Actor, action, record ID, time and source IP. Not the record itself.
  • Mask at the source. Strip or hash Aadhaar numbers, PANs, phone numbers, card numbers and email addresses before the log line is written. Test the masking with real Indian formats.
  • Never log request or response bodies by default. Turn body logging on for a short debug window, then off.
  • Split the stores. Security and audit logs go to a locked store kept for a year. Debug and application logs get a short period, such as 14 or 30 days.
  • Limit who can read the logs, and log that access as well.
  • Delete on schedule. After the year, plus any longer period another law requires, let the retention setting delete the logs. Don't leave stores on "never expire".

Erasure requests are the hard case: someone asks you to delete their data, but their actions sit in a locked log. How the one-year rule and erasure interact is a question for your lawyers. Logging record IDs instead of names keeps the overlap small. Our engineering guide to DPDP covers retention entries and deletion jobs.

AWS: CloudTrail, CloudWatch Logs and S3

Rows of black storage drive bays in a data centre rack, small amber lights glowing in a dim room.

CloudTrail event history is on in every account, but it keeps only 90 days of management events and can't be extended. For a year, create a trail. A trail writes log files to an S3 bucket you own, and that bucket's settings decide how long they stay.

ServiceDefault retentionWhat to setHow to make it tamper-resistant
CloudTrail event historyDefault retention: 90 days, management events onlyWhat to set: Nothing. It can't be extended. Use a trail.How to make it tamper-resistant: Already immutable, but too short
CloudTrail trail to S3Default retention: No trail exists until you create oneWhat to set: An organisation or multi-Region trail with management events. Add data events for S3 buckets and other stores that hold personal data.How to make it tamper-resistant: Turn on log file integrity validation. Write to a dedicated bucket, ideally in a separate log-archive account.
S3 log bucketDefault retention: Objects stay until deletedWhat to set: A lifecycle rule that expires objects, and permanently deletes noncurrent versions, after about 400 daysHow to make it tamper-resistant: S3 Object Lock in compliance mode with a default retention of 1 year. Needs versioning.
CloudWatch Logs log groupsDefault retention: Never expireWhat to set: Set retention per log group, for example `400` days for audit logs and 30 for debug logsHow to make it tamper-resistant: Turn on deletion protection for audit log groups. Limit `logs:PutRetentionPolicy` and `logs:DeleteLogGroup`.
CloudTrail Lake event data storeDefault retention: 366 days on one-year extendable pricingWhat to set: Existing users only. Keep retention at 366 days or more.How to make it tamper-resistant: Termination protection. Closed to new customers since 31 May 2026.

Notes for AWS

  • Integrity validation. With it on, CloudTrail writes an hourly digest file with a SHA-256 hash of each log file, signed with RSA. `aws cloudtrail validate-logs` then tells you whether any file was changed or deleted.
  • Object Lock modes. In compliance mode, no user, including the root user, can delete a locked object version or shorten its retention. Governance mode can be bypassed by users with a special permission. Test in governance mode, then switch to compliance.
  • Lifecycle after lock. Object Lock stops deletion before the date. A lifecycle rule deletes after it. You need both, or the logs stay forever.
  • Account-level retention policies. CloudWatch Logs lets you set a retention policy for the whole account or a log group name prefix, with values such as 365 and 400 days. It overrides the log group's own setting, including a longer one. Use a dry run before you apply one.
  • CloudTrail Lake. AWS closed CloudTrail Lake to new customers on 31 May 2026 and points them to CloudWatch. If you don't already use it, build on trails and S3.

Azure: Activity log, Log Analytics and immutable storage

The Activity log records control plane operations and keeps them for 90 days. Resource logs, which record data plane operations such as reads from a key vault or a database, aren't collected at all until you create a diagnostic setting. A diagnostic setting sends both to a Log Analytics workspace, a storage account or an event hub.

ServiceDefault retentionWhat to setHow to make it tamper-resistant
Activity logDefault retention: 90 daysWhat to set: A subscription diagnostic setting that exports all categories to a workspace and a storage accountHow to make it tamper-resistant: Entries can't be changed or deleted, but 90 days is too short. Export them.
Resource logsDefault retention: Not collectedWhat to set: A diagnostic setting on each resource that holds personal data. Use the `audit` category group at minimum.How to make it tamper-resistant: Send a copy to immutable storage
Log Analytics workspace tablesDefault retention: 30 days. `AzureActivity`, `Usage` and Application Insights tables: 90 days.What to set: Total retention of at least 365 days on each security table. Analytics retention can go to 730 days; total retention to 12 years.How to make it tamper-resistant: Limit who can change retention or delete the workspace. Add a delete lock on the resource group.
Storage account for log archiveDefault retention: Blobs stay until deletedWhat to set: A lifecycle management rule that deletes log blobs, and their previous versions, after about 400 daysHow to make it tamper-resistant: A time-based immutability policy of 365 days, then lock it. Microsoft's diagnostic settings guide points to version-level policies for this.
Azure SQL Database auditingDefault retention: Off until you turn it onWhat to set: Enable auditing from the SQL auditing pane, not only the diagnostic settingHow to make it tamper-resistant: Send audit records to the locked storage account

Notes for Azure

  • Analytics vs total retention. Analytics retention is how long data is queryable in normal queries. Total retention adds low-cost long-term retention, read back through search jobs. For DPDP, total retention is the number that matters.
  • Set it per table. Changing the workspace default only affects tables still on the default. Check `SigninLogs`, `AuditLogs`, `AzureActivity` and each resource log table individually.
  • Lock the policy. An unlocked immutability policy can be shortened or deleted. A locked one can only be extended. Microsoft recommends locking within about 24 hours of testing.
  • SQL needs its own switch. The `audit` category in a diagnostic setting does not turn on database auditing for Azure SQL Database.

GCP: Cloud Logging buckets and sinks

Bundles of blue and yellow network cables running along a tray above a server rack, softly lit.

Every GCP project has two log buckets. `_Required` holds Admin Activity and System Event audit logs for 400 days, and you can't change that. `_Default` holds everything else, including any Data Access audit logs you enable, for 30 days. So the control plane is covered for a year by default. Data access is not.

ServiceDefault retentionWhat to setHow to make it tamper-resistant
`_Required` bucketDefault retention: 400 days, not configurableWhat to set: Nothing. Admin Activity and System Event logs can't be disabled.How to make it tamper-resistant: Already fixed by Google
`_Default` bucket (project)Default retention: 30 days, configurable from 1 to 3,650 daysWhat to set: Raise to 365 days or more, or route security logs to a custom bucketHow to make it tamper-resistant: Restrict `logging.buckets.update` and sink changes to a small group
Data Access audit logsDefault retention: Off, except BigQueryWhat to set: Turn on DATA_READ and DATA_WRITE for Cloud SQL, Cloud Storage and other services that hold personal dataHow to make it tamper-resistant: They land in `_Default` unless you route them
Custom log bucketDefault retention: 30 days unless setWhat to set: A sink that routes audit logs to a bucket with `--retention-days=400`How to make it tamper-resistant: Lock it with `--locked`. Locking is irreversible.
Sink to Cloud StorageDefault retention: Objects stay until deletedWhat to set: A bucket retention policy of 1 year and a lifecycle rule to delete after itHow to make it tamper-resistant: Bucket Lock on the retention policy. Also irreversible.

Notes for GCP

  • Commands. `gcloud logging buckets update _Default --location=global --retention-days=365` raises the default bucket. `gcloud logging buckets update BUCKET_ID --location=LOCATION --locked` locks a custom bucket. The console can't lock a bucket.
  • What locking means. A locked log bucket can't be updated or deleted, and its retention can't be shortened. A locked Cloud Storage retention policy can be increased but never removed or reduced. Test with a short period first.
  • Organisation-wide routing. An aggregated sink at the folder or organisation level sends audit logs from every project to one central bucket, so new projects are covered without extra work.
  • Data Access logs are verbose. They can be large, and they can hold personal data in request fields. Enable them for the services that hold personal data, not everything, and use exclusion filters for noise.

Application, database and AI gateway logs

Only your code can log who opened which customer record. Send the application audit log, database audit logs and AI gateway logs to the same locked store as the cloud audit logs, with the same one-year period and masking. If a SIEM sits on top for alerting, check its retention too.

Verification checklist

Run these checks for each account, subscription and project that holds personal data:

  • 1. List the log stores. Every store that receives the logs above, with its owner.
  • 2. Read the retention value. From the console or CLI, not from memory. No store holding access logs should be under 365 days or set to never expire.
  • 3. Check data access logging is on. CloudTrail data events, Azure resource logs and SQL auditing, GCP Data Access audit logs.
  • 4. Check the lock. Object Lock in compliance mode, a locked immutability policy, or a locked log bucket. Try to delete a test object and record the error.
  • 5. Check the deletion. A lifecycle rule or retention setting that removes logs after the period.
  • 6. Grep for personal data. Search a day of logs for phone numbers, PANs, Aadhaar-format numbers and email addresses. Fix the sources that leak them.
  • 7. Check who can change logging. List who can stop a trail, delete a diagnostic setting or edit a sink, and alert when anyone does.
  • 8. Run a drill. Pick one customer record and answer, from logs alone, who accessed it in the last 90 days.
  • 9. Record it. Screenshots or CLI output of each setting, dated. That is your evidence for Rule 6.

Not sure where your gaps are? Take the DPDP self-check. A DPDP gap assessment covers every log store and system against the Act and Rules, and DPDP implementation is where we set up the logging, retention and deletion jobs in your accounts.

This article is general information, not legal advice. Our partner law firm gives the written legal opinion on how the Act applies to you.

Sources: Digital Personal Data Protection Rules, 2025, Rules 6 and 8 (G.S.R. 846(E), Gazette of India, 13 November 2025). AWS documentation: CloudTrail event history, CloudTrail log file integrity validation, CloudTrail Lake pricing options and availability change, CloudWatch Logs log groups and retention, S3 Object Lock. Microsoft Learn: Activity log in Azure Monitor, Diagnostic settings in Azure Monitor, Manage data retention in a Log Analytics workspace, Immutable storage for blob data. Google Cloud documentation: Cloud Logging quotas and limits, Configure log buckets, Cloud Audit Logs overview, Cloud Storage Bucket Lock. Last reviewed 18 November 2026.

FAQ

What is the DPDP one-year log retention requirement?

Rule 6(1)(e) of the DPDP Rules, 2025 asks a Data Fiduciary to keep the logs that show access to personal data, and the personal data, for one year, unless another law requires otherwise. The purpose is to detect and investigate unauthorised access. It applies from 13 May 2027.

Is the default AWS CloudTrail retention enough for DPDP?

No. CloudTrail event history keeps 90 days of management events and can't be extended. Create a trail that writes to an S3 bucket you own, add data events for stores that hold personal data, turn on log file integrity validation, and use S3 Object Lock and a lifecycle rule to keep the files for about a year.

How long does Azure keep logs by default?

The Activity log keeps 90 days. Log Analytics workspace tables keep 30 days, except a few tables such as AzureActivity that keep 90. Resource logs aren't collected until you create a diagnostic setting. For DPDP, set total retention on each security table to at least 365 days.

Does GCP keep audit logs for a year by default?

Partly. The _Required bucket keeps Admin Activity and System Event audit logs for 400 days. The _Default bucket, which holds Data Access audit logs once you enable them, keeps 30 days. Raise it, or route those logs to a custom bucket set to 400 days and locked.

Do DPDP logs have to be immutable?

The Rules don't use that word. But the logs exist to investigate unauthorised access, and a log that an attacker or admin can delete is weak evidence. We recommend a write-once store: S3 Object Lock, Azure immutable blob storage or a locked GCP log bucket.

Find out which of your logs won't last a year.