Skip to content

Commit 9eec36b

Browse files
committed
Add precisions about the usage of instance profile credentials
1 parent 1b040b3 commit 9eec36b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Jump To:
1717

1818
### Installation
1919

20-
The AWS bundle can be installed via [Composer](http://getcomposer.org) by
20+
The AWS bundle can be installed via [Composer](http://getcomposer.org) by
2121
requiring the`aws/aws-sdk-php-symfony` package in your project's `composer.json`:
2222

2323
```json
@@ -61,6 +61,12 @@ name, such as `@a_service`. This syntax will be converted to a service during
6161
container compilation. If you want to use a string literal that begins with `@`,
6262
you will need to escape it by adding another `@` sign.
6363

64+
When using the SDK from an EC2 instance, you can write `credentials: ~` to use
65+
[instance profile credentials](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#instance-profile-credentials).
66+
This syntax means that temporary credentials will be automatically retrieved
67+
from the EC2 instance's metadata server. It's also the preferred technique for
68+
providing credentials to applications running on that specific context.
69+
6470
Sample configuration can be found in the `tests/fixtures` folder for [YAML](https://github.com/aws/aws-sdk-php-symfony/blob/master/tests/fixtures/config.yml), [PHP](https://github.com/aws/aws-sdk-php-symfony/blob/master/tests/fixtures/config.php), and [XML](https://github.com/aws/aws-sdk-php-symfony/blob/master/tests/fixtures/config.xml).
6571

6672
#### Sample YML Configuration
@@ -97,7 +103,7 @@ services:
97103
### Usage
98104
99105
This bundle exposes an instance of the `Aws\Sdk` object as well as instances of
100-
each AWS client object as services to your symfony application. They are name
106+
each AWS client object as services to your symfony application. They are name
101107
`aws.{$namespace}`, where `$namespace` is the namespace of the service client.
102108
For instance:
103109

@@ -109,13 +115,13 @@ aws.s3 | Aws\S3\S3Client
109115
aws_sdk | Aws\Sdk
110116

111117
The services made available depends on which version of the SDK is installed. To
112-
view a full list, run the following command from your application's root
118+
view a full list, run the following command from your application's root
113119
directory:
114120
```
115121
php bin/console debug:container aws
116122
```
117123

118-
Full documentation on each of the services listed can be found in the [SDK API
124+
Full documentation on each of the services listed can be found in the [SDK API
119125
docs](http://docs.aws.amazon.com/aws-sdk-php/v3/api/).
120126

121127
## Getting Help

0 commit comments

Comments
 (0)