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
Copy file name to clipboardExpand all lines: Polly-Sample/Swift/README.md
+6-22Lines changed: 6 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -23,31 +23,15 @@ This sample demonstrates use of the Amazon Polly APIs to retrieve list of voices
23
23
pod install
24
24
25
25
1. This sample requires Cognito to authorize to Amazon Polly in order to access device shadows. Use Amazon Cognito to create a new identity pool:
26
-
1. In the [Amazon Cognito Console](https://console.aws.amazon.com/cognito/), select `Create Identity Pool`.
27
-
1. Ensure `Enable access to unauthenticated identities` is checked. This allows the sample application to assume the unauthenticated role associated with this identity pool.
26
+
1. In the [Amazon Cognito Console](https://console.aws.amazon.com/cognito/), press the `Manage Federated Identities` button and on the resulting page press the `Create new identity pool` button.
27
+
1. Give your identity pool a name and ensure that `Enable access to unauthenticated identities` under the `Unauthenticated identities` section is checked. This allows the sample application to assume the unauthenticated role associated with this identity pool. Press the `Create Pool` button to create your identity pool.
28
28
29
29
**Important**: see note below on unauthenticated user access.
30
30
31
-
1. Obtain the `PoolID` constant. This will be used in the application.
32
-
1. As part of creating the identity pool Cognito will setup two roles in [Identity and Access Management (IAM)](https://console.aws.amazon.com/iam/home#roles). These will be named something similar to: `Cognito_PoolNameAuth_Role` and `Cognito_PoolNameUnauth_Role`.
33
-
1. Now we will attach a policy to the unauthenticated role which has permissions to access the required Amazon Polly API. This is done by first creating an IAM Policy in the [IAM Console](https://console.aws.amazon.com/iam/home#policies) and then attaching it to the unauthenticated role. Below is an example policy which can be used with the sample application. This policy allows the application to perform all operations on the Amazon Polly service.
34
-
35
-
```
36
-
{
37
-
"Version": "2012-10-17",
38
-
"Statement": [
39
-
{
40
-
"Effect": "Allow",
41
-
"Action": [
42
-
"polly:*"
43
-
],
44
-
"Resource": [
45
-
"*"
46
-
]
47
-
}
48
-
]
49
-
}
50
-
```
31
+
1. As part of creating the identity pool, Cognito will setup two roles in [Identity and Access Management (IAM)](https://console.aws.amazon.com/iam/home#roles). These will be named something similar to: `Cognito_PoolNameAuth_Role` and `Cognito_PoolNameUnauth_Role`. You can view them by pressing the `View Details` button. Now press the `Allow` button to create the roles.
32
+
1. Save the `Identity pool ID` value that shows up in red in the "Getting started with Amazon Cognito" page, it should look similar to: `us-east-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" and note the region that is being used. These will be used in the application code later.
33
+
1. Now we will attach a policy to the unauthenticated role which has permissions to access the required Amazon Polly API. This is done by attaching an IAM Policy to the unauthenticated role in the [IAM Console](https://console.aws.amazon.com/iam/home#roles). First, search for the unauth role that you created in step 3 above (named something similar to `Cognito_PoolNameUnauth_Role`) and select its hyperlink. In the resulting "Summary" page press the `Attach Policy` button in the "Permissions" tab.
34
+
1. Search for "polly" and check the box next to the policy named `AmazonPollyFullAccess` and then press the `Attach Policy` button. This policy allows the application to perform all operations on the Amazon Polly service.
51
35
52
36
More information on AWS IAM roles and policies can be found [here](http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage.html). More information on Amazon Polly policies can be found [here](http://docs.aws.amazon.com/polly/latest/dg/using-identity-based-policies.html).
0 commit comments