Documentation
¶
Overview ¶
Package stdpgxiamfx provides RDS IAM authentication for stdpgxfx connection pools.
It provides a stdpgxfx.IamTokenFunc that builds a fresh RDS IAM auth token for every new connection. It requires an aws.Config in the fx graph (e.g., from stdawsfx.Provide()) and only takes effect when STDPGX_IAM_AUTH is enabled.
The signing region is derived per-connection from the RDS hostname (e.g., "mycluster.cluster-xxx.eu-central-1.rds.amazonaws.com" → "eu-central-1"). This means a derived pool that points at a different regional endpoint (e.g., a reader endpoint in another region, possibly set through STDPGX_HOSTS) signs tokens against that region automatically. The hostname must match the standard regional RDS pattern; non-RDS hostnames (e.g., custom domains, RDS Proxy aliases, the global writer endpoint) are not supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveSigningRegion ¶
DeriveSigningRegion attempts to extract the AWS region from the given host using the standard RDS regional hostname format. Returns an empty string if the host doesn't match the regional pattern.
Types ¶
This section is empty.