The project I am working on uses RDS with aws_s3 (& aws_commons)
postgres extensions. However these extensions are also need postgres
docker container used in the CI for integration tests to not break
the migrations. A mock extension was built to keep the tests from
breaking.
Create .control files
Create the schema for the module being created
Add the functions in the schema in sql files
In this case there are two .control files, aws_common.control & aws_s3.control
We then define the functions that these modules export in a file name
of the form <module_name>-<default_version>.sql.
These are now installable and can be installed by copying them to the right path
And extensions.sql would install it when the containers boots up
There are others functions that could be mocked, this was all needed for me.