Announcing new Amazon SDK for Kotlin alpha release

海外精选
海外精选的内容汇集了全球优质的亚马逊云科技相关技术内容。同时,内容中提到的“AWS” 是 “Amazon Web Services” 的缩写,在此网站不作为商标展示。
0
0
{"value":"We’re excited to announce the alpha release of the new [AWS SDK for Kotlin](https://github.com/awslabs/aws-sdk-kotlin)! Kotlin is one of the most-loved languages amongst developers and now the AWS SDK for Kotlin makes it easy to call AWS services using idiomatic Kotlin APIs. You can use the native Kotlin language constructs you are used to, have mobile support without compromises, and target multiple platforms and execution environments in a single language.\n\nWe designed the SDK from the ground up to give customers a familiar Kotlin experience, including concise yet expressive DSL builders and asynchronous AWS service calls via Kotlin coroutines. Today’s alpha release enables developers to make API calls to all the supported AWS services. Additionally, you may target the JVM platform or Android API Level 24+, with support for additional platforms like JavaScript and Native coming in future releases. To track the upcoming features in the future releases, please see our [public roadmap](https://github.com/awslabs/aws-sdk-kotlin/projects/2) on GitHub.\n\nToday’s alpha release marks an important point in our journey, but the SDK is still in the early stages of development. This is a great time to influence our roadmap by [sharing your thoughts](https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose) on the SDK design with us, as well as features and services that are the most important to you. Your feedback matters to us. See the section below on all the ways you can contribute.\n\n### **Getting Started with the AWS SDK for Kotlin**\n\nThis example shows how to perform a simple Amazon DynamoDB operation using the SDK for Kotlin. More [detailed examples](https://github.com/awslabs/aws-sdk-kotlin/tree/main/examples) are available in the the [GitHub repository](https://github.com/awslabs/aws-sdk-kotlin) as well as the developer guide.\n\n1. Create a new Kotlin (JVM) project using your favorite IDE.\n\n2. Add dependencies for Amazon DynamoDB and coroutines. This example assumes you are using [Gradle](https://gradle.org/). If you are using another build system, consult your build tool documentation on how to configure dependencies.\n\nGradle\n\n```\nplugins {\n kotlin(\"jvm\") version \"1.5.20\"\n}\n\nrepositories {\n mavenCentral()\n}\n\ndependencies {\n implementation(\"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0\")\n implementation(\"aws.sdk.kotlin:dynamodb:0.4.0-alpha\")\n}\n```\n3. Configure your AWS credentials. See the [configure quickstart guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config) for an introduction. Note: At this time, we support the default credential chain including config file, environment variables, and AWS profile.\n\n4. Create a service client and make an Amazon ‘DynamoDB request (the example below lists all existing Amazon DynamoDB tables to the console):\n\n\nKotlin\n```\nimport kotlinx.coroutines.runBlocking\nimport aws.sdk.kotlin.services.dynamodb.DynamoDbClient\n\nfun main() = runBlocking {\n val client = DynamoDbClient { region = \"us-east-2\" }\n val resp = client.listTables {\n limit = 10\n }\n \n println(\"Current DynamoDB tables: \")\n resp.tableNames?.forEach { println(it) }\n\n client.close()\n}\n```\nFor more information on getting started, see the [developer guide](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/home.html) as well as our [README](https://github.com/awslabs/aws-sdk-kotlin/blob/main/README.md). If you are new to Kotlin, the [official language page](https://kotlinlang.org/docs/jvm-get-started.html) is a great place to start.\n\n### **Contributing to the SDK’s development**\n\nMake sure to check out the [Contributing guide](https://github.com/awslabs/aws-sdk-kotlin/blob/main/CONTRIBUTING.md) to get the latest information. Here’s how you can help and provide feedback:\n\n- **Try out the SDK and let us know how it could be improved** – For services the SDK supports, let us know if you have improvement ideas by submitting a [GitHub feature request](https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose). Be sure to add your comments and “+1” GitHub issues that have already been submitted to help us prioritize and plan effectively.\n- **Report defects** – If you find a bug or encounter unexpected behavior, let us know by submitting a [GitHub issue](https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose) or pull request.\n- **Review the docs** – We want to ensure that our documentation provides all the necessary information and is easy to follow. If you find the areas that are unclear or incomplete, [open an issue](https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose), or even better, [submit a PR](https://github.com/awslabs/aws-sdk-kotlin/pulls).\n- **Help us prioritize high-level abstractions**– Beyond the core SDK, high-level abstractions built on top of the SDK (like the [S3 Encryption Client](https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html) or the [DynamoDB Mapper](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.html)) can further simplify usage of AWS services. Let us know which use cases are most important to you or provide ideas for new libraries.\n\n### **Give it a Try!**\n\nThe [developer guide](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/home.html) is a great place to start using the SDK. Check it out and [let us know what you think](https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose)!\n\n\n\n\n\n\n","render":"<p>We’re excited to announce the alpha release of the new <a href=\"https://github.com/awslabs/aws-sdk-kotlin\" target=\"_blank\">AWS SDK for Kotlin</a>! Kotlin is one of the most-loved languages amongst developers and now the AWS SDK for Kotlin makes it easy to call AWS services using idiomatic Kotlin APIs. You can use the native Kotlin language constructs you are used to, have mobile support without compromises, and target multiple platforms and execution environments in a single language.</p>\n<p>We designed the SDK from the ground up to give customers a familiar Kotlin experience, including concise yet expressive DSL builders and asynchronous AWS service calls via Kotlin coroutines. Today’s alpha release enables developers to make API calls to all the supported AWS services. Additionally, you may target the JVM platform or Android API Level 24+, with support for additional platforms like JavaScript and Native coming in future releases. To track the upcoming features in the future releases, please see our <a href=\"https://github.com/awslabs/aws-sdk-kotlin/projects/2\" target=\"_blank\">public roadmap</a> on GitHub.</p>\n<p>Today’s alpha release marks an important point in our journey, but the SDK is still in the early stages of development. This is a great time to influence our roadmap by <a href=\"https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose\" target=\"_blank\">sharing your thoughts</a> on the SDK design with us, as well as features and services that are the most important to you. Your feedback matters to us. See the section below on all the ways you can contribute.</p>\n<h3><a id=\"Getting_Started_with_the_AWS_SDK_for_Kotlin_6\"></a><strong>Getting Started with the AWS SDK for Kotlin</strong></h3>\n<p>This example shows how to perform a simple Amazon DynamoDB operation using the SDK for Kotlin. More <a href=\"https://github.com/awslabs/aws-sdk-kotlin/tree/main/examples\" target=\"_blank\">detailed examples</a> are available in the the <a href=\"https://github.com/awslabs/aws-sdk-kotlin\" target=\"_blank\">GitHub repository</a> as well as the developer guide.</p>\n<ol>\n<li>\n<p>Create a new Kotlin (JVM) project using your favorite IDE.</p>\n</li>\n<li>\n<p>Add dependencies for Amazon DynamoDB and coroutines. This example assumes you are using <a href=\"https://gradle.org/\" target=\"_blank\">Gradle</a>. If you are using another build system, consult your build tool documentation on how to configure dependencies.</p>\n</li>\n</ol>\n<p>Gradle</p>\n<pre><code class=\"lang-\">plugins {\n kotlin(&quot;jvm&quot;) version &quot;1.5.20&quot;\n}\n\nrepositories {\n mavenCentral()\n}\n\ndependencies {\n implementation(&quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0&quot;)\n implementation(&quot;aws.sdk.kotlin:dynamodb:0.4.0-alpha&quot;)\n}\n</code></pre>\n<ol start=\"3\">\n<li>\n<p>Configure your AWS credentials. See the <a href=\"https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config\" target=\"_blank\">configure quickstart guide</a> for an introduction. Note: At this time, we support the default credential chain including config file, environment variables, and AWS profile.</p>\n</li>\n<li>\n<p>Create a service client and make an Amazon ‘DynamoDB request (the example below lists all existing Amazon DynamoDB tables to the console):</p>\n</li>\n</ol>\n<p>Kotlin</p>\n<pre><code class=\"lang-\">import kotlinx.coroutines.runBlocking\nimport aws.sdk.kotlin.services.dynamodb.DynamoDbClient\n\nfun main() = runBlocking {\n val client = DynamoDbClient { region = &quot;us-east-2&quot; }\n val resp = client.listTables {\n limit = 10\n }\n \n println(&quot;Current DynamoDB tables: &quot;)\n resp.tableNames?.forEach { println(it) }\n\n client.close()\n}\n</code></pre>\n<p>For more information on getting started, see the <a href=\"https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/home.html\" target=\"_blank\">developer guide</a> as well as our <a href=\"https://github.com/awslabs/aws-sdk-kotlin/blob/main/README.md\" target=\"_blank\">README</a>. If you are new to Kotlin, the <a href=\"https://kotlinlang.org/docs/jvm-get-started.html\" target=\"_blank\">official language page</a> is a great place to start.</p>\n<h3><a id=\"Contributing_to_the_SDKs_development_54\"></a><strong>Contributing to the SDK’s development</strong></h3>\n<p>Make sure to check out the <a href=\"https://github.com/awslabs/aws-sdk-kotlin/blob/main/CONTRIBUTING.md\" target=\"_blank\">Contributing guide</a> to get the latest information. Here’s how you can help and provide feedback:</p>\n<ul>\n<li><strong>Try out the SDK and let us know how it could be improved</strong> – For services the SDK supports, let us know if you have improvement ideas by submitting a <a href=\"https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose\" target=\"_blank\">GitHub feature request</a>. Be sure to add your comments and “+1” GitHub issues that have already been submitted to help us prioritize and plan effectively.</li>\n<li><strong>Report defects</strong> – If you find a bug or encounter unexpected behavior, let us know by submitting a <a href=\"https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose\" target=\"_blank\">GitHub issue</a> or pull request.</li>\n<li><strong>Review the docs</strong> – We want to ensure that our documentation provides all the necessary information and is easy to follow. If you find the areas that are unclear or incomplete, <a href=\"https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose\" target=\"_blank\">open an issue</a>, or even better, <a href=\"https://github.com/awslabs/aws-sdk-kotlin/pulls\" target=\"_blank\">submit a PR</a>.</li>\n<li><strong>Help us prioritize high-level abstractions</strong>– Beyond the core SDK, high-level abstractions built on top of the SDK (like the <a href=\"https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html\" target=\"_blank\">S3 Encryption Client</a> or the <a href=\"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.html\" target=\"_blank\">DynamoDB Mapper</a>) can further simplify usage of AWS services. Let us know which use cases are most important to you or provide ideas for new libraries.</li>\n</ul>\n<h3><a id=\"Give_it_a_Try_63\"></a><strong>Give it a Try!</strong></h3>\n<p>The <a href=\"https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/home.html\" target=\"_blank\">developer guide</a> is a great place to start using the SDK. Check it out and <a href=\"https://github.com/awslabs/aws-sdk-kotlin/issues/new/choose\" target=\"_blank\">let us know what you think</a>!</p>\n"}
目录
亚马逊云科技解决方案 基于行业客户应用场景及技术领域的解决方案
联系亚马逊云科技专家
亚马逊云科技解决方案
基于行业客户应用场景及技术领域的解决方案
联系专家
0
目录
关闭