Manage access to an RDS PostgreSQL instance by temporarily assigning roles to existing database users.
Our step-by-step PostgreSQL on AWS tutorial walks you through setup for this example.
Enable the postgres_db
module to provision an RDS PostgreSQL database in a VPC that you can use to test the integration.
You can enable the module by setting the db_enabled
variable to true.
Refer to the README
for instructions on tunneling to the example database.
You can iterate on your handler function locally by setting up a docker compose based PostgreSQL database and then invoking your handler function directly.
- Start the local database with
docker compose up
. - Copy
env.example
to.env
and thensource
it into your shell - Create a test user, database and role with
init-users.sh
. - Run
pip install -r requirements.txt
- Run
cat test/escalate.json | python handler.py
to grant a user access to the readonly role. - Verify the user grants by running
\du
from thepsql
console.
This workflow is just one example of how Sym Implementers use the Sym SDK to create Sym Flows.