private async void btnupdatepass_Click(object sender, EventArgs e) { try { CognitoHelper helper = new CognitoHelper(); await helper.UpdatePassword(txtusername.Text, txtcode.Text, txtnewpassword.Text); MessageBox.Show("Password updated."); } catch (Exception exp) { MessageBox.Show("Unable to update the password" + exp.Message); } }