These examples demonstrate how to perform AWS service operations using the beta version of the AWS SDK for Kotlin.
You must have an AWS account, and have configured your default credentials and AWS Region as described in AWS SDK for Kotlin Developer Guide.
To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, see Get started with the AWS SDK for Kotlin.
See the individual readme files in each service directory for information about specific code examples for that service.
You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed.
Test 3 passed
Before running the JUnit tests, you must define values in the config.properties file located in the resources folder. This file contains values that are required to run the JUnit tests. If you do not define all values, the JUnit tests fail.
In the usecases folder, find step-by-step development tutorials that use multiple AWS services and the AWS SDK for Kotlin. By following these tutorials, you will gain a deeper understanding of how to create applications that use the AWS SDK for Kotlin. These tutorials include:
-
Create a React and Spring REST application that handles Amazon SQS messages - Discusses how to develop a Spring REST API that sends and retrieves messages by using the AWS SDK for Kotlin and Amazon Simple Queue Service (Amazon SQS). This application also detects the language code of the posted message by using Amazon Comprehend. The Spring REST API is used by a React application that displays the data.
-
Create a React and Spring REST application that queries Amazon DynamoDB data - Discusses how to develop a Spring REST API that queries Amazon DynamoDB data. The Spring REST API uses the AWS SDK for Kotlin to invoke AWS services and is used by a React application that displays the data.
-
Create a React and Spring REST application that queries Amazon Redshift data - Discusses how to develop a Spring REST API that queries Amazon Redshift data. The Spring REST API uses the AWS SDK for Kotlin to invoke AWS services and is used by a React application that displays the data.
-
Create a React and Spring REST application that queries Amazon Aurora data - Discusses how to develop a Spring REST API that queries Amazon Aurora data. The Spring REST API uses the AWS SDK for Kotlin to invoke AWS services and is used by a React application that displays the data.
-
Create an example photo analyzer application using the AWS SDK for Kotlin - Discusses using the AWS SDK for Kotlin and various AWS services, such as the Amazon Rekognition service, to analyze images. This application analyzes many images and generates a report that breaks down each image into a series of labels.
-
Create AWS serverless workflows using the AWS SDK for Kotlin - Discusses using the AWS SDK for Kotlin and AWS Step Functions to create a workflow that invokes AWS services. Each workflow step is implemented by using an AWS Lambda function.
-
Create a Spring Boot Application that has publish-subscribe functionality - Discusses how to create a web application that has subscription and publish functionality. In this tutorial, the Spring Framework along with AWS SDK for Kotlin is used to create the application.
-
Create a publish-subscribe Android application that translates messages using the AWS SDK for Kotlin - Discusses how to create an Android application that has subscription and publish functionality.
- We recommend that you grant this code least privilege, or at most the minimum permissions required to perform the task. For more information, see Grant Least Privilege in the AWS Identity and Access Management User Guide.
- This code has not been tested in all AWS Regions. Some AWS services are available only in specific Regions.
- Running this code might result in charges to your AWS account.
This example code will soon be available in a container image hosted on Amazon Elastic Container Registry (ECR). This image will be pre-loaded with all Kotlin examples with dependencies pre-resolved, allowing you to explore these examples in an isolated environment.
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0