AWS Notes
4.74K subscribers
228 photos
30 videos
10 files
2.41K links
AWS Notes — Amazon Web Services Educational and Information Channel

Chat: https://t.me/aws_notes_chat

Contacts: @apple_rom, https://www.linkedin.com/in/roman-siewko/
Download Telegram
​​RDS Blue/Green Deployments:

https://aws.amazon.com/blogs/aws/new-fully-managed-blue-green-deployments-in-amazon-aurora-and-amazon-rds/

■ You can use Blue/Green Deployments to create a separate, synchronized, fully managed staging environment that mirrors the production environment. The staging environment clones your production environment’s primary database and in-Region read replicas. Blue/Green Deployments keep these two environments in sync using logical replication.
■ In as fast as a minute, you can promote the staging environment to be the new production environment with no data loss. During switchover, Blue/Green Deployments blocks writes on blue and green environments so that the green catches up with the blue, ensuring no data loss. Then, Blue/Green Deployments redirects production traffic to the newly promoted staging environment, all without any code changes to your application.
■ With Blue/Green Deployments, you can make changes, such as major and minor version upgrades, schema modifications, and operating system or maintenance updates, to the staging environment without impacting the production workload.

RDS Blue/Green Deployments is available on:
🔹 RDS/Aurora MySQL 5.6+
🔸 RDS/Aurora MariaDB 10.2+

#RDS #Aurora
Terraform + RDS & Secrets Manager:

В terraform-provider-aws v4.61 добавили поддержку секретов для пароля RDS:

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance

Свои секреты использовать нельзя, их создаст RDS при manage_master_user_password = true, параметр password при этом должен отсутствовать.

Для секретов RDS пароля можно указать свой KMS ключ.

resource "aws_db_instance" "postgres15" {
...
storage_encrypted = true
kms_key_id        = var.kms_key_id

manage_master_user_password = true
master_user_secret_kms_key_id = var.kms_key_id
}

Получить созданный RDS секрет с паролем:

data "aws_secretsmanager_secrets" "postgres15" {
  filter {
    name   = "owning-service"
    values = ["rds"]
  }
  filter {
    name   = "tag-value"
    values = [aws_db_instance.postgres15.arn]
  }
}

data "aws_secretsmanager_secret" "postgres15" {
  arn = tolist(data.aws_secretsmanager_secrets.postgres15.arns)[0]
}

output "rds_master_password_secret" {
  description = "RDS master user secret details"
  value       = aws_db_instance.postgres15.master_user_secret
}

output "rds_master_password_secret_data" {
  description = "RDS master user secret data resource in Secrets Manager"
  value       = data.aws_secretsmanager_secret.postgres15
}

#RDS #Terraform
​​RDS + db.m7g & db.c7g:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#Concepts.DBInstanceClass.Support

db.m6g.large $0.159
db.m7g.large $0.168

db.r6g.large $0.225
db.r7g.large $0.239

#RDS
Active-active Replication for RDS PostgreSQL

https://aws.amazon.com/blogs/database/using-pgactive-active-active-replication-extension-for-postgresql-on-amazon-rds-for-postgresql/

▫️ Active-active Replication can be used to maintain availability throughout different database operations and reduce write latency for applications distributed in multiple AWS Regions.

▫️ PostgreSQL pgactive extension makes it possible to deploy RDS PostgreSQL instances using an active-active topology, and provides the foundational features for managing active-active replication such as conflict detection and resolution. 

#RDS #PostgreSQL
⚠️ Starting June 1, 2024, Amazon RDS began automatically upgrading instances:

db.m4 => db.m5
db.r4 => db.r5
db.t2 => db.t3

Amazon RDS ends support for db.m4/r4/t2December 31, 2024.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html

#RDS
​​🆕 RDS with DLV (Dedicated Log Volumes) for PostgreSQL, MySQL, and MariaDB:

https://aws.amazon.com/blogs/database/enhance-database-performance-with-amazon-rds-dedicated-log-volumes/

RDS with DLV use cases:

• Large allocated storage (over 5 TiB)
• High IOPS requirements
• Transaction-intensive workloads
• Latency-sensitive workloads
• Using io1 or io2 Provisioned IOPS storage

⚠️ Enabling DLV requires database downtime, but this can be reduced by enabling DLV on a new or existing read replica and then promoting it as the primary.

#RDS