All Questions
Tagged with aws-cloudformation amazon-cognito
125
questions
29
votes
8
answers
20k
views
Cloudformation Cognito - how to setup App Client Settings, Domain, and Federated Identities via SAM template
I already have my cognito user pool cloudformation template working, and have it integrated to my api gateway. But somehow i still have to manually configure the app client settings, domain, and ...
25
votes
1
answer
5k
views
How to require email validation in Cognito through CloudFormation?
I think I tried all properties here:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cognito-userpool.html
couldn't get this box checked:
My config currently:
...
20
votes
5
answers
12k
views
AppSync: Get user information in $context when using AWS_IAM auth
In AppSync, when you use Cognito User Pools as your auth setting your identity you get
identity:
{ sub: 'bcb5cd53-315a-40df-a41b-1db02a4c1bd9',
issuer: 'https://cognito-idp.us-west-2....
17
votes
4
answers
3k
views
Set Cognito Verification Type to Link in CloudFormation
I'm trying to figure out how I can set the verification type from Code (default) to Link in my CloudFormation template.
In the website I can set it here:
If I take a look at the docs there is ...
15
votes
5
answers
8k
views
AWS SAM API with Cognito User Pools authorizer
How can I create an API with AWS SAM that does authorization using Cognito User Pools authorizer?
Theres AWS::ApiGateway::Authorizer. But ...
{
"Type" : "AWS::ApiGateway::Authorizer",
"...
15
votes
2
answers
5k
views
Configuring Cognito user pool to send emails with SES
This morning, I noticed an alert in my user pool settings that I hadn't noticed before:
I looked at the settings screen and there's a radio button:
I already have a from address. How do I set that ...
14
votes
3
answers
61k
views
Cloudformation: Error: Member must have length less than or equal to 20
I'm using this CloudFormation template to create a Cognito User Pool:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Template creates AWS Cognito UserPool.",
"Resources": {
...
13
votes
2
answers
12k
views
Which AWS services does AWS CloudFormer support?
AWS CloudFormation offers a default stack named CloudFormer, a template creation tool. CloudFormer creates a CloudFormation template from your current AWS environment, allowing you to click which ...
13
votes
1
answer
5k
views
Deploy AWS UserPool via CloudFormation with attribute update
If you deploy a UserPool via CloudFormation, e.g:
Resources:
UserPool:
Type: 'AWS::Cognito::UserPool'
Properties:
...
Schema:
- Name: email
AttributeDataType: ...
10
votes
4
answers
5k
views
AWS + Serverless - how to get at the secret key generated by cognito user pool
I've been following the serverless tutorial at https://serverless-stack.com/chapters/configure-cognito-user-pool-in-serverless.html
I've got the following serverless yaml snippit
Resources:
...
10
votes
1
answer
3k
views
How to set AWS Cognito user password in CloudFormation template for testing
I'm creating a Cognito User Pool and a test user using CloudFormation templates. I'm doing this for automated testing of login, user management code, and token code.
However, there doesn't appear to ...
10
votes
0
answers
1k
views
IAM Policy variable for Cognito groups
My situation is this:
I'm trying to control access to an S3 bucket using unix-like home directories via AWS Cognito. These home directories should be accessible by groups of users rather than each ...
8
votes
3
answers
9k
views
How to Set required attributes in aws cognito user pool using aws cloudformation template?
Aws cognito console screen
While creating user-pool using cloudformation template i wanted to add the following attributes(marked in the attached image link). I didn't find anything helpful in the ...
8
votes
1
answer
2k
views
AWS Amplify GraphQL Schema that is linked to Cognito User Pool
I am using the AWS Amplify to create a website platform that functions mostly as a directory of its registered users with various attributes relating to the business domain. The two primary users for ...
7
votes
3
answers
3k
views
How to allow only email as username alias with CloudFormation?
Following this guide, it says:
On the Attributes tab, select Email address or phone number and select Allow email addresses.
Which looks like this:
But I'm having trouble accomplishing the same ...
7
votes
1
answer
4k
views
How to dynamically create Resource (UserPool) name by concatenating parameter value and string in AWS CloudFormation YAML template?
I am trying to create an AWS CloudFormation template using YAML. I add a UserPool resource as follows. The user pool name & id should be obtained via a parameter value i.e., if the value of ...
7
votes
4
answers
4k
views
AWS Cognito - How to create pool allowing sign up with email address, using CloudFormation?
I am attempting to create a UserPool using CloudFormation syntax, but I am unable to find which property I need to set in order to create the pool with email address sign up. How do I specify this?
...
7
votes
3
answers
7k
views
How to export Cognito User Pool settings to CloudFormation template?
I've created Cognito User Pool through AWS Console, but I want to automate creation of new Cognito User Pools through CloudFormation. Can I export my current User Pool configuration to CloudFormation ...
7
votes
1
answer
1k
views
IdentityPool Creation with CloudFormation
I'm attempting to follow along with a tutorial located at http://serverless-stack.com/chapters/create-a-cognito-identity-pool.html for identity pool creation and document the creation by using ...
7
votes
5
answers
4k
views
Cannot set a property of cognito userpool client via cloudformation
I am trying to run congnito via cloudformation and everything works but there is section in cognito as follows:
As you see there is section "Enable identity providers"
and I can not find where I can ...
7
votes
1
answer
2k
views
How to configure 'Pre Token Generation' trigger via CloudFormation?
Pre Token Generation trigger: This Lambda trigger allows you to customize an identity token before it is generated: https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-token-...
6
votes
2
answers
3k
views
AWS CloudFormation Script Fails - Cognito is not allowed to use your email identity
I am trying to build a CloudFormation script that sets up a Cognito User Pool and configures it to use a custom email for sending users their validation code in the signup process (i.e. FROM: noreply@...
6
votes
1
answer
1k
views
How to add google as a AWS cognito identity provider in AWS CloudFormation template in JSON
I'm using amazon web services. In the AWS CloudFormation I'm creating a template in JSON where I have to add Identity Pool as a resource where I have to use Google as Cognito Identity Provider.
If we ...
5
votes
3
answers
8k
views
How do you "DependsOn" a Lambda function from a CFN resource?
In Serverless, I am creating an AWS::Lambda::Permission CFN resource that allows Cognito to invoke a Custom Message Lambda Handler.
AWS::Lambda::Permission depends on the lambda. How do I ensure that ...
5
votes
1
answer
14k
views
Cloudformation Property validation failure: Encountered unsupported properties
I'm trying to create a nested stack with the root stack looks like this:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"DynamoDBTable": {
"Type": "AWS::...
5
votes
2
answers
9k
views
How to add a user to a Cognito User Pool Group from AWS Lambda?
I'm trying to add a user a to cognito user pool group from a lambda that gets triggered post confirmation. This is the code for that lambda:
export async function postAuth(event, context, callback)...
5
votes
1
answer
989
views
'Failed to refresh tokens: Missing required parameter auth parameters.' - AWS Amplify Pull API
I am building a VueJS App using AWS Amplify where I build the backend in the Admin UI, which is great and easy.
I added the Auth in my App through the command line, but I am building all the models ...
5
votes
1
answer
8k
views
Signing in throws 'Incorrect username or password' error when users log in
I created a Cognito User Pool where users can sign up but can no longer sign in. I have attempted many different configurations, such as disabling MFA, turning off remembering of devices as I saw that ...
5
votes
1
answer
3k
views
Cognito User Pool AuthorizerId cannot be set in API Gateway Cloudformation
I successfully deployed a Cognito User Pool and used it to authenticate against a Method that I set up to proxy to my API in API gateway, and now I'm creating a Cloudformation template of the same ...
5
votes
3
answers
1k
views
How to add the Resource Servers of an UserPool using CloudFormation?
Using CloudFormation, how can I create Resource Servers for an UserPool in AWS Cognito?
In CloudFormation documentation, there are only 5 items under Cognito and I can't see how to configure a ...
5
votes
1
answer
1k
views
How to set a dynamic RoleMappings key for a IndentityPoolRoleAttachment in CloudFormation
I am building a stack to initialize a Cognito installation. As part of this I have setup user groups with associated roles. I need to set the Choose role from token option, allowing identities to use ...
4
votes
1
answer
706
views
Access to Role 'cognito role' is forbidden
I'm getting this strange error
Access to Role 'cognito role' is forbidden.
while creating a cloud formation stack here is my cloud formation file in yaml format.
I'm basically creating a s3 bucket ...
4
votes
1
answer
1k
views
How to disable Cognito user signups via CloudFormation?
How can I select the "Only allow administrators to create users" value via CloudFormation on the AWS::Cognito::UserPool resource, or through some other method?
4
votes
1
answer
2k
views
AWS Cloudformation can not create stack when AWS::Cognito::IdentityPoolRoleAttachment resource has RoleMappings attribute
I'm trying to create my cognito resources through cloudformation. Below template works just fine;
AWSTemplateFormatVersion: 2010-09-09
Resources:
CognitoAuthRole:
Type: 'AWS::IAM::Role'
...
4
votes
2
answers
1k
views
How automate the logo for aws hosted UI
I have seen commands like this to setup a custom logo
aws cognito-idp set-ui-customization --user-pool-id us-XX-X_XXX --client-id ALL --css "xxx" --region us-XX-X_XXX --image-file logo.png
But I am ...
4
votes
1
answer
902
views
Using CloudFormation, how can I create an Identity Pool that authorizes based on User Pool roles?
I'm using Serverless Framework to handle my CloudFormation stuff. I'm building a User Pool with groups that have their own roles. I want to build my Identity Pool so that the Cognito provider setting ...
4
votes
1
answer
3k
views
Cloud Formation AWS::Cognito::UserPoolUser temporary password
I'm creating Cognito user using Cloud Formation template for Kibana cognito authentication. How to provide temporary password in the template?
4
votes
1
answer
2k
views
How to make Amplify CloudFormation aware of changes made outside of it
I ended up on a point that Amplify fails to push any change I made, with a non existent UserPool clientId exception.
Something like
Resource Name: XXXXXXXXXXX (AWS::Cognito::UserPoolClient) Event ...
4
votes
0
answers
585
views
SAM give access to Cognito
I want to be able to call cognito functions through boto3 from my Lambda function in Python environment. What's the best way to give this type of access? I've done the following yaml but not sure if ...
3
votes
2
answers
1k
views
Update EmailSubject and EmailMessage in Cloud Formation config file
Anyone know if I can set the Email Subject and Email Message fields in my cloud formation template config file?
It appears in the AWS documentation that those fields are not available.
3
votes
2
answers
8k
views
CloudFormation to Configure API Gateway Method to use Cognito Authorizer
I'm trying to define API Gateway resources using CloudFormation. Specifically, I'm attempting to create a template for an API Gateway Resource Method that authenticates using Cognito. I've created the ...
3
votes
2
answers
958
views
How to generate AWS CloudFormation using existing environments
I have existing AWS configuration
Api getway
RDS
EBS
EC2
Cognito
S3
aws Lambda
Now I want to create different environment like Dev, QA, UAT and Prod
Is there any option available in AWS or Open ...
3
votes
2
answers
3k
views
SAM Template - API Authorizor to use existing Cognito User Pool
UPDATE:
Thanks for the help!
I've updated the template.yml to include the Authorizer, but I'm getting an error still:
HelloWorldApi:
Type: AWS::Serverless::Api
Properties:
StageName: ...
3
votes
1
answer
1k
views
AWS CloudFormation - Any way to use an intrinsic function as an object key?
I have this role attachment resource that as is, deploys just fine:
CognitoIdentityPoolRoleAttachment:
DependsOn: [ CognitoIdentityPool, CognitoIdentityPoolAuthRole, CognitoIdentityPoolUnauthRole ]
...
3
votes
1
answer
268
views
Cloud Formation not working: SaaS-identity-with-Cognito Template
I'm getting the following error when I run the cognito quickstart stack:
Embedded stack arn:aws:cloudformation:eu-west-1:950742359761:stack/SaaS-identity-with-Cognito-IdentityStack-17TE8ATW0MEDM/...
2
votes
1
answer
3k
views
Cloudformation remove dashes from parameters
I'm trying to run a nested stack with the root stack that creates multiple resources including S3 buckets and a Cognito User Pool. The issue is:
S3 bucket name doesn't allow Capitalised letters.
...
2
votes
1
answer
2k
views
How to set verification attributes on AWS cognito with cloudformation?
I'm trying to set the verification attributes on a cognito user pool with cloudformation and I've been going through the documentation back and forth for quite some time now and I cannot find the ...
2
votes
1
answer
504
views
How to enable Cognito's "Attribute verification and user account confirmation" from cloudformation
I've been reading back and forth AWS documentations, but I am not able to find how to proper set the settings shown in the image below using cloudformation template. What I want to achieve is that, ...
2
votes
1
answer
419
views
API Gateway - Pass through proxy and AWS_IAM, not passing identity
I'm trying to create an API Gateway, which uses an AWS_IAM Authorizer, and using Amplify to sign in to my app using Federated Identities.
This all works fine, however I'm not getting an identity in ...
2
votes
1
answer
1k
views
Attaching Lambda Triggers to a Cognito UserPool in Cloudformation
I'm looking to customise the email message Cognito sends out to a new user when you call adminCreateUser()
I can see you do this via Lambda functions, eg -
https://docs.aws.amazon.com/cognito/latest/...