π΄ The Incident That Shook a Nation
On June 20, 2024, the Indonesian government faced its worst digital nightmare in history.
Brain Cipher ransomware β a new variant of LockBit 3.0 β successfully encrypted the entire i
π΄ The Incident That Shook a Nation
On June 20, 2024, the Indonesian government faced its worst digital nightmare in history.
Brain Cipher ransomware β a new variant of LockBit 3.0 β successfully encrypted the entire infrastructure of the Temporary National Data Center (PDNS), operated by the Ministry of Communication and Information Technology.
The result?
β 230+ government services PARALYZED
β Airports forced to rely on MANUAL processes
β Ransom demand: USD 8,000,000
β Data that had a backup: < 2%
β Recovery time: WEEKS
And the root cause wasn't sophisticated malware β it was having no backup at all.
"The most sophisticated ransomware in the world is powerless against a well-tested backup."
This article rebuilds that scenario as a resilient reference architecture on AWS β complete with code, runbooks, and cost calculations.
ποΈ The Architecture We'll Build

π AWS Services Used
| Service |
Role |
| AWS Backup |
Centralized backup orchestration, cross-region copy |
| S3 Object Lock (WORM) |
Immutable backups that can't be deleted or modified |
| S3 Vault Lock |
Policy-level immutability for the AWS Backup vault |
| AWS Elastic DRS |
Continuous replication, failover in under 1 hour |
| Amazon GuardDuty |
ML-based, real-time threat detection |
| AWS Security Hub |
Finding aggregation, compliance scoring |
| AWS KMS |
End-to-end encryption for all backup data |
| AWS CloudTrail |
100% API action audit log, forensic-ready |
| AWS Config |
Compliance rules, drift detection |
| EventBridge + Lambda |
Automated response & isolation |
βοΈ Step-by-Step Implementation
| Step |
AWS Module / Service |
Target Region |
Core Objective & Key Deliverable |
| STEP 1 |
AWS KMS (Customer Managed Keys) |
Jakarta & Singapore |
End-to-end symmetric encryption with annual key rotation in both regions |
| STEP 2 |
Amazon S3 Object Lock (WORM Bucket) |
Jakarta (ap-southeast-3) |
Immutable storage bucket (Compliance Mode 30 days + Glacier Lifecycle) |
| STEP 3 |
AWS Backup Vault & Vault Lock |
Jakarta & Singapore |
Anti-tamper/anti-deletion backup vaults (Compliance Mode) across regions |
| STEP 4 |
AWS Backup Plan & Resource Assignment |
Jakarta β Singapore |
Automated backup policies (Hourly, Daily, Monthly) & cross-region copy |
| STEP 5 |
Amazon GuardDuty & SNS Alerting |
Jakarta (ap-southeast-3) |
Real-time threat detection & instant email notification (Severity β₯ 7) |
| STEP 6 |
AWS Security Hub & Insights |
Jakarta (ap-southeast-3) |
Centralized compliance dashboard (CIS & FSBP) + Ransomware Risk Insight |
| STEP 7 |
AWS CloudTrail (Multi-Region) |
Multi-Region (ap-southeast-3 & ap-southeast-1) |
Immutable audit trail (Read/Write Management + S3/Lambda Data Events) |
| STEP 8 |
AWS Elastic Disaster Recovery (DRS) |
Jakarta β Singapore |
Block-level continuous disk replication (RPO < 1 min, RTO < 1 hr) |
-
Primary Region:
ap-southeast-3 (Asia Pacific β Jakarta)
-
Recovery Region:
ap-southeast-1 (Asia Pacific β Singapore)
STEP 1 β Create KMS Encryption Keys
1A. KMS Key for Jakarta Region (Primary)
- Open AWS Management Console β confirm the region in the top-right corner: Asia Pacific (Jakarta) ap-southeast-3.
- In the top search bar, type KMS β click Key Management Service.
- Click the Create key button (orange).
- Fill in the key configuration:
| Parameter |
Value |
Description & Purpose |
| Key type |
Symmetric |
Industry-standard AES-256 encryption |
| Key usage |
Encrypt and decrypt |
Used for automated backup and recovery operations |
| Regionality |
Single-Region key |
Isolated key dedicated to Jakarta region |
- Click Next.
- Set Alias:
pdns-backup-key.
- Set Description:
PDNS Backup Encryption Key - Jakarta Primary.
- Click Next β Next (leave Key Administrators & Key Permissions default) β click Finish.
-
Record the Key ARN that appears in the reference table below. Example:
arn:aws:kms:ap-southeast-3:123456789012:key/xxxx-xxxx-xxxx-xxxx

1B. Enable Key Rotation
- On the detail page of the newly created
pdns-backup-key, click the Key rotation tab.
- Check the box: Automatically rotate this KMS key every year.
- Click Save.
1C. KMS Key for Singapore Region (Recovery)
-
Switch region on the top-right dropdown β select Asia Pacific (Singapore) ap-southeast-1.
- Repeat steps 1A and 1B with these settings:
-
Alias:
pdns-recovery-key
-
Description:
PDNS Recovery Encryption Key - Singapore Recovery
-
Key rotation: Automatically enabled (Enabled)
-
Record the Key ARN for Singapore region.

KMS Key Reference Table
Record your generated Key ARNs in the following reference table:
| Key Alias |
Target Region |
Primary Purpose |
Key ARN (Copy from Console) |
alias/pdns-backup-key |
ap-southeast-3 (Jakarta) |
Encrypts S3 WORM, Primary Backup Vault, CloudTrail |
arn:aws:kms:ap-southeast-3:[ACCOUNT-ID]:key/... |
alias/pdns-recovery-key |
ap-southeast-1 (Singapore) |
Encrypts Singapore Recovery Vault, DRS Staging Volumes |
arn:aws:kms:ap-southeast-1:[ACCOUNT-ID]:key/... |
STEP 2 β Create S3 Bucket with Object Lock (WORM)
β οΈ IMPORTANT: S3 Object Lock can only be enabled when a bucket is first created. It cannot be added after the bucket exists.
2A. Create Bucket in Jakarta
- Confirm active region: ap-southeast-3 (Jakarta).
- Search for S3 in the top search bar β click S3.
- Click the Create bucket button.
- Fill in the bucket configuration:
| Parameter |
Value |
Security Rationale |
| Bucket name |
pdns-immutable-backup-[your-account-number] |
Must be globally unique across AWS |
| AWS Region |
Asia Pacific (Jakarta) ap-southeast-3 |
Primary production region |
| Object Ownership |
ACLs disabled (recommended) |
Access controlled exclusively via IAM policies |
| Block Public Access |
Block all public access (All checkboxes checked) |
Completely prevents unauthorized public exposure |
| Bucket Versioning |
Enable |
Mandatory technical prerequisite for Object Lock |
| Default Encryption |
SSE-KMS |
Server-side encryption with Customer Managed Key (CMK) |
| KMS Key |
Select pdns-backup-key
|
Uses Jakarta CMK created in Step 1 |
| Bucket Key |
Enable |
Reduces KMS API call costs by up to 99% |
| Object Lock |
Enable β
|
Enables WORM (Write Once, Read Many) capability |
- Under Advanced settings β Object Lock, check Enable and acknowledge the confirmation dialog.
- Click Create bucket.
2B. Configure Default Retention (Compliance Mode)
- Click the name of the newly created bucket (
pdns-immutable-backup-...).
- Go to the Properties tab.
- Scroll down to Object Lock β click Edit.
- Fill in the default retention settings:
| Parameter |
Value |
Security Impact |
| Default retention |
Enable |
Automatically applied to all newly stored objects |
| Default retention mode |
Compliance β οΈ |
Absolute protection β objects cannot be deleted by anyone, including Root and AWS Support |
| Retention period |
30 Days |
Minimum 30-day immutability window for ransomware defense |
- Click Save changes.

π΄ Critical Note: In Compliance Mode, no user (not even the root account or AWS Support) can delete objects or overwrite them until the 30-day retention period has expired.
2C. Add Lifecycle Rule (Auto-transition to Glacier)
- In the same bucket, click the Management tab.
- Click the Create lifecycle rule button.
- Fill in the lifecycle configuration:
| Parameter |
Value |
Optimization Purpose |
| Lifecycle rule name |
move-to-glacier-after-90-days |
Policy identifier |
| Filter scope |
Apply to all objects in the bucket |
Covers all historical backup archives |
| Lifecycle rule actions |
Check: Transition current versions of objects between storage classes
|
Moves older objects to colder tiers |
| Storage class transition |
Glacier Flexible Retrieval |
Low-cost cold archival storage |
| Days after object creation |
90 |
Automatic migration after 90 days |
- Acknowledge the cost transition dialog if prompted β click Create rule.
STEP 3 β AWS Backup Vault + Vault Lock
3A. Create Backup Vault in Jakarta
- Confirm active region: ap-southeast-3 (Jakarta).
- Search for AWS Backup in the search bar β click AWS Backup.
- In the left navigation menu, click Backup vaults.
- Click Create backup vault.
- Fill in the configuration:
| Parameter |
Value |
Description |
| Backup vault name |
pdns-immutable-vault |
Primary backup vault in Jakarta |
| Encryption key |
Select pdns-backup-key
|
Uses Jakarta KMS key from Step 1 |
| Tags |
Key: Environment, Value: Production
|
Environment metadata classification |
- Click Create backup vault.

3B. Enable Vault Lock
β οΈ There is a 72-hour grace period. During the first 3 days, Vault Lock can still be modified or deleted. After that period, it becomes PERMANENT and cannot be deleted or bypassed by anyone, including AWS.
- On the
pdns-immutable-vault page, click the Vault Lock tab.
- Click Configure Vault Lock.
- Fill in the parameters:
| Parameter |
Value |
Security Boundary |
| Vault Lock mode |
Compliance |
Permanent compliance mode (WORM Vault) |
| Min retention period |
7 Days |
Snapshots cannot be deleted before 7 days |
| Max retention period |
365 Days |
Upper bound for snapshot retention in the vault |
| Grace period |
72 Hours (Default) |
Evaluation period before the lock becomes irreversible |
- Type
confirm in the confirmation dialog.
- Click Apply Vault Lock.

3C. Create Recovery Vault in Singapore
-
Switch region to ap-southeast-1 (Singapore).
- Navigate to AWS Backup β Backup vaults β Create backup vault.
- Fill in the recovery vault settings:
| Parameter |
Value |
Description |
| Target Region |
Asia Pacific (Singapore) ap-southeast-1 |
Isolated disaster recovery region (Air-gapped) |
| Backup vault name |
pdns-recovery-vault |
Destination vault for cross-region copies |
| Encryption key |
Select pdns-recovery-key
|
Independently encrypted with Singapore CMK |
| Vault Lock mode |
Compliance (Min 7 days, Max 365 days) |
Anti-ransomware protection in recovery region |
- Click Create backup vault.
- Repeat step 3B (Vault Lock) on this Singapore vault using the same parameters (Compliance Mode, Min 7 days, Max 365 days).

STEP 4 β Backup Plan (Automated Backup Schedule)
4A. Create IAM Role for Backup
- Search for IAM in the search bar β click IAM.
- In the left menu, click Roles β click Create role.
- Select Trusted entity type: AWS service.
- Under Use case, scroll down β select Backup β click Next.
- In the Add permissions section, search and check both policies:
- β
AWSBackupServiceRolePolicyForBackup
- β
AWSBackupServiceRolePolicyForRestores
- Click Next.
- Enter Role name:
AWSBackupServiceRole-PDNS.
- Click Create role.
4B. Create Backup Plan
- Switch region back to ap-southeast-3 (Jakarta).
- In AWS Backup β left menu β Backup plans β click Create backup plan.
- Select Build a new plan.
- Enter Backup plan name:
PDNS-Ransomware-Resilient-Plan.
4C. Add Rule 1: Hourly Backup (Critical Services)
- Click the Add backup rule button.
- Configure the hourly backup rule:
| Parameter |
Value |
Purpose |
| Rule name |
Hourly-Critical-Services |
High-frequency protection for critical workloads |
| Backup vault |
pdns-immutable-vault |
Local immutable vault in Jakarta |
| Backup frequency |
Hourly (Every 1 hour) |
Ensures ultra-low RPO (< 1 hour) |
| Backup window |
Start within 1 hour |
Execution tolerance window |
| Transition to cold storage |
Never |
Retained in warm storage for rapid restores |
| Retention period |
7 Days |
Local retention duration |
- Under Copy to destination:
- Click Add copy
-
Destination region: Asia Pacific (Singapore)
-
Destination vault:
pdns-recovery-vault
-
Retention period: 30 Days
- Click Save rule.

4D. Add Rule 2: Daily Backup
- Click Add backup rule again.
- Configure the daily backup rule:
| Parameter |
Value |
Purpose |
| Rule name |
Daily-All-Resources |
Routine daily protection for all resources |
| Backup vault |
pdns-immutable-vault |
Primary Jakarta vault |
| Backup frequency |
Daily |
Executed once per day |
| Backup window |
01:00 UTC |
Off-peak execution window |
| Transition to cold storage |
After 90 days |
Automated migration to cold storage |
| Retention period |
1 Year (365 days) |
Annual compliance retention |
- Click Save rule.

4E. Add Rule 3: Monthly Long-Term
- Click Add backup rule again.
- Configure the monthly long-term backup rule:
| Parameter |
Value |
Purpose |
| Rule name |
Monthly-Long-Term |
Long-term regulatory compliance archive |
| Backup vault |
pdns-immutable-vault |
Primary Jakarta vault |
| Backup frequency |
Monthly |
First day of every month |
| Transition to cold storage |
After 30 days |
Rapid transition to cold storage for cost efficiency |
| Retention period |
7 Years |
Meets statutory compliance & audit retention rules |
- Click Save rule β click Create plan.

4F. Assign Resources to Backup Plan
- After the plan is created, click Assign resources.
- Fill in the resource assignment form:
| Parameter |
Value |
Assignment Logic |
| Resource assignment name |
All-Production-Resources |
Resource group assignment identifier |
| IAM role |
AWSBackupServiceRole-PDNS |
Dedicated backup service role from Step 4A |
| Resource selection |
Include specific resource types |
Target workload selection |
| Resource types |
Check: EC2, RDS, EFS, DynamoDB, EBS
|
Core compute and database assets |
| Refine selection using tags |
Key: Environment, Value: Production
|
All resources with this tag are automatically protected |
- Click Assign resources.
β οΈ Operational Notice: Ensure all production EC2 instances, RDS databases, and EBS volumes in Jakarta carry the tag: Environment=Production.

STEP 5 β Amazon GuardDuty (Threat Detection)
5A. Enable GuardDuty in Jakarta
- Confirm active region: ap-southeast-3 (Jakarta).
- Search for GuardDuty in the search bar β click Amazon GuardDuty.
- Click the Get Started button.
- On the welcome page, click Enable GuardDuty.

5B. Enable Protection Plans
After GuardDuty is active:
- In the left menu, click Protection plans.
- Enable each protection plan individually by clicking Enable:
| Protection Plan |
Target Status |
Ransomware Defense Capability |
| S3 Protection |
Enabled β
|
Detects suspicious mass reading or unauthorized API activity on S3 |
| Malware Protection for EC2 |
Enabled β
|
Automatically scans EBS volumes upon detecting suspicious activities |
| RDS Protection |
Enabled β
|
Identifies anomalous logins and brute-force patterns on RDS databases |
| Lambda Protection |
Enabled β
|
Detects malicious code executions on serverless functions |

5C. Configure Finding Frequency
- In the left menu, click Settings.
- Under Finding export options β Updated finding frequency.
- Select: Update CWE every 15 minutes (accelerates finding notifications to EventBridge).
- Click Save.

5D. Create SNS Topic for Alerts
- Search for SNS in the search bar β click Simple Notification Service.
- In the left menu, click Topics β click Create topic.
- Configure the topic:
| Parameter |
Value |
Description |
| Type |
Standard |
Standard publish/subscribe messaging |
| Name |
pdns-security-alerts |
Security alert notification topic |
- Click Create topic.
- On the new topic page, click Create subscription.
- Configure the subscription:
| Parameter |
Value |
Description |
| Protocol |
Email |
Notifications sent via email |
| Endpoint |
[email protected] |
Target SecOps team email address |
- Click Create subscription.
-
Check your inbox β click Confirm subscription on the email received from AWS Notifications.

5E. Create EventBridge Rule: GuardDuty HIGH β Alert
- Search for EventBridge in the search bar β click Amazon EventBridge.
- In the left menu, click Rules β click Create rule.
- Fill in the rule parameters:
| Parameter |
Value |
Description |
| Name |
GuardDuty-High-Severity-Alert |
EventBridge rule name |
| Description |
Alert when GuardDuty detects HIGH/CRITICAL threat |
Functional description |
| Event bus |
default |
Standard account event bus |
| Rule type |
Rule with an event pattern |
Triggers actions based on incoming event patterns |
- Click Next.
- Under Event pattern β select Custom pattern (JSON editor).
- Paste the following JSON pattern:
{
"source": ["aws.guardduty"],
"detail-type": ["GuardDuty Finding"],
"detail": {
"severity": [{ "numeric": [">=", 7] }]
}
}
- Click Next.
- Under Target 1:
-
Target type: AWS service
-
Select a target: SNS topic
-
Topic: select
pdns-security-alerts
- Click Next β Next β click Create rule.
β
Now every GuardDuty finding with severity β₯ 7 will be automatically dispatched to your email within seconds.


STEP 6 β AWS Security Hub
6A. Enable Security Hub
- Search for Security Hub in the search bar β click Security Hub.
- Click Go to Security Hub / Enable Security Hub.
- Ensure the following compliance standards are checked:
- β
AWS Foundational Security Best Practices v1.0.0
- β
CIS AWS Foundations Benchmark v1.4.0
- β
Enable AWS Config (Security Hub requires AWS Config for resource evaluations)
- Click Enable Security Hub.


6B. Integrate with GuardDuty
- In Security Hub, click Integrations in the left menu.
- Type
GuardDuty in the search box.
- Click Accept findings on the Amazon GuardDuty integration card.
- Confirm acceptance.

6C. Setup Ransomware Insight
- In the left menu, click Insights β click Create insight.
- Configure the custom insight:
| Parameter |
Value |
Description |
| Insight name |
Ransomware-Risk-Indicators |
Custom security analytical filter |
| Filter 1 |
Product name = GuardDuty
|
Focuses on GuardDuty intelligence |
| Filter 2 |
Severity label = HIGH, CRITICAL
|
Filters for severe and fatal threats |
| Filter 3 |
Workflow status = NEW
|
Displays active unaddressed incidents |
| Group by |
Resource ID |
Aggregates findings per impacted asset |
- Click Create insight.

STEP 7 β AWS CloudTrail (Audit Log)
7A. Create CloudTrail Trail
- Search for CloudTrail in the search bar β open CloudTrail.
- In the left menu, click Trails β click Create trail.
- Fill in the trail parameters:
| Parameter |
Value |
Forensic & Security Rationale |
| Trail name |
pdns-full-audit-trail |
Master audit trail name |
| Storage location |
Create new S3 bucket |
Dedicated S3 bucket for audit records |
| Trail log bucket name |
pdns-cloudtrail-logs-[account-number] |
Unique audit bucket name |
| Log file SSE-KMS encryption |
Enabled |
Encrypts all stored log archives |
| AWS KMS alias |
Select pdns-backup-key
|
Uses Jakarta CMK |
| Log file validation |
Enabled β
|
Generates cryptographic hashes to detect log tampering |
| CloudWatch Logs |
Enabled |
Streams events to CloudWatch for near real-time alerting |
| Log group name |
/aws/cloudtrail/pdns-audit |
Dedicated CloudWatch log group |
| Multi-region trail |
Yes β
|
Captures API actions across all AWS regions |
- Click Next.

7B. Select Events to Log
- Under Events:
- Check: β
Management events (Read + Write)
- Check: β
Data events
- Under Data events, click Add data event type:
-
Data event type: S3 β All current and future S3 buckets β Read + Write
- Click Add data event type again:
-
Data event type: Lambda β All current and future functions
- Click Next β review settings β click Create trail.

STEP 8 β AWS Elastic Disaster Recovery (DRS)
8A. Initialize DRS in Recovery Region
-
Switch region to ap-southeast-1 (Singapore).
- Search for Elastic Disaster Recovery in the search bar β click AWS Elastic Disaster Recovery.
- Click Set up Elastic Disaster Recovery / Get started.
- Configure Default replication settings:
| Parameter |
Value |
Technical Rationale |
| Staging area subnet |
Public Subnet in ap-southeast-1b
|
Subnet where lightweight replication servers run |
| Security groups |
pdns-drs-replication-sg |
Security group governing replication traffic |
| Instance type |
t3.small |
Cost-effective instance for replication servers |
| EBS encryption |
Custom β select pdns-recovery-key
|
Ensures encrypted staging storage in DR region |
| Create public IP |
Yes |
Required for cross-region replication traffic over the internet |
π‘ Architectural Recommendation: Before initializing DRS, create a dedicated VPC in Singapore named pdns-recovery-vpc (10.10.0.0/16) with 1 Public Subnet in AZ ap-southeast-1b and an active Internet Gateway.
- Create Security Group
pdns-drs-replication-sg in Singapore with:
-
Inbound: Port TCP
1500 from 0.0.0.0/0 (incoming block-level data replication from Jakarta)
-
Outbound: All traffic (Default)
- Click Next.

8B. Configure Point-in-Time (PIT) Recovery
- Under Point-in-time recovery:
- Click Add rule
-
Snapshot retention (in days): 7 days
- Click Next β click Create.

8C. Install DRS Agent on Production Server
DRS Agent installation is conducted via AWS Systems Manager Session Manager (no SSH port 22 required).
DRS Replication Topology
[Jakarta - ap-southeast-3] [Singapore - ap-southeast-1]
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β PRODUCTION EC2 β β DRS Replication Server β
β β Install DRS Agent ββreplicateββΊβ (created AUTOMATICALLY β
β on this server β (Port 1500)β by AWS DRS, not manually) β
ββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
SOURCE (Origin) TARGET (Recovery)
Step 1 β Create Production EC2 in Jakarta (if not yet exists)
- Confirm region: ap-southeast-3 (Jakarta).
- Go to EC2 β Instances β Launch instances.
- Fill in the instance configuration:
| Parameter |
Value |
Critical Note |
| Name |
pdns-prod-server-01 |
Production instance identifier |
| AMI |
Amazon Linux 2023 |
SSM Agent pre-installed |
| Instance type |
t3.medium |
β οΈ Minimum t3.medium β t3.micro (1 GiB RAM) is insufficient for DRS Agent |
| Storage (EBS) |
20 GiB |
β οΈ Minimum 20 GiB β 8 GiB is too small for OS + Agent download |
| Key pair |
Proceed without key pair |
Access via Session Manager (no SSH required) |
| Auto-assign public IP |
Enable |
Required for internet connectivity |
| IAM instance profile |
EC2-SSM-SessionManager-Role |
Attach role created in Step 2 below |
| Tags |
Key: Environment, Value: Production
|
Required for automated backup by the Backup Plan |
- Click Launch instance.

Step 2 β Create IAM Role for EC2 (SSM + DRS)
- Go to IAM β Roles β Create role.
- Select AWS service β Use case: EC2 β click Next.
- Check BOTH of the following policies:
- β
AmazonSSMManagedInstanceCore (Session Manager access)
- β
AWSElasticDisasterRecoveryAgentInstallationPolicy (DRS agent installation permissions)
- Set role name:
EC2-SSM-SessionManager-Role β click Create role.

Step 3 β Attach IAM Role to EC2 Instance
- In Jakarta console, open EC2 β Instances.
- Check
pdns-prod-server-01 β click Actions β Security β Modify IAM role.
- Select
EC2-SSM-SessionManager-Role β click Update IAM role.

Step 4 β Configure Outbound Security Group (Ports 443 & 1500)
The DRS Agent requires 2 outbound ports from Jakarta to the internet:
| Target Port |
Protocol |
Purpose |
| 443 |
HTTPS |
Communication to DRS Control Plane API |
| 1500 |
TCP |
Block-level disk data replication to Singapore |
- On instance
pdns-prod-server-01, go to the Security tab β click the Security Group name.
- Open Outbound rules β click Edit outbound rules β click Add rule:
-
Type: Custom TCP
-
Port range:
1500
-
Destination:
0.0.0.0/0
-
Description:
DRS Data Replication to Singapore
- Click Save rules.

Step 5 β Add KMS Key Permission for DRS
- Switch region to ap-southeast-1 (Singapore).
- Open KMS β click
pdns-recovery-key β Key policy tab β click Edit.
- Add the following statement inside the
Statement array before the closing ]:
{
"Sid": "Allow DRS Service to use this key",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::[YOUR-ACCOUNT-ID]:role/aws-service-role/drs.amazonaws.com/AWSServiceRoleForElasticDisasterRecovery"
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:GenerateDataKey",
"kms:GenerateDataKeyWithoutPlaintext",
"kms:DescribeKey",
"kms:CreateGrant",
"kms:ReEncrypt*"
],
"Resource": "*"
}
(Replace [YOUR-ACCOUNT-ID] with your 12-digit AWS account ID). Click Save changes.

Step 6 β Verify Instance Readiness in Fleet Manager
- Open Systems Manager β Fleet Manager in region ap-southeast-3 (Jakarta).
- Wait 3β5 minutes after attaching the IAM role.
- Refresh the page until
pdns-prod-server-01 appears with status: Online β
.
| Possible Cause |
Recommended Solution |
| IAM Role not yet attached |
Verify and attach EC2-SSM-SessionManager-Role in EC2 Security tab |
| SSM Agent not running |
Restart instance from EC2 console |
| Instance in private subnet without internet |
Create 3 VPC Interface Endpoints: ssm, ssmmessages, ec2messages
|

Step 7 β Install DRS Agent via Session Manager
- Open Systems Manager β Session Manager in Jakarta.
- Click the Start session button in the top-right corner.
- On the Specify target page, select
pdns-prod-server-01 β click Start session.
- In the web terminal that opens, run the following commands one at a time:

