Skip to content
v2.277.0

UserPoolIdentityProviderAmazonProps Struct ​

Properties to initialize UserPoolAmazonIdentityProvider.

Example ​

ts
const pool = new cognito.UserPool(this, 'Pool');
const provider = new cognito.UserPoolIdentityProviderAmazon(this, 'Amazon', {
  userPool: pool,
  clientId: 'amzn-client-id',
  clientSecret: 'amzn-client-secret',
});

const client = pool.addClient('app-client', {
  // ...
  supportedIdentityProviders: [
    cognito.UserPoolClientIdentityProvider.AMAZON,
  ],
});

client.node.addDependency(provider);
python
pool = cognito.UserPool(self, "Pool")
provider = cognito.UserPoolIdentityProviderAmazon(self, "Amazon",
    user_pool=pool,
    client_id="amzn-client-id",
    client_secret="amzn-client-secret"
)

client = pool.add_client("app-client",
    # ...
    supported_identity_providers=[cognito.UserPoolClientIdentityProvider.AMAZON
    ]
)

client.node.add_dependency(provider)
java
UserPool pool = new UserPool(this, "Pool");
UserPoolIdentityProviderAmazon provider = UserPoolIdentityProviderAmazon.Builder.create(this, "Amazon")
        .userPool(pool)
        .clientId("amzn-client-id")
        .clientSecret("amzn-client-secret")
        .build();

UserPoolClient client = pool.addClient("app-client", UserPoolClientOptions.builder()
        // ...
        .supportedIdentityProviders(List.of(UserPoolClientIdentityProvider.AMAZON))
        .build());

client.node.addDependency(provider);
csharp
// Install: dotnet add package Amazon.CDK.Lib
var pool = new UserPool(this, "Pool");
var provider = new UserPoolIdentityProviderAmazon(this, "Amazon", new UserPoolIdentityProviderAmazonProps {
    UserPool = pool,
    ClientId = "amzn-client-id",
    ClientSecret = "amzn-client-secret"
});

var client = pool.AddClient("app-client", new UserPoolClientOptions {
    // ...
    SupportedIdentityProviders = new [] { UserPoolClientIdentityProvider.AMAZON }
});

client.Node.AddDependency(provider);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
pool := cognito.NewUserPool(this, jsii.String("Pool"))
provider := cognito.NewUserPoolIdentityProviderAmazon(this, jsii.String("Amazon"), &UserPoolIdentityProviderAmazonProps{
	UserPool: pool,
	ClientId: jsii.String("amzn-client-id"),
	ClientSecret: jsii.String("amzn-client-secret"),
})

client := pool.addClient(jsii.String("app-client"), &UserPoolClientOptions{
	// ...
	SupportedIdentityProviders: []UserPoolClientIdentityProvider{
		cognito.UserPoolClientIdentityProvider_AMAZON(),
	},
})

client.Node.AddDependency(provider)

Properties ​

attributeMappingoptionalAttributeMappingattribute_mappingoptionalAttributeMappingattributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMappingAttributeMappingoptionalAttributeMapping #
Mapping attributes from the identity provider to standard and custom attributes of the user pool.

Default: no attribute mapping

clientIdstringclient_idstrclientIdStringClientIdstringClientId*string required #
The client id recognized by Login with Amazon APIs.
clientSecretstringclient_secretstrclientSecretStringClientSecretstringClientSecret*string required #
The client secret to be accompanied with clientId for Login with Amazon APIs to authenticate the client.
scopesoptionalstring[]scopesoptionaltyping.List[str]scopesoptionalList<String>Scopesoptionalstring[]Scopesoptional*[]*string #
The types of user profile data to obtain for the Amazon profile.

Default: [ profile ]

userPoolIUserPooluser_poolIUserPooluserPoolIUserPoolUserPoolIUserPoolUserPoolIUserPool required #
The user pool to which this construct provides identities.