[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NW6SA5AJ9XFN74A9HW0B63":3,"skill-same:01M6NW6SA5AJ9XFN74A9HW0B63":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":21,"commitSha":52,"skillDirectory":53,"forksCount":13,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6NW6SA5AJ9XFN74A9HW0B63","aws-rds",null,"Provision and manage RDS databases. Configure backups, replication, and security. Use when deploying managed relational databases on AWS.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Faws-rds\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"aws","rds","aws rds","main","managed","relevant","replication","scripts","critical","os","platform","security","community","manage","databases","only","configure","access","devops-security","license","2026-11-10 10:12:30",false,"---\nname: aws-rds\ndescription: Provision and manage RDS databases. Configure backups, replication, and\n  security. Use when deploying managed relational databases on AWS.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# AWS RDS\n\nDeploy and manage Amazon RDS relational databases with production-grade backups, replication, monitoring, and security.\n\n## When to Use This Skill\n\n- Provisioning a managed PostgreSQL, MySQL, MariaDB, Oracle, or SQL Server database\n- Setting up Multi-AZ deployments for high availability\n- Creating read replicas for horizontal read scaling\n- Configuring automated backups, snapshots, and point-in-time recovery\n- Tuning database parameters for performance\n- Migrating from self-managed databases to RDS\n- Monitoring database performance and setting up alarms\n\n## Prerequisites\n\n- AWS CLI v2 installed and configured\n- IAM permissions: `rds:*`, `ec2:DescribeSecurityGroups`, `ec2:DescribeSubnets`, `kms:*`, `cloudwatch:*`\n- A VPC with at least two subnets in different AZs (for subnet group)\n- Security group allowing database port access from application subnets only\n\n## Create a DB Subnet Group\n\n```bash\n# Create a subnet group spanning two AZs\naws rds create-db-subnet-group \\\n  --db-subnet-group-name production-db-subnets \\\n  --db-subnet-group-description \"Production database subnets\" \\\n  --subnet-ids subnet-private-a subnet-private-b\n\n# List subnet groups\naws rds describe-db-subnet-groups \\\n  --query \"DBSubnetGroups[].{Name:DBSubnetGroupName,VPC:VpcId,Status:SubnetGroupStatus}\" \\\n  --output table\n```\n\n## Create a Production Database\n\n```bash\n# Create a PostgreSQL 16 Multi-AZ instance\naws rds create-db-instance \\\n  --db-instance-identifier production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --engine postgres \\\n  --engine-version 16.4 \\\n  --master-username appadmin \\\n  --manage-master-user-password \\\n  --allocated-storage 100 \\\n  --max-allocated-storage 500 \\\n  --storage-type gp3 \\\n  --storage-encrypted \\\n  --kms-key-id alias\u002Frds-key \\\n  --vpc-security-group-ids sg-db-access \\\n  --db-subnet-group-name production-db-subnets \\\n  --db-name appdb \\\n  --backup-retention-period 14 \\\n  --preferred-backup-window \"03:00-04:00\" \\\n  --preferred-maintenance-window \"sun:05:00-sun:06:00\" \\\n  --multi-az \\\n  --auto-minor-version-upgrade \\\n  --deletion-protection \\\n  --copy-tags-to-snapshot \\\n  --monitoring-interval 60 \\\n  --monitoring-role-arn arn:aws:iam::123456789012:role\u002Frds-monitoring-role \\\n  --enable-performance-insights \\\n  --performance-insights-retention-period 7 \\\n  --enable-cloudwatch-logs-exports '[\"postgresql\",\"upgrade\"]' \\\n  --tags '[\n    {\"Key\":\"Environment\",\"Value\":\"production\"},\n    {\"Key\":\"Team\",\"Value\":\"backend\"},\n    {\"Key\":\"Backup\",\"Value\":\"daily\"}\n  ]'\n\n# Wait for instance to become available\naws rds wait db-instance-available --db-instance-identifier production-api-db\n\n# Get connection endpoint\naws rds describe-db-instances \\\n  --db-instance-identifier production-api-db \\\n  --query \"DBInstances[0].Endpoint.{Address:Address,Port:Port}\" \\\n  --output table\n```\n\n## Retrieve Master Password from Secrets Manager\n\n```bash\n# When using --manage-master-user-password, RDS stores the password in Secrets Manager\naws rds describe-db-instances \\\n  --db-instance-identifier production-api-db \\\n  --query \"DBInstances[0].MasterUserSecret.SecretArn\" \\\n  --output text\n\n# Retrieve the secret value\naws secretsmanager get-secret-value \\\n  --secret-id arn:aws:secretsmanager:us-east-1:123456789012:secret:rds-db-secret-abc123 \\\n  --query SecretString --output text\n```\n\n## Parameter Groups\n\n```bash\n# Create a custom parameter group\naws rds create-db-parameter-group \\\n  --db-parameter-group-name production-pg16 \\\n  --db-parameter-group-family postgres16 \\\n  --description \"Production PostgreSQL 16 parameters\"\n\n# Set performance parameters\naws rds modify-db-parameter-group \\\n  --db-parameter-group-name production-pg16 \\\n  --parameters \\\n    \"ParameterName=max_connections,ParameterValue=200,ApplyMethod=pending-reboot\" \\\n    \"ParameterName=shared_buffers,ParameterValue={DBInstanceClassMemory\u002F4},ApplyMethod=pending-reboot\" \\\n    \"ParameterName=effective_cache_size,ParameterValue={DBInstanceClassMemory*3\u002F4},ApplyMethod=pending-reboot\" \\\n    \"ParameterName=work_mem,ParameterValue=65536,ApplyMethod=immediate\" \\\n    \"ParameterName=maintenance_work_mem,ParameterValue=524288,ApplyMethod=immediate\" \\\n    \"ParameterName=random_page_cost,ParameterValue=1.1,ApplyMethod=immediate\" \\\n    \"ParameterName=log_min_duration_statement,ParameterValue=1000,ApplyMethod=immediate\" \\\n    \"ParameterName=log_statement,ParameterValue=ddl,ApplyMethod=immediate\" \\\n    \"ParameterName=idle_in_transaction_session_timeout,ParameterValue=60000,ApplyMethod=immediate\"\n\n# Apply parameter group to the instance\naws rds modify-db-instance \\\n  --db-instance-identifier production-api-db \\\n  --db-parameter-group-name production-pg16 \\\n  --apply-immediately\n```\n\n## Read Replicas\n\n```bash\n# Create a read replica in the same region\naws rds create-db-instance-read-replica \\\n  --db-instance-identifier production-api-db-read1 \\\n  --source-db-instance-identifier production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --availability-zone us-east-1b \\\n  --enable-performance-insights \\\n  --monitoring-interval 60 \\\n  --monitoring-role-arn arn:aws:iam::123456789012:role\u002Frds-monitoring-role\n\n# Create a cross-region read replica for DR\naws rds create-db-instance-read-replica \\\n  --db-instance-identifier dr-api-db-read \\\n  --source-db-instance-identifier arn:aws:rds:us-east-1:123456789012:db:production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --region us-west-2 \\\n  --storage-encrypted \\\n  --kms-key-id alias\u002Frds-dr-key\n\n# Promote a read replica to standalone (for DR failover)\naws rds promote-read-replica \\\n  --db-instance-identifier dr-api-db-read\n\n# Check replication lag\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name ReplicaLag \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db-read1 \\\n  --start-time \"$(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --end-time \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --period 300 \\\n  --statistics Average \\\n  --output table\n```\n\n## Snapshots and Point-in-Time Recovery\n\n```bash\n# Create a manual snapshot\naws rds create-db-snapshot \\\n  --db-instance-identifier production-api-db \\\n  --db-snapshot-identifier production-api-db-pre-migration-$(date +%Y%m%d)\n\n# Wait for snapshot to complete\naws rds wait db-snapshot-available \\\n  --db-snapshot-identifier production-api-db-pre-migration-20260324\n\n# Restore from snapshot (creates a new instance)\naws rds restore-db-instance-from-db-snapshot \\\n  --db-instance-identifier production-api-db-restored \\\n  --db-snapshot-identifier production-api-db-pre-migration-20260324 \\\n  --db-instance-class db.r6g.large \\\n  --db-subnet-group-name production-db-subnets \\\n  --vpc-security-group-ids sg-db-access\n\n# Point-in-time recovery (restore to a specific second)\naws rds restore-db-instance-to-point-in-time \\\n  --source-db-instance-identifier production-api-db \\\n  --target-db-instance-identifier production-api-db-pitr \\\n  --restore-time \"2026-03-24T10:30:00Z\" \\\n  --db-instance-class db.r6g.large \\\n  --db-subnet-group-name production-db-subnets\n\n# Copy snapshot to another region\naws rds copy-db-snapshot \\\n  --source-db-snapshot-identifier arn:aws:rds:us-east-1:123456789012:snapshot:production-api-db-pre-migration-20260324 \\\n  --target-db-snapshot-identifier production-api-db-dr-copy \\\n  --region us-west-2 \\\n  --kms-key-id alias\u002Frds-dr-key\n\n# Delete old snapshots\naws rds delete-db-snapshot --db-snapshot-identifier old-snapshot-name\n```\n\n## Monitoring and Alarms\n\n```bash\n# Set CPU utilization alarm\naws cloudwatch put-metric-alarm \\\n  --alarm-name rds-production-cpu-high \\\n  --alarm-description \"RDS CPU > 80% for 5 minutes\" \\\n  --metric-name CPUUtilization \\\n  --namespace AWS\u002FRDS \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --statistic Average \\\n  --period 300 \\\n  --threshold 80 \\\n  --comparison-operator GreaterThanThreshold \\\n  --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:123456789012:db-alerts\n\n# Set free storage space alarm (alert below 10 GB)\naws cloudwatch put-metric-alarm \\\n  --alarm-name rds-production-storage-low \\\n  --alarm-description \"RDS free storage \u003C 10GB\" \\\n  --metric-name FreeStorageSpace \\\n  --namespace AWS\u002FRDS \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --statistic Average \\\n  --period 300 \\\n  --threshold 10737418240 \\\n  --comparison-operator LessThanThreshold \\\n  --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:123456789012:db-alerts\n\n# Check current database connections\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name DatabaseConnections \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --start-time \"$(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --end-time \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --period 300 \\\n  --statistics Average Maximum \\\n  --output table\n```\n\n## Terraform RDS Example\n\n```hcl\nresource \"aws_db_subnet_group\" \"main\" {\n  name       = \"production-db-subnets\"\n  subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id]\n\n  tags = {\n    Environment = \"production\"\n  }\n}\n\nresource \"aws_db_parameter_group\" \"postgres16\" {\n  name   = \"production-pg16\"\n  family = \"postgres16\"\n\n  parameter {\n    name  = \"max_connections\"\n    value = \"200\"\n  }\n\n  parameter {\n    name         = \"shared_buffers\"\n    value        = \"{DBInstanceClassMemory\u002F4}\"\n    apply_method = \"pending-reboot\"\n  }\n\n  parameter {\n    name  = \"log_min_duration_statement\"\n    value = \"1000\"\n  }\n}\n\nresource \"aws_db_instance\" \"main\" {\n  identifier     = \"production-api-db\"\n  engine         = \"postgres\"\n  engine_version = \"16.4\"\n  instance_class = \"db.r6g.large\"\n\n  allocated_storage     = 100\n  max_allocated_storage = 500\n  storage_type          = \"gp3\"\n  storage_encrypted     = true\n  kms_key_id            = aws_kms_key.rds.arn\n\n  db_name  = \"appdb\"\n  username = \"appadmin\"\n  manage_master_user_password = true\n\n  multi_az               = true\n  db_subnet_group_name   = aws_db_subnet_group.main.name\n  vpc_security_group_ids = [aws_security_group.db.id]\n  parameter_group_name   = aws_db_parameter_group.postgres16.name\n\n  backup_retention_period   = 14\n  backup_window             = \"03:00-04:00\"\n  maintenance_window        = \"sun:05:00-sun:06:00\"\n  copy_tags_to_snapshot     = true\n  deletion_protection       = true\n  skip_final_snapshot       = false\n  final_snapshot_identifier = \"production-api-db-final\"\n\n  performance_insights_enabled          = true\n  performance_insights_retention_period = 7\n  monitoring_interval                   = 60\n  monitoring_role_arn                   = aws_iam_role.rds_monitoring.arn\n\n  enabled_cloudwatch_logs_exports = [\"postgresql\", \"upgrade\"]\n\n  tags = {\n    Environment = \"production\"\n    Team        = \"backend\"\n  }\n}\n\nresource \"aws_db_instance\" \"read_replica\" {\n  identifier          = \"production-api-db-read1\"\n  replicate_source_db = aws_db_instance.main.identifier\n  instance_class      = \"db.r6g.large\"\n\n  performance_insights_enabled = true\n  monitoring_interval          = 60\n  monitoring_role_arn          = aws_iam_role.rds_monitoring.arn\n}\n```\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Cannot connect to RDS | Security group blocks traffic | Verify SG allows app subnet CIDR on DB port |\n| Storage full | Auto-scaling not enabled or limit reached | Set `--max-allocated-storage`; increase manually |\n| High replication lag | Write-heavy workload or replica undersized | Upgrade replica instance class; reduce write volume |\n| Parameter change not applied | Requires reboot for static params | Reboot with `--force-failover` during maintenance window |\n| Snapshot restore slow | Large database size | Use larger instance class for restore; consider PITR |\n| Performance Insights empty | Not enabled or instance type unsupported | Enable PI; check instance class supports it |\n| Multi-AZ failover happened | Hardware or AZ failure | Check RDS events; review failover logs |\n| Connection count maxed out | Application connection leak | Implement connection pooling (PgBouncer\u002FRDS Proxy) |\n| Master password unknown | Using managed secret | Retrieve from Secrets Manager ARN in instance details |\n\n## Related Skills\n\n- terraform-aws (`terraform-aws`) - IaC deployment for RDS\n- aws-vpc (`aws-vpc`) - Subnet groups and security groups\n- aws-iam (`aws-iam`) - RDS IAM authentication\n- aws-cost-optimization (`aws-cost-optimization`) - Reserved instances for RDS\n- aws-s3 (`aws-s3`) - Export snapshots to S3\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# AWS RDS\n\nDeploy and manage Amazon RDS relational databases with production-grade backups, replication, monitoring, and security.\n\n## When to Use This Skill\n\n- Provisioning a managed PostgreSQL, MySQL, MariaDB, Oracle, or SQL Server database\n- Setting up Multi-AZ deployments for high availability\n- Creating read replicas for horizontal read scaling\n- Configuring automated backups, snapshots, and point-in-time recovery\n- Tuning database parameters for performance\n- Migrating from self-managed databases to RDS\n- Monitoring database performance and setting up alarms\n\n## Prerequisites\n\n- AWS CLI v2 installed and configured\n- IAM permissions: `rds:*`, `ec2:DescribeSecurityGroups`, `ec2:DescribeSubnets`, `kms:*`, `cloudwatch:*`\n- A VPC with at least two subnets in different AZs (for subnet group)\n- Security group allowing database port access from application subnets only\n\n## Create a DB Subnet Group\n\n```bash\n# Create a subnet group spanning two AZs\naws rds create-db-subnet-group \\\n  --db-subnet-group-name production-db-subnets \\\n  --db-subnet-group-description \"Production database subnets\" \\\n  --subnet-ids subnet-private-a subnet-private-b\n\n# List subnet groups\naws rds describe-db-subnet-groups \\\n  --query \"DBSubnetGroups[].{Name:DBSubnetGroupName,VPC:VpcId,Status:SubnetGroupStatus}\" \\\n  --output table\n```\n\n## Create a Production Database\n\n```bash\n# Create a PostgreSQL 16 Multi-AZ instance\naws rds create-db-instance \\\n  --db-instance-identifier production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --engine postgres \\\n  --engine-version 16.4 \\\n  --master-username appadmin \\\n  --manage-master-user-password \\\n  --allocated-storage 100 \\\n  --max-allocated-storage 500 \\\n  --storage-type gp3 \\\n  --storage-encrypted \\\n  --kms-key-id alias\u002Frds-key \\\n  --vpc-security-group-ids sg-db-access \\\n  --db-subnet-group-name production-db-subnets \\\n  --db-name appdb \\\n  --backup-retention-period 14 \\\n  --preferred-backup-window \"03:00-04:00\" \\\n  --preferred-maintenance-window \"sun:05:00-sun:06:00\" \\\n  --multi-az \\\n  --auto-minor-version-upgrade \\\n  --deletion-protection \\\n  --copy-tags-to-snapshot \\\n  --monitoring-interval 60 \\\n  --monitoring-role-arn arn:aws:iam::123456789012:role\u002Frds-monitoring-role \\\n  --enable-performance-insights \\\n  --performance-insights-retention-period 7 \\\n  --enable-cloudwatch-logs-exports '[\"postgresql\",\"upgrade\"]' \\\n  --tags '[\n    {\"Key\":\"Environment\",\"Value\":\"production\"},\n    {\"Key\":\"Team\",\"Value\":\"backend\"},\n    {\"Key\":\"Backup\",\"Value\":\"daily\"}\n  ]'\n\n# Wait for instance to become available\naws rds wait db-instance-available --db-instance-identifier production-api-db\n\n# Get connection endpoint\naws rds describe-db-instances \\\n  --db-instance-identifier production-api-db \\\n  --query \"DBInstances[0].Endpoint.{Address:Address,Port:Port}\" \\\n  --output table\n```\n\n## Retrieve Master Password from Secrets Manager\n\n```bash\n# When using --manage-master-user-password, RDS stores the password in Secrets Manager\naws rds describe-db-instances \\\n  --db-instance-identifier production-api-db \\\n  --query \"DBInstances[0].MasterUserSecret.SecretArn\" \\\n  --output text\n\n# Retrieve the secret value\naws secretsmanager get-secret-value \\\n  --secret-id arn:aws:secretsmanager:us-east-1:123456789012:secret:rds-db-secret-abc123 \\\n  --query SecretString --output text\n```\n\n## Parameter Groups\n\n```bash\n# Create a custom parameter group\naws rds create-db-parameter-group \\\n  --db-parameter-group-name production-pg16 \\\n  --db-parameter-group-family postgres16 \\\n  --description \"Production PostgreSQL 16 parameters\"\n\n# Set performance parameters\naws rds modify-db-parameter-group \\\n  --db-parameter-group-name production-pg16 \\\n  --parameters \\\n    \"ParameterName=max_connections,ParameterValue=200,ApplyMethod=pending-reboot\" \\\n    \"ParameterName=shared_buffers,ParameterValue={DBInstanceClassMemory\u002F4},ApplyMethod=pending-reboot\" \\\n    \"ParameterName=effective_cache_size,ParameterValue={DBInstanceClassMemory*3\u002F4},ApplyMethod=pending-reboot\" \\\n    \"ParameterName=work_mem,ParameterValue=65536,ApplyMethod=immediate\" \\\n    \"ParameterName=maintenance_work_mem,ParameterValue=524288,ApplyMethod=immediate\" \\\n    \"ParameterName=random_page_cost,ParameterValue=1.1,ApplyMethod=immediate\" \\\n    \"ParameterName=log_min_duration_statement,ParameterValue=1000,ApplyMethod=immediate\" \\\n    \"ParameterName=log_statement,ParameterValue=ddl,ApplyMethod=immediate\" \\\n    \"ParameterName=idle_in_transaction_session_timeout,ParameterValue=60000,ApplyMethod=immediate\"\n\n# Apply parameter group to the instance\naws rds modify-db-instance \\\n  --db-instance-identifier production-api-db \\\n  --db-parameter-group-name production-pg16 \\\n  --apply-immediately\n```\n\n## Read Replicas\n\n```bash\n# Create a read replica in the same region\naws rds create-db-instance-read-replica \\\n  --db-instance-identifier production-api-db-read1 \\\n  --source-db-instance-identifier production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --availability-zone us-east-1b \\\n  --enable-performance-insights \\\n  --monitoring-interval 60 \\\n  --monitoring-role-arn arn:aws:iam::123456789012:role\u002Frds-monitoring-role\n\n# Create a cross-region read replica for DR\naws rds create-db-instance-read-replica \\\n  --db-instance-identifier dr-api-db-read \\\n  --source-db-instance-identifier arn:aws:rds:us-east-1:123456789012:db:production-api-db \\\n  --db-instance-class db.r6g.large \\\n  --region us-west-2 \\\n  --storage-encrypted \\\n  --kms-key-id alias\u002Frds-dr-key\n\n# Promote a read replica to standalone (for DR failover)\naws rds promote-read-replica \\\n  --db-instance-identifier dr-api-db-read\n\n# Check replication lag\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name ReplicaLag \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db-read1 \\\n  --start-time \"$(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --end-time \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --period 300 \\\n  --statistics Average \\\n  --output table\n```\n\n## Snapshots and Point-in-Time Recovery\n\n```bash\n# Create a manual snapshot\naws rds create-db-snapshot \\\n  --db-instance-identifier production-api-db \\\n  --db-snapshot-identifier production-api-db-pre-migration-$(date +%Y%m%d)\n\n# Wait for snapshot to complete\naws rds wait db-snapshot-available \\\n  --db-snapshot-identifier production-api-db-pre-migration-20260324\n\n# Restore from snapshot (creates a new instance)\naws rds restore-db-instance-from-db-snapshot \\\n  --db-instance-identifier production-api-db-restored \\\n  --db-snapshot-identifier production-api-db-pre-migration-20260324 \\\n  --db-instance-class db.r6g.large \\\n  --db-subnet-group-name production-db-subnets \\\n  --vpc-security-group-ids sg-db-access\n\n# Point-in-time recovery (restore to a specific second)\naws rds restore-db-instance-to-point-in-time \\\n  --source-db-instance-identifier production-api-db \\\n  --target-db-instance-identifier production-api-db-pitr \\\n  --restore-time \"2026-03-24T10:30:00Z\" \\\n  --db-instance-class db.r6g.large \\\n  --db-subnet-group-name production-db-subnets\n\n# Copy snapshot to another region\naws rds copy-db-snapshot \\\n  --source-db-snapshot-identifier arn:aws:rds:us-east-1:123456789012:snapshot:production-api-db-pre-migration-20260324 \\\n  --target-db-snapshot-identifier production-api-db-dr-copy \\\n  --region us-west-2 \\\n  --kms-key-id alias\u002Frds-dr-key\n\n# Delete old snapshots\naws rds delete-db-snapshot --db-snapshot-identifier old-snapshot-name\n```\n\n## Monitoring and Alarms\n\n```bash\n# Set CPU utilization alarm\naws cloudwatch put-metric-alarm \\\n  --alarm-name rds-production-cpu-high \\\n  --alarm-description \"RDS CPU > 80% for 5 minutes\" \\\n  --metric-name CPUUtilization \\\n  --namespace AWS\u002FRDS \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --statistic Average \\\n  --period 300 \\\n  --threshold 80 \\\n  --comparison-operator GreaterThanThreshold \\\n  --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:123456789012:db-alerts\n\n# Set free storage space alarm (alert below 10 GB)\naws cloudwatch put-metric-alarm \\\n  --alarm-name rds-production-storage-low \\\n  --alarm-description \"RDS free storage \u003C 10GB\" \\\n  --metric-name FreeStorageSpace \\\n  --namespace AWS\u002FRDS \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --statistic Average \\\n  --period 300 \\\n  --threshold 10737418240 \\\n  --comparison-operator LessThanThreshold \\\n  --evaluation-periods 1 \\\n  --alarm-actions arn:aws:sns:us-east-1:123456789012:db-alerts\n\n# Check current database connections\naws cloudwatch get-metric-statistics \\\n  --namespace AWS\u002FRDS \\\n  --metric-name DatabaseConnections \\\n  --dimensions Name=DBInstanceIdentifier,Value=production-api-db \\\n  --start-time \"$(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --end-time \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" \\\n  --period 300 \\\n  --statistics Average Maximum \\\n  --output table\n```\n\n## Terraform RDS Example\n\n```hcl\nresource \"aws_db_subnet_group\" \"main\" {\n  name       = \"production-db-subnets\"\n  subnet_ids = [aws_subnet.private_a.id, aws_subnet.private_b.id]\n\n  tags = {\n    Environment = \"production\"\n  }\n}\n\nresource \"aws_db_parameter_group\" \"postgres16\" {\n  name   = \"production-pg16\"\n  family = \"postgres16\"\n\n  parameter {\n    name  = \"max_connections\"\n    value = \"200\"\n  }\n\n  parameter {\n    name         = \"shared_buffers\"\n    value        = \"{DBInstanceClassMemory\u002F4}\"\n    apply_method = \"pending-reboot\"\n  }\n\n  parameter {\n    name  = \"log_min_duration_statement\"\n    value = \"1000\"\n  }\n}\n\nresource \"aws_db_instance\" \"main\" {\n  identifier     = \"production-api-db\"\n  engine         = \"postgres\"\n  engine_version = \"16.4\"\n  instance_class = \"db.r6g.large\"\n\n  allocated_storage     = 100\n  max_allocated_storage = 500\n  storage_type          = \"gp3\"\n  storage_encrypted     = true\n  kms_key_id            = aws_kms_key.rds.arn\n\n  db_name  = \"appdb\"\n  username = \"appadmin\"\n  manage_master_user_password = true\n\n  multi_az               = true\n  db_subnet_group_name   = aws_db_subnet_group.main.name\n  vpc_security_group_ids = [aws_security_group.db.id]\n  parameter_group_name   = aws_db_parameter_group.postgres16.name\n\n  backup_retention_period   = 14\n  backup_window             = \"03:00-04:00\"\n  maintenance_window        = \"sun:05:00-sun:06:00\"\n  copy_tags_to_snapshot     = true\n  deletion_protection       = true\n  skip_final_snapshot       = false\n  final_snapshot_identifier = \"production-api-db-final\"\n\n  performance_insights_enabled          = true\n  performance_insights_retention_period = 7\n  monitoring_interval                   = 60\n  monitoring_role_arn                   = aws_iam_role.rds_monitoring.arn\n\n  enabled_cloudwatch_logs_exports = [\"postgresql\", \"upgrade\"]\n\n  tags = {\n    Environment = \"production\"\n    Team        = \"backend\"\n  }\n}\n\nresource \"aws_db_instance\" \"read_replica\" {\n  identifier          = \"production-api-db-read1\"\n  replicate_source_db = aws_db_instance.main.identifier\n  instance_class      = \"db.r6g.large\"\n\n  performance_insights_enabled = true\n  monitoring_interval          = 60\n  monitoring_role_arn          = aws_iam_role.rds_monitoring.arn\n}\n```\n\n## Troubleshooting\n\n| Problem | Cause | Fix |\n|---|---|---|\n| Cannot connect to RDS | Security group blocks traffic | Verify SG allows app subnet CIDR on DB port |\n| Storage full | Auto-scaling not enabled or limit reached | Set `--max-allocated-storage`; increase manually |\n| High replication lag | Write-heavy workload or replica undersized | Upgrade replica instance class; reduce write volume |\n| Parameter change not applied | Requires reboot for static params | Reboot with `--force-failover` during maintenance window |\n| Snapshot restore slow | Large database size | Use larger instance class for restore; consider PITR |\n| Performance Insights empty | Not enabled or instance type unsupported | Enable PI; check instance class supports it |\n| Multi-AZ failover happened | Hardware or AZ failure | Check RDS events; review failover logs |\n| Connection count maxed out | Application connection leak | Implement connection pooling (PgBouncer\u002FRDS Proxy) |\n| Master password unknown | Using managed secret | Retrieve from Secrets Manager ARN in instance details |\n\n## Related Skills\n\n- terraform-aws (`terraform-aws`) - IaC deployment for RDS\n- aws-vpc (`aws-vpc`) - Subnet groups and security groups\n- aws-iam (`aws-iam`) - RDS IAM authentication\n- aws-cost-optimization (`aws-cost-optimization`) - Reserved instances for RDS\n- aws-s3 (`aws-s3`) - Export snapshots to S3\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":26,"source":43,"license":14,"category":44,"metadata":45,"date_added":48,"description":7,"source_repo":49,"source_type":30,"compatibility":50,"license_source":51},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":46,"version":47},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Faws-rds","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill aws-rds",{"tool":63,"command":64},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill aws-rds",{"tool":66,"command":67},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill aws-rds","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Faws-rds\u002FSKILL.md",true,[],[72,89,113,137,154,174],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[],[79,80,81,82,83,84,74,85,36,35,34,33,30,21,86,26,87,25,23,88],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","active","scope","implementing",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[96,97,98,99,100,101,102,103,104,105,106,107,108,33,109,30,110,111,26,112],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[120,121,122,123,124,125,126,37,127,128,129,130,131,30,21,132,133,134,135,136],"transcript","youtube transcript","youtube","safe","github","codex","research","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[],[120,121,122,144,123,145,124,125,37,146,147,148,149,129,150,30,21,151,152,153],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[],[122,161,162,100,123,163,164,165,166,37,148,167,168,169,170,21,171,132,172,173],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[],[181,122,182,183,123,145,146,184,185,147,148,149,129,186,150,30,21,151,187,135],"youtube full","full","google","server","dlp","credits","automatic"]