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개 답변
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
답변함 일 년 전
profile picture
전문가
검토됨 5일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인