AWS Exposed Database Integration
Latest stable Based on AWS release 0.4.0
Library manual grounded in the 0.4.0 release source.
Problem
Section titled “Problem”Resolves AWS-backed database settings, creates Hikari data sources and Exposed databases, and manages default or named database handles.
When to use it
Section titled “When to use it”Use it when JDBC connection settings or credentials come from Secrets Manager, Parameter Store, or RDS IAM authentication.
Coordinates
Section titled “Coordinates”Applications select one central BOM version.
dependencies { implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>")) implementation("io.github.bluetape4k.aws:bluetape4k-aws-exposed")}AWS service SDKs follow a compileOnly policy; add the services actually used as runtime dependencies.
Core concepts
Section titled “Core concepts”A config source identifies where settings live; a resolver returns concrete properties; the data-source factory creates Hikari; the database factory connects Exposed and returns a closeable handle.
Quick start
Section titled “Quick start”val factory = AwsExposedDatabaseFactory(resolver, dataSourceFactory)val handle = factory.create("orders", properties)try { transaction(handle.database) { Orders.selectAll().count() }} finally { handle.close()}API by task
Section titled “API by task”AwsDatabaseProperties, AwsDatabaseSettingsResolver, AwsJdbcDataSourceFactory, AwsExposedDatabaseFactory, AwsExposedDatabaseRegistry, and RDS IAM authentication support.
Recommended patterns
Section titled “Recommended patterns”Put client and background-job ownership at one application boundary. Configure region, credentials, and endpoints once instead of rebuilding them per call.
Integrations
Section titled “Integrations”Spring Boot auto-configuration and Ktor’s Exposed plugin consume this foundation. Add the required Secrets Manager, SSM, RDS, JDBC driver, Hikari, and Exposed runtime modules.
Configuration
Section titled “Configuration”Keep secrets out of static configuration. Configure source, region, secret/parameter identifier, JDBC driver and URL shape, pool size, and IAM token refresh behavior.
Failure modes
Section titled “Failure modes”Malformed secret payloads, missing driver jars, expired IAM tokens, wrong region, and pool ownership mistakes surface during resolution or first connection.
Operations
Section titled “Operations”Resolve settings before serving traffic, bound pool size, rotate credentials outside transactions, and close every handle during application shutdown.
Testing
Section titled “Testing”Use fake resolvers for unit tests and an emulator or disposable database for resolution-plus-connection tests. Assert that close releases Hikari resources.
Workshops and learning path
Section titled “Workshops and learning path”Follow database-settings, rds-iam-and-hikari, and transaction-boundaries, then run the Spring Boot and Ktor Exposed examples.
Limitations
Section titled “Limitations”This module resolves and owns infrastructure; it does not design Exposed tables or move blocking JDBC work off coroutine threads automatically.
Release diagrams
Section titled “Release diagrams”These diagrams are loaded directly from README assets published with the 0.4.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.
AWS Exposed architecture diagram
Section titled “AWS Exposed architecture diagram”Release README: aws-exposed/README.md
AWS Exposed configuration flow diagram
Section titled “AWS Exposed configuration flow diagram”Release README: aws-exposed/README.md
AWS Exposed database handle sequence diagram
Section titled “AWS Exposed database handle sequence diagram”Release README: aws-exposed/README.md


