Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Last active January 22, 2020 09:40
Show Gist options
  • Select an option

  • Save adrianhall/ea6b06d34ce38809db3cbec05e55eddc to your computer and use it in GitHub Desktop.

Select an option

Save adrianhall/ea6b06d34ce38809db3cbec05e55eddc to your computer and use it in GitHub Desktop.

Revisions

  1. adrianhall revised this gist Oct 29, 2018. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion serverless.yml
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,8 @@
    AllowUnauthenticatedIdentities : true
    CognitoIdentityProviders:
    - ClientId : { Ref: AndroidUserPoolClient }
    ProviderName : { Fn::Sub: [ 'cognito-idp.${self:provider.region}.amazonaws.com/#{client}', { "client": { Ref: CognitoUserPoolMyPool }}]}#=======================================================================================
    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"
  2. adrianhall revised this gist Oct 10, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion serverless.yml
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #=======================================================================================
    #=======================================================================================
    IdentityPool:
    Type : AWS::Cognito::IdentityPool
    Description : "Federation for the User Pool members to access AWS resources"
  3. adrianhall created this gist Oct 10, 2018.
    19 changes: 19 additions & 0 deletions serverless.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #=======================================================================================
    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 ]}
    #=======================================================================================