How can I set a custom setting on a Postgres database?

0

Setting a custom value works fine in Aurora. For example:

SET jwt.claims.email = 'user.email@example.com';
SET my.custom.setting = 'yes';

In vanilla Postgres, one can also associate custom settings with a database object:

ALTER DATABASE mydb SET my.custom.setting = 'yes';

But in Aurora, I get the response:

ERROR: permission denied to set parameter "my.custom.setting"; SQLState: 42501

even though the current user is the database owner. Why does this disparity between standard Postgres and Aurora (and presumably RDS) exist? This breaks compatibility with a current setup that we're trying to migrate to AWS.

1 Answer
0

Amazon Aurora and Amazon RDS for PostgreSQL are managed database services. Both offer very high level of combability with existing open source offering. Some administration level actions are restricted to allow AWS to manage the database infrastcture. Setting parameters can be done using parameter groups as explained here: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.ParameterGroups.html. You can see the list of supported parameters in the console or using CLI

In general if you are looking to migrate, you should approach your AWS account team. They will be able to provide you more in-depth guidance and assistance.

profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions