smithy-rs/aws/sdk
Russell Cohen 95e8c30b68
Update dependencies of benchmark (#2974)
## Motivation and Context
Remove vulnerable webpki version

## Testing
I ran the benchmark

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
2023-09-07 17:38:35 +00:00
..
aws-models update models (#2962) 2023-08-30 15:22:17 +00:00
benchmarks Update dependencies of benchmark (#2974) 2023-09-07 17:38:35 +00:00
integration-tests Make required context parameters required (#2964) 2023-08-31 19:26:07 +00:00
.gitignore [chore] Move AWS codegeneration into its own folder (#166) 2021-01-19 15:23:07 -05:00
README.md Test the orchestrator against the SDK in CI (#2715) 2023-05-19 17:28:37 +00:00
build.gradle.kts Merge remote-tracking branch 'origin/smithy-rs-release-0.56.x' 2023-08-22 12:46:19 -07:00
gradle.properties Add support for TimeStreamWrite and TimeStreamQuery (#2707) 2023-05-31 18:08:51 +00:00
sdk-external-types.toml Change the default runtime mode to orchestrator (#2847) 2023-07-20 15:49:53 +00:00
sync-models.py Fix `SPDX-License-Identifier` in header comments (#1377) 2022-05-09 09:50:46 -05:00
test-services.py Fix `SPDX-License-Identifier` in header comments (#1377) 2022-05-09 09:50:46 -05:00

README.md

AWS SDK Generator

This directory contains a gradle project to generate an AWS SDK. It uses the Smithy Build Plugin combined with the customizations specified in aws/sdk-codegen to generate an AWS SDK from Smithy models.

build.gradle.kts will generate a smithy-build.json dynamically from all models in the models directory.

Usage

Generate an SDK: ./gradlew :aws:sdk:assemble

Generate, compile, and test an SDK: ./gradlew :aws:sdk:check

Run an SDK example: ./gradlew :aws:sdk:runExample --example dynamo-helloworld

Controlling service generation

You can use gradle properties to opt/out of generating specific services:

# Generate only s3,ec2,sts
./gradlew -Paws.services=+s3,+ec2,+sts :aws:sdk:assemble

# Generate all AWS services using models from the aws-sdk-rust repo
./gradlew \
  -Paws.sdk.models.path=../aws-sdk-rust/aws-models \
  :aws:sdk:assemble

# Generate only S3 from using the model from the aws-sdk-rust repo
./gradlew \
  -Paws.sdk.models.path=../aws-sdk-rust/aws-models \
  -Paws.services=+s3 \
  :aws:sdk:assemble

The generation logic is as follows:

  1. If aws.sdk.models.path is specified, take models from that path. Otherwise take them from the local aws-models directory.
  2. Reference the aws.services property to determine which models to include/exclude, based on the service module names.

Debugging with IntelliJ

The easiest way to debug codegen is to attach a remote debugger to the Gradle daemon and then run aws:sdk:assemble. To do this:

  1. Temporarily modify the root gradle.properties file to have the following:
org.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5006
  1. Run ./gradlew --stop to kill any Gradle daemons that are running without that property.
  2. Configure IntelliJ to remote debug on port 5006 (or whichever port was configured above).
  3. Run ./gradlew aws:sdk:assemble (with any additional properties to limit the services generated)
  4. It will hang on "Starting Daemon". This is because the Gradle daemon is waiting for a remote debugger to start up. Attaching IntelliJ's debugger will make the build proceed, but now you can stop execution on breakpoints and examine values.