Command 1 β Switch to superuser (root):
Command 2 β Install kernel headers & build tools:
sudo dnf install -y kernel-devel kernel-headers gcc make
(Wait until output displays Complete!).
Command 3 β Download official DRS installer:
wget -O /tmp/aws-replication-installer-init.py \
https://aws-elastic-disaster-recovery-ap-southeast-1.s3.amazonaws.com/latest/linux/aws-replication-installer-init.py
Command 4 β Run installer:
sudo python3 /tmp/aws-replication-installer-init.py --region ap-southeast-1 --no-prompt
Wait until execution completes (~10β20 minutes). Installation stages:
| Stage |
Terminal Output |
Estimated Duration |
| Volume detection |
All volumes were successfully identified. |
~30 seconds |
| Agent download |
Downloading the AWS Replication Agent... Finished. |
~3β5 minutes |
| Agent install |
Installing the AWS Replication Agent onto the source server... |
~5β10 minutes |
| Complete |
The AWS Replication Agent was successfully installed. |
Complete |
Command 5 β Enable agent auto-start on reboot:
sudo systemctl enable aws-replication-agent
8D. Verify Replication Status
- Switch region to ap-southeast-1 (Singapore).
- Open Elastic Disaster Recovery β Source servers.
- Inspect the Data replication status column:
| Status |
Indicator |
Meaning |
Required Action |
| Initiating |
π‘ Yellow |
Agent recently connected |
Wait for handshake |
| Initial sync |
π΅ Blue |
First synchronization in progress |
Wait until 100% |
| Continuous |
π’ Green
|
β
Active replication, RPO < 1 minute
|
β
Done & protected!
|
| Disconnected |
π΄ Red |
Network or agent connectivity lost |
Check outbound port 1500 and agent service |

8E. Configure Launch Template for Recovery
- In DRS left menu, click Launch settings.
- Select the source server β click Edit.
- Configure the launch template:
| Parameter |
Value |
Rationale |
| Launch disposition |
Stopped |
Cost optimization; recovered instance started manually during DR |
| Target subnet |
Subnet in pdns-recovery-vpc
|
Places recovery VM in isolated network |
| Security groups |
Recovery Security Group |
Governs recovery firewall rules |
| Instance type |
Match production (t3.medium) |
Ensures equivalent compute capacity |
- Click Save template.
note : If you've achieved 100% replication or the status is green, you can proceed to 8E. In my case, it didn't reach the green status because my internet connection is slow.
π° Estimated Monthly Architecture Cost
| AWS Service |
Assumed Capacity & Workload |
Estimated Cost / Month |
Business Value & Protection |
| AWS Backup |
1 TB Backup storage in Jakarta + cross-region copy to Singapore |
~$80 |
Protects database snapshots & EBS volumes |
| S3 Object Lock (WORM) |
5 TB Immutable data storage (Standard + Glacier) |
~$115 |
Data archives cannot be deleted or modified by attackers |
| AWS Elastic DRS |
5 Production servers continuously replicated to Singapore |
~$150 |
Block-level disk replication with RTO < 1 hour |
| Amazon GuardDuty |
VPC Flow, CloudTrail, DNS, S3, & EKS log analysis |
~$90 |
Early threat detection before encryption spreads |
| AWS Security Hub |
Centralized security findings aggregation & compliance scoring |
~$50 |
Unified security posture visibility |
| AWS CloudTrail |
Free management events + S3/Lambda Data Events |
~$40 |
Tamper-proof digital forensic audit evidence |
| AWS KMS |
2 Customer Managed Keys (Jakarta & Singapore) + API calls |
~$20 |
Independent cryptographic key isolation per region |
| TOTAL ESTIMATED COST |
Complete Ransomware-Resilient DR Architecture |
~$545 / Month |
Insurance against tens of millions of dollars in losses |
π‘ Cost vs. Impact: In the June 2024 PDNS ransomware incident, attackers demanded an $8,000,000 ransom while disrupting 230+ public agencies for weeks. The prevention and resilience architecture documented here costs only ~$545/month.
π° Cost vs. Benefit
| Item |
Value |
| Brain Cipher ransom demand |
USD 8,000,000 |
| Estimated cost of 2 weeks of downtime |
USD 50,000,000+ |
| Public trust and reputation |
Priceless |
| Cost of this architecture/month |
~USD 720 |
| ROI |
11,000x+ |
π Resources