AWS - Aurora PostgreSQL
Aurora PostgreSQL agent setup
For an overview of how the DBtune agent works, see agent Overview.
Prerequisites
Before starting the DBtune agent, ensure you have completed the database setup steps.
AWS IAM permissions
The AWS credentials provided to the agent need at least the following permissions:
rds:DescribeDBInstances
rds:ModifyDBParameterGroup
cloudwatch:GetMetricStatistics
ec2:DescribeInstanceTypes
pi:GetResourceMetrics (if Performance Insights is enabled)
rds:RebootDBInstance (if you want to perform tuning with restart)
Setting up the agent
Run the DBtune agent using Docker with Aurora-specific configuration:
docker run --restart always --detach \
-e DBT_POSTGRESQL_CONNECTION_URL="postgresql://..." \
-e DBT_RDS_DATABASE_IDENTIFIER={rds_database_identifier} \
-e DBT_RDS_PARAMETER_GROUP_NAME={parameter_group_name} \
-e DBT_AWS_REGION={aws_region} \
-e DBT_AWS_ACCESS_KEY_ID={aws_access_key_id} \
-e DBT_AWS_SECRET_ACCESS_KEY={aws_secret_access_key} \
-e DBT_DBTUNE_SERVER_URL=https://app.dbtune.com \
-e DBT_DBTUNE_API_KEY=your-dbtune-api-key \
-e DBT_DBTUNE_DATABASE_ID=your-dbtune-database-id \
public.ecr.aws/dbtune/dbtune/agent:latest --aurora
AWS credentials (DBT_AWS_ACCESS_KEY_ID
and DBT_AWS_SECRET_ACCESS_KEY
) are optional. If not provided, the agent will use the default AWS credential chain, which includes WebIdentity tokens.
For information about common environment variables (DBT_DBTUNE_* and DBT_POSTGRESQL_*), see agent overview - common environment variables.
AWS Aurora-specific environment variables
Variable | Description |
---|---|
DBT_RDS_DATABASE_IDENTIFIER | Identifier of the Aurora RDS instance you want to optimize. |
DBT_RDS_PARAMETER_GROUP_NAME | Name of the parameter group for the Aurora instance. |
DBT_AWS_ACCESS_KEY_ID | (Optional) AWS access key ID that DBtune will use to authenticate with AWS services. |
DBT_AWS_SECRET_ACCESS_KEY | (Optional) AWS secret access key that DBtune will use to authenticate with AWS services. |
DBT_AWS_REGION | AWS region where your database is located. |
Parameters tuned
DBtune supports multiple tuning modes that determine which parameters can be optimized. For a detailed explanation of tuning modes, see tuning modes.
Reload-only tuning mode
The following parameters are tuned in reload-only mode:
work_mem
random_page_cost
seq_page_cost
max_parallel_workers
max_parallel_workers_per_gather
Restart tuning mode
The following parameter is tuned in restart mode, in addition to all reload-only parameters:
shared_buffers