pip install django-iam-dbauth
In your settings use the following
DATABASES = {
"default": {
"HOST": "<hostname>",
"USER": "<user>",
"ENGINE": 'django_iam_dbauth.aws.postgresql'
"OPTIONS": {
"use_iam_auth": True
}
}
}