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
@fayecloudguru During the cloud guru DVA-C01 session, the scripts attched with one bug found, makes the experiment fails:
in the Cognito_Commands.txt file: step 5, the highlight part below is considered as typo, need to remove to keep consistency of the Role name with rest of the guide.
Using the CLI, create new identity pool, named DynamoPool, allow unauthenticated entities.
**** (use ^ - Shift + 6 if you are a windows user, not ) ****
We can now specify the Cognito credentials in our application - i.e. in the JavaScript section of our webpage!
Replace the identity pool ID with your own and the role ARN with your own role ARN.
We are going to add this snippet to our index.html:
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
RoleArn: "arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole"
});
The text was updated successfully, but these errors were encountered:
@fayecloudguru During the cloud guru DVA-C01 session, the scripts attched with one bug found, makes the experiment fails:
in the Cognito_Commands.txt file: step 5, the highlight part below is considered as typo, need to remove to keep consistency of the Role name with rest of the guide.
--roles unauthenticated=arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole --output json
More backgroud:
Cognito Commands:
Using the CLI, create new identity pool, named DynamoPool, allow unauthenticated entities.
**** (use ^ - Shift + 6 if you are a windows user, not ) ****
aws cognito-identity create-identity-pool
--identity-pool-name DynamoPool
--allow-unauthenticated-identities
--output json
Create an IAM role named Cognito_DynamoPoolUnauth.
aws iam create-role --role-name Cognito_DynamoPoolUnauth --assume-role-policy-document file://myCognitoPolicy.json --output json
aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess --role-name Cognito_DynamoPoolUnauth
Get the IAM role Amazon Resource Name (ARN).
aws iam get-role --role-name Cognito_DynamoPoolUnauth --output json
Add our role to the Cognito Identity Pool. Replace the pool ID with your own pool ID and use the role ARN from the previous step.
aws cognito-identity set-identity-pool-roles
--identity-pool-id "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
--roles unauthenticated=arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole --output json
aws cognito-identity get-identity-pool-roles --identity-pool-id "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Replace the identity pool ID with your own and the role ARN with your own role ARN.
We are going to add this snippet to our index.html:
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
RoleArn: "arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole"
});
The text was updated successfully, but these errors were encountered: