Unfortunately, you can't use the AWS Cognito API to resend verification codes. Unfortunately, this is a limitation of the API and not something that can be changed. However, there are some ways you can get around this.
First, you can implement a resend link/button on your front end and set up a Lambda function that will send a verification code to the user upon them clicking the resend link. This way, the user can control when a verification code is sent to them.
Second, if you are using an SNS topic within your Cognito user pool, you can have the SNS topic resend the verification code by using an SNS subscription filter.
Overall, while the Cognito API doesn't allow you to resend verification codes, there are still some options to get around this limitation, and get your users the verification codes they need.