You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- description:Because this example uses supporting files, be sure to <ulink url="https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/php/README.md#prerequisites">read the guidance</ulink> in the PHP examples README.md file.
Copy file name to clipboardExpand all lines: javav2/example_code/transcribe-streaming/src/main/java/com/amazonaws/transcribestreaming/TranscribeStreamingDemoApp.java
Copy file name to clipboardExpand all lines: php/README.md
+56-3Lines changed: 56 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,22 +22,75 @@ Cross-service examples are located in the [*cross-services folder*](cross_servic
22
22
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
23
23
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
24
24
25
+
## Prerequisites
25
26
26
-
### Prerequisites
27
+
To run these code examples, you need:
28
+
29
+
*[PHP](https://www.php.net/) version 8.1 or higher
30
+
*[Composer](https://getcomposer.org) for dependency management
31
+
*[PHPUnit](https://phpunit.de/) for unit testing
32
+
* The [AWS SDK for PHP](https://aws.amazon.com/sdk-for-php/)
33
+
*[AWS credentials](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html) set up
34
+
35
+
For more information, see [Getting Started](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_index.html) in the AWS SDK for PHP Developer Guide.
36
+
37
+
## Set up the examples
38
+
39
+
Some examples require supporting files from the GitHub repository in addition to the AWS SDK for PHP. For these examples:
40
+
41
+
1. Clone, fork, or download the entire [aws-doc-sdk-examples repository](https://github.com/awsdocs/aws-doc-sdk-examples) from GitHub.
42
+
43
+
You need the entire repository, not just individual files, so supporting files can be accessed by the examples.
44
+
45
+
2. Install dependencies
46
+
47
+
From the directory that contains the composer.json file for the example, run:
48
+
```bash
49
+
composer install
50
+
```
51
+
52
+
3. Run examples from within the repository structure and from the directory that contains the initiating code
53
+
54
+
Run examples from within the cloned directory structure to ensure access to supporting files.
55
+
56
+
## Run the examples
57
+
58
+
By default, these code examples run using the default AWS credential provider chain, which includes using the AWS shared credentials and config files with a `default` profile.
59
+
For more information, about using AWS shared files and the `default` profile, see [Using shared config and credentials files to globally configure AWS SDKs and tools](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) in the *AWS SDKs and Tools
60
+
Reference Guide*.
61
+
62
+
Important: Running these code examples might result in charges to the AWS account associated with the AWS credentials being used.
63
+
64
+
Many examples include a `Runner.php` file to abstract the logic from running the code. From any example directory with a Runner.php file, run:
65
+
66
+
```bash
67
+
php Runner.php
68
+
```
69
+
70
+
---------
71
+
72
+
## Prerequisites
27
73
To run or test these code examples, you need the following:
28
74
29
75
-[PHP](https://www.php.net/) version 8.1 or higher
30
76
-[Composer](https://getcomposer.org), for dependency management
31
77
-[PHPUnit](https://phpunit.de/), for unit testing
32
78
- The [AWS SDK for PHP](https://aws.amazon.com/sdk-for-php/)
33
79
-[AWS credentials](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html) set up
80
+
- For examples that use supporting files that are available only in the GitHub repository
81
+
and not available for installation by Composer, you need to
82
+
- clone, fork, or download a zip of the entire [aws-doc-sdk-examples repository](https://github.com/awsdocs/aws-doc-sdk-examples) from GitHub.
83
+
You want the entire repository, not just indvidual files, so supporting files can be accessed by the examples.
84
+
- Run the example from within the directory structure and from within the directory that contains the composer.json file.
85
+
- Install the dependencies and configuration settings with Composer.
34
86
35
87
For more information, see [Getting Started](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_index.html) in the *AWS SDK for PHP Developer Guide*.
36
88
37
89
## Run the code
38
90
39
-
By default, these code examples run using the default AWS credential provider chain, which includes using an AWS shared credentials file and profiles.
40
-
For more information, see [Using the AWS Credentials File and Credential Profiles](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_profiles.html) in the *AWS SDK for PHP Developer Guide*.
91
+
By default, these code examples run using the default AWS credential provider chain, which includes using the AWS shared credentials and config files with a `default` profile.
92
+
For more information, about using AWS shared files and the `default` profile, see [Using shared config and credentials files to globally configure AWS SDKs and tools](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html) in the *AWS SDKs and Tools
93
+
Reference Guide*.
41
94
42
95
Running these code examples might result in charges to the AWS account that is associated with the AWS credentials being used.
0 commit comments