The variables required for verification are “region” and “userPoolId”. These are used to get the JWK. The JWK is used to create a public key (pem). Also, because JWK seems to rarely change, here I save the JWK into environment variable. You can get your JWK from the following URL.