Ktor Service Coverage Examples
Latest stable Based on AWS release 1.0.0
A runnable 1.0.0 example for the remaining AWS service plugins.
Learning goal
Section titled “Learning goal”Exercise SES/v2, SNS, CloudWatch, CloudWatch Logs, Kinesis, and STS through one small Ktor application surface.
When to use this example
Section titled “When to use this example”Use it when validating plugin installation and request/response mapping without depending on uneven emulator coverage.
Project coordinates
Section titled “Project coordinates”This example is not published. Run ./gradlew :aws-ktor-service-coverage-examples:test from the release source.
Concepts to learn
Section titled “Concepts to learn”Each plugin receives an application-owned operation facade. Routes call the same application accessors used by production integrations.
Staged walkthrough
Section titled “Staged walkthrough”- Provide the six operation facades.
- Install
serviceCoverageExampleModule. - Call the
/coverage/*routes. - Verify the mapped AWS requests and JSON responses.
Entry points and expected behavior
Section titled “Entry points and expected behavior”ServiceCoverageExampleRoutes.kt exposes email, notification, metric, log, stream-record, and caller-identity routes.
Recommended exercise order
Section titled “Recommended exercise order”Start with STS, then add one write-oriented service at a time so configuration and mapping failures remain isolated.
Integration boundary
Section titled “Integration boundary”The host application owns AWS clients, endpoints, credentials, and operation facades. Ktor owns only plugin installation and routing.
Configuration checkpoints
Section titled “Configuration checkpoints”Set the CloudWatch namespace, log group and stream, Kinesis stream name, and SNS topic ARN through ServiceCoverageExampleOptions.
Failure modes
Section titled “Failure modes”Blank request fields fail validation. Missing resources, credentials, endpoint support, or IAM permissions surface through the injected operations.
Operations
Section titled “Operations”Use the repository’s Floci-first policy where the API is supported, LocalStack for explicit gaps, or real AWS endpoints owned by the application.
Testing the boundary
Section titled “Testing the boundary”ServiceCoverageExampleRoutesTest uses MockK facades to verify plugin accessors, JSON mapping, AWS request mapping, and response mapping deterministically.
Next learning path
Section titled “Next learning path”Continue with the dedicated S3, SQS, DynamoDB, and Exposed examples for deeper lifecycle and persistence scenarios.
Limitations
Section titled “Limitations”The example does not prove emulator parity, live AWS permissions, retry policy, production observability, or resource provisioning.