Skip to content

How to update the already deployed cognito user pool from MFA Enabled to MFA disabled #623

Answered by cogwirrel
caopengau asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! Ahh this is a little tricky as if you create another user pool it'll have a different logical ID by default which means that CloudFormation will create a new resource. It's possible to override the logical ID of a resource, but that might get complicated if you need to deploy multiple stacks eg in a pipeline...

I think the simplest approach would be to override the the MFA configuration of the existing UserPool which is part of the UserIdentity construct.

First it's best to make sure you have a snapshot test so that you can verify the changes to the generated cfn template, ie:

import { App } from "aws-cdk-lib";
import { Template } from "aws-cdk-lib/assertions";
import { ApplicationStack

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by caopengau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants