Upon further investigation, it seems that AWS has added a resendSignUpCode
function to their “aws-amplify/auth”
package that doesn't require a logged-in user to work. The implementation is as follows:
await resendSignUpCode({ username: email });
It works perfectly for me like this