diff --git a/.tools/readmes/includes/run_instructions.jinja2 b/.tools/readmes/includes/run_instructions.jinja2 index b7ece9bc23a..463f3ab7716 100644 --- a/.tools/readmes/includes/run_instructions.jinja2 +++ b/.tools/readmes/includes/run_instructions.jinja2 @@ -79,7 +79,7 @@ go run ./hello {% endif %} {% if lang_config['name'] == 'Python' and lang_config['sdk_ver'] == 3 %} ``` -python hello.py +python {{ hello_ex['run_file'] }} ``` {% endif %} {% if lang_config['name'] == 'JavaScript' and lang_config['sdk_ver'] == 3 %} @@ -87,6 +87,11 @@ python hello.py node ./hello.js ``` {% endif %} +{% if lang_config['name'] == 'Ruby' and lang_config['sdk_ver'] == 3 %} +``` +ruby {{ hello_ex['run_file'] }} +``` +{% endif %} {% endfor %} {% if lang_config['name'] == 'Go' and lang_config['sdk_ver'] == 2 %} diff --git a/.tools/readmes/render.py b/.tools/readmes/render.py index 7e64074732f..a9c4bdee82f 100644 --- a/.tools/readmes/render.py +++ b/.tools/readmes/render.py @@ -124,6 +124,9 @@ def _transform_hello(self, pre_hello): "file": self.scanner.snippet( pre, self.sdk_ver, self.lang_config["service_folder"], api ), + "run_file": self.scanner.snippet( + pre, self.sdk_ver, self.lang_config["service_folder"], '' + ), "api": api, } post_hello.append(action) diff --git a/python/example_code/aurora/README.md b/python/example_code/aurora/README.md index b504005b853..712193ec6ff 100644 --- a/python/example_code/aurora/README.md +++ b/python/example_code/aurora/README.md @@ -90,7 +90,7 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using Aurora. ``` -python hello.py +python hello/hello_aurora.py ``` diff --git a/python/example_code/auto-scaling/README.md b/python/example_code/auto-scaling/README.md index 09b1025fe38..774e9d7ce19 100644 --- a/python/example_code/auto-scaling/README.md +++ b/python/example_code/auto-scaling/README.md @@ -80,7 +80,7 @@ functions within the same service. This example shows you how to get started using Auto Scaling. ``` -python hello.py +python hello/hello_autoscaling.py ``` diff --git a/python/example_code/cognito/README.md b/python/example_code/cognito/README.md index caac439dd3f..3311c30c4dc 100644 --- a/python/example_code/cognito/README.md +++ b/python/example_code/cognito/README.md @@ -80,7 +80,7 @@ functions within the same service. This example shows you how to get started using Amazon Cognito. ``` -python hello.py +python hello/hello_cognito.py ``` diff --git a/python/example_code/dynamodb/README.md b/python/example_code/dynamodb/README.md index 2d27195b2d5..9a7379131a9 100644 --- a/python/example_code/dynamodb/README.md +++ b/python/example_code/dynamodb/README.md @@ -94,7 +94,7 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using DynamoDB. ``` -python hello.py +python hello/hello_dynamodb.py ``` diff --git a/python/example_code/ec2/README.md b/python/example_code/ec2/README.md index 0ebee99383b..249d67f1e49 100644 --- a/python/example_code/ec2/README.md +++ b/python/example_code/ec2/README.md @@ -95,7 +95,7 @@ functions within the same service. This example shows you how to get started using Amazon EC2. ``` -python hello.py +python hello/hello_ec2.py ``` diff --git a/python/example_code/glue/README.md b/python/example_code/glue/README.md index f297194813c..2240cd4cd80 100644 --- a/python/example_code/glue/README.md +++ b/python/example_code/glue/README.md @@ -82,7 +82,7 @@ functions within the same service. This example shows you how to get started using AWS Glue. ``` -python hello.py +python hello/hello_glue.py ``` diff --git a/python/example_code/iam/README.md b/python/example_code/iam/README.md index f7681233f87..54fe379d338 100644 --- a/python/example_code/iam/README.md +++ b/python/example_code/iam/README.md @@ -113,7 +113,7 @@ functions within the same service. This example shows you how to get started using IAM. ``` -python hello.py +python hello/hello_iam.py ``` diff --git a/python/example_code/lambda/README.md b/python/example_code/lambda/README.md index 2ef046637e2..ab3169a110d 100644 --- a/python/example_code/lambda/README.md +++ b/python/example_code/lambda/README.md @@ -86,7 +86,7 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using Lambda. ``` -python hello.py +python hello/hello_lambda.py ``` diff --git a/python/example_code/medical-imaging/README.md b/python/example_code/medical-imaging/README.md index 337af3acb48..1d91c6c05bf 100644 --- a/python/example_code/medical-imaging/README.md +++ b/python/example_code/medical-imaging/README.md @@ -88,7 +88,7 @@ functions within the same service. This example shows you how to get started using HealthImaging. ``` -python hello.py +python imaging_set_and_frames_workflow/hello.py ``` diff --git a/python/example_code/rds/README.md b/python/example_code/rds/README.md index e55da67828d..046b754b8bd 100644 --- a/python/example_code/rds/README.md +++ b/python/example_code/rds/README.md @@ -86,7 +86,7 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using Amazon RDS. ``` -python hello.py +python hello/hello_rds.py ``` diff --git a/python/example_code/s3/README.md b/python/example_code/s3/README.md index 54a973f06f7..01de02c30a9 100644 --- a/python/example_code/s3/README.md +++ b/python/example_code/s3/README.md @@ -103,7 +103,7 @@ Sample applications that work across multiple AWS services. This example shows you how to get started using Amazon S3. ``` -python hello.py +python s3_basics/hello.py ``` diff --git a/ruby/example_code/aurora/README.md b/ruby/example_code/aurora/README.md index 1335497126b..085e3082ffd 100644 --- a/ruby/example_code/aurora/README.md +++ b/ruby/example_code/aurora/README.md @@ -49,6 +49,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` This example shows you how to get started using Aurora. +``` +ruby hello/hello_aurora.rb +``` ### Tests diff --git a/ruby/example_code/auto-scaling/README.md b/ruby/example_code/auto-scaling/README.md index 4e907141e86..73faca54d65 100644 --- a/ruby/example_code/auto-scaling/README.md +++ b/ruby/example_code/auto-scaling/README.md @@ -49,6 +49,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` This example shows you how to get started using Auto Scaling. +``` +ruby hello/hello_autoscaling.rb +``` ### Tests diff --git a/ruby/example_code/cognito/README.md b/ruby/example_code/cognito/README.md index c9b1f1694b3..7576c3359c9 100644 --- a/ruby/example_code/cognito/README.md +++ b/ruby/example_code/cognito/README.md @@ -49,6 +49,9 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `ruby` This example shows you how to get started using Amazon Cognito. +``` +ruby hello/hello_cognito.rb +``` ### Tests diff --git a/ruby/example_code/dynamodb/README.md b/ruby/example_code/dynamodb/README.md index dd5a544c84d..b848e8e5a97 100644 --- a/ruby/example_code/dynamodb/README.md +++ b/ruby/example_code/dynamodb/README.md @@ -77,6 +77,9 @@ functions within the same service. This example shows you how to get started using DynamoDB. +``` +ruby hello/hello_dynamodb.rb +``` #### Get started with tables, items, and queries diff --git a/ruby/example_code/ec2/README.md b/ruby/example_code/ec2/README.md index 6008b550f37..55fbcdda03c 100644 --- a/ruby/example_code/ec2/README.md +++ b/ruby/example_code/ec2/README.md @@ -70,6 +70,9 @@ The quickest way to interact with this example code is to invoke a [Scenario](#S This example shows you how to get started using Amazon EC2. +``` +ruby hello/hello_ec2.rb +``` ### Tests diff --git a/ruby/example_code/glue/README.md b/ruby/example_code/glue/README.md index 02a428d2c28..e147e3a30a8 100644 --- a/ruby/example_code/glue/README.md +++ b/ruby/example_code/glue/README.md @@ -76,6 +76,9 @@ functions within the same service. This example shows you how to get started using AWS Glue. +``` +ruby hello/hello_glue.rb +``` #### Get started with crawlers and jobs diff --git a/ruby/example_code/iam/README.md b/ruby/example_code/iam/README.md index 007ff0b742a..410a730578f 100644 --- a/ruby/example_code/iam/README.md +++ b/ruby/example_code/iam/README.md @@ -97,6 +97,9 @@ The quickest way to interact with this example code is to invoke a [Scenario](#S This example shows you how to get started using IAM. +``` +ruby hello/hello_iam.rb +``` #### Create a user and assume a role diff --git a/ruby/example_code/lambda/README.md b/ruby/example_code/lambda/README.md index 8150286faf0..ca247c9783e 100644 --- a/ruby/example_code/lambda/README.md +++ b/ruby/example_code/lambda/README.md @@ -70,6 +70,9 @@ The quickest way to interact with this example code is to invoke a [Scenario](#S This example shows you how to get started using Lambda. +``` +ruby hello/hello_lambda.rb +``` #### Get started with functions diff --git a/ruby/example_code/rds/README.md b/ruby/example_code/rds/README.md index c28acaf63a6..46248793644 100644 --- a/ruby/example_code/rds/README.md +++ b/ruby/example_code/rds/README.md @@ -61,6 +61,9 @@ The quickest way to interact with this example code is to invoke a [Single Actio This example shows you how to get started using Amazon RDS. +``` +ruby hello/hello_rds.rb +``` ### Tests diff --git a/ruby/example_code/s3/README.md b/ruby/example_code/s3/README.md index b511e11a490..94bfc79f20a 100644 --- a/ruby/example_code/s3/README.md +++ b/ruby/example_code/s3/README.md @@ -80,6 +80,9 @@ The quickest way to interact with this example code is to invoke a [Scenario](#S This example shows you how to get started using Amazon S3. +``` +ruby hello/hello_s3.rb +``` #### Create a presigned URL