AWS DB Parameters
Database or DB parameters specify how your database is configured. For example, database parameters can specify the amount of resources, such as memory, to allocate to a database.
You manage your database configuration by associating your DB instances and Multi-AZ DB clusters with parameter groups. Amazon RDS defines parameter groups with default settings.
A DB Parameter Group is a collection of engine configuration values that you set for your RDS database instance.
It contains the definition of what you want each of these over 400 parameters to be set to.
By default, RDS uses a default parameter group specified by AWS. It is not actually necessary to use a different parameter group.
Each default parameter group is unique to the database engine you select, the EC2 compute class, and the storage allocated to the instance.
You cannot change a default parameter group, so if you want to make modifications then you will have to create your own parameter group.
RDS database engine configuration is managed through the use of parameters in a DB parameter group.
DB parameter groups serve as an effective container for holding engine configuration values that are applied to your DB instances.
A default DB parameter group is created if you make a database instance without specifying a custom DB parameter group. This default group contains database engine defaults and Amazon RDS system defaults based on the engine, compute class, and allocated storage of the instance.
When you create a new RDS database, you should ensure you have a new custom DB parameter group to use with it. If not then you might have to perform an RDS instance restart later on to replace the default DB parameter group, even though the database parameter you want to alter is dynamic and modifiable.
This is the best approach that gives you flexibility further down the road to change your configuration later on.
Creating your own parameter group can be done via the console or the CLI. Self-created parameter groups take as their basis the default parameter group for that particular instance and selected db engine.
After creation, you can then modify the parameters via the console or CLI to suit your needs as you change.
Parameters can either be static or dynamic.
Static means that changes won’t take effect without an instance restart.
Dynamic means a parameter change can take effect without an instance restart.
Dynamic parameters are either session scope or global scope.
Global scope dynamic parameters mean that changes will impact the entire server and all sessions.
Session scope dynamic parameters however are only effective for the session where they were set.
Note however that some parameter variables can have both global and session scope.
In these cases, the global value is used as the default for the session scope and any global change to a parameter that also has a session scope will only affect new sessions.
Another important aspect to bear in mind when creating a DB parameter group:
You should wait at least 5 minutes before creating your first DB instance that uses that DB parameter group as the default parameter group. This allows Amazon RDS to fully complete the create action before the parameter group is used as the default for a new DB instance.
Important to know this DB Parameter above all for the exam:
for PostgreSQL and SQLServer:
this forces ssl connections to be used
BUT – for MySQL /MariaDB you must instead use a grant select command:
GRANT SELECT ON mydatabase.* TO ‘myuser’@%’IDENTIFED BY ‘…’ REQUIRE SSL;