Aws DB SQL
Aws DB SQL
PostgreSQL
EC2 DB Services
On-Premises Hosted Managed
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Running PostgreSQL on EC2
Full control over parameters of server, OS, and database
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Relational Database Service
Multi-engine support: Amazon Aurora, MySQL,
MariaDB, PostgreSQL, Oracle, SQL Server
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security and Compliance
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Security Groups
Database IP firewall protection
Corporate address admins
Application tier
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Virtual Private Cloud (Amazon VPC)
10.1.0.0/16
Private Network
10.1.1.0/24
Security Group for fine grained
control
Availability Zone
AWS Region
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
At Rest Encryption
Leveraging AWS Key Management Service (KMS) Customer master
key(s)
Benefits:
• Ability to share encrypted snapshots across
accounts
• Limited risks of a compromised key
Amazon Amazon Amazon
RDS RDS RDS
instance 1 instance 2 instance 3
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Forcing SSL on all connections
Applicatio Snapshot
n DB
Host SSL Instance
ssl_mode=disable
Security Group
RDS
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Users Access
Connects to the database instance using
PostgreSQL Clients
Controlled with database
Examples: grants
Your database
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Identity and Access Management (IAM)
authentication
PostgreSQL authentication is managed
externally using IAM
• Available for Amazon RDS PostgreSQL and
Aurora PostgreSQL
Authentication tokens are used to validate
the user
• Tokens have a lifetime of 15 minutes
• Generated using AWS Signature Version 4
New role rds_iam available when IAM
integration is enabled
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Restrict Password changes on PostgreSQL
instances Simplifies integration of home grown or
3rd party password management tools
New database parameter to restrict
password changes
• rds.restrict_password_commands =
on/off
Flexibility to assign a role to allow
certain users to
• GRANT rds_password TO tom;
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Compliance
27001/9001
Details: https://aws.amazon.com/compliance/services-in-scope/ 27017/27018
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Parameter Groups
Create a standard group based on your
needs (IAM protected)
rds.force_ssl=true
shared_preload_libraries=pgaudit,
auto_explain,pg_stat_statements,pg_re
pack
pgaudit.role = rds_pgaudit
huge_pages = on
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database server instance types
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
High performance database storage
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Availability – Read and Write – Multi-AZ
cname update
DNS
Primary Update
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Read Replicas
• Relieve pressure on your master node
with additional read capacity
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Read Replicas = Availability
Sync
Replication
Multi-AZ
Async Replication
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cross Region Replicas – Reduce Latency
Async Replication
AZ1 AZ2 AZ1
US-EAST-1 EU-WEST-1
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cross Region Replicas – DR & Moves
Async Replication
AZ1 AZ1 AZ2
AZ2
US-EAST-1 EU-WEST-1 EU-WEST-1
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Minor version upgrade
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Major version upgrade
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Upgrade with minimum downtime using DMS
RDS PostgreSQL 9.5 RDS PostgreSQL 10
AWS Database
Migration Service
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS for PostgreSQL
9.3 Original - 32
9.3 Current - 35
9.4 Current - 39
9.5 Current - 46
9.6 Current - 58
10 Current - 60
Future - ???
Email: [email protected]
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
New PostgreSQL Extensions Supported
Extensions Description
• Statement based
Logical - SQL • Trigger Based
• Standard PostgreSQL
• Extension “pglogical”
Logical - Engine • AWS DMS
• Third-party
• Read replicas
Physical - Engine • Multi-AZ
Monitoring Amazon RDS
Performance
Insights
Enhanced
Monitoring
Enhanced Monitoring for Amazon RDS
Access to over 50 CPU, memory, file
system, and disk I/O metrics
Access to top processes
As low as 1 second intervals
Monitoring Amazon RDS
Amazon
CloudWatch Amazon CloudWatch metrics
Displayed in the Amazon RDS Console or
personalized CloudWatch dashboards
As low as one minute intervals
Amazon CloudWatch alarms
Trigger actions based on a metric value
relative to a threshold you set
Upload PostgreSQL Logs to Amazon Cloudwatch
Amazon
CloudWatch Amazon CloudWatch
Upload PostgreSQL logs to CloudWatch
Export logs to S3 from CloudWatch
AWS Forums
EC2
• https://forums.aws.amazon.com/forum.jspa?forumID=30
Amazon RDS
• https://forums.aws.amazon.com/forum.jspa?forumID=60
© 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
aws.amazon.com/rds/postgresql