Matt, HTTP error 405 implies Twilio is making a PUT request that your Flask server endpoint cannot handle. Your code appears correct with:
@app.route(“/”, methods=[‘GET’, ‘POST’])
It’s possible that your Twilio WEBBOOK is pointing to some incorrect endpoint. Double-check that your Twilio Webhooks/TwiML setting is pointing to the address/port you deployed. Try calling it yourself to make sure a PUT call goes through.