Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Last active January 22, 2020 09:40
Show Gist options
  • Save adrianhall/ea6b06d34ce38809db3cbec05e55eddc to your computer and use it in GitHub Desktop.
Save adrianhall/ea6b06d34ce38809db3cbec05e55eddc to your computer and use it in GitHub Desktop.
#=======================================================================================
IdentityPool:
Type : AWS::Cognito::IdentityPool
Description : "Federation for the User Pool members to access AWS resources"
Properties:
IdentityPoolName : ${self:provider.apiname}_identities
AllowUnauthenticatedIdentities : true
CognitoIdentityProviders:
- ClientId : { Ref: AndroidUserPoolClient }
ProviderName : { Fn::Sub: [ 'cognito-idp.${self:provider.region}.amazonaws.com/#{client}', { "client": { Ref: CognitoUserPoolMyPool }}]}
#=======================================================================================
IdentityPoolRoleMap:
Type : AWS::Cognito::IdentityPoolRoleAttachment
Description : "Links the unauthenticated and authenticated policies to the identity pool"
Properties:
IdentityPoolId : { Ref: IdentityPool }
Roles:
unauthenticated : { Fn::GetAtt: [ UnAuthRole, Arn ]}
authenticated : { Fn::GetAtt: [ AuthRole, Arn ]}
#=======================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment