Skip to content

Commit

Permalink
README fixes for run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ford-at-aws committed Jul 1, 2024
1 parent 909fe4d commit a14f13c
Show file tree
Hide file tree
Showing 23 changed files with 50 additions and 12 deletions.
7 changes: 6 additions & 1 deletion .tools/readmes/includes/run_instructions.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,19 @@ 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 %}
```bash
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 %}
Expand Down
3 changes: 3 additions & 0 deletions .tools/readmes/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion python/example_code/aurora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/auto-scaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/cognito/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/glue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/medical-imaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
2 changes: 1 addition & 1 deletion python/example_code/s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```


Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/aurora/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/auto-scaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/cognito/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/dynamodb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/ec2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/glue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/rds/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ruby/example_code/s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a14f13c

Please sign in to comment.