'How can I add "TrustServerCertificate=Yes"; or "Encrypt=False;" to a SQL Server RDS in AWS?

While trying to run my migrations in a Laravel App I have in an EC2 server, I run into this error message.

SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:unable to get local issuer certificate] (SQL: select * from sys.sysobjects where id = object_id(migrations) and xtype in ('U', 'V'))

I investigated this error and two solutions I found were adding TrustServerCertificate=Yes; or Encrypt=False; to the connection string, however since this is my first time setting up an RDS and EC2 instances I don't know where to find the settings to change this. Every solution I found is adding either of these two lines, but I failed to find how to do so in an RDS so far.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source