The brief was simple enough — “we have a small Flask application that needs a protected area, we’d rather not roll our own so we’re thinking Cognito could work well”. It’s a smart idea, why go to the hassle of building your own authentication service when the boffins at AWS have done the thinking for you?
But integrating Cognito into a Flask app turned out to be one of those things that is really easy once you know how, but frustrating until it all clicks together. Of course this isn’t helped by the fact that I could barely spell JWT before I started looking at this, and I know more about the lifecycle of the Amazonian Woo Woo Bird than I do about front end stuff like Javascript!
#flask #aws #python #serverless #cognito