AWS Development — Chalice Framework — 5 minutes for Lambda and API Gateway

  1. Quick deploy resources using integrated deploy tool
  2. Test code locally
  1. Developer — to quick test applications.
  2. Deployment in small environment
  • Windows Server with 2 remote users to login
  • No Inbound open ports in Security group — Y-e-e-h!
  • No VPN — Guess — this is from Step above
  • Outgoing connections are allowed.
  • Time zones PST/EST/CET — USA/Europe
  • 5 min is ok to start server
  • Server needs to be fast, and we need to save money — Y-e-e-h!
  • No server management from customer
  1. Deploy Lambda and API Gateway which will start/stop instance when users connect to server — this will save cost, as total server usage is not expected to be more than 12 hours.
  2. Configure customer side with SSM management plugin installed, and script to start server
  3. Stop EC2 instance when no user activity for an hour — script inside windows server

Implementation: Step 1

  • Docker container with Chalice installed — We are always using containers for Development environment. See Docker file
  • Start container
  • Edit app.py file:
  • Creating Authorizer which allows only IAM user to invoke API method
  • 2 functions to start/stop EC2 instances based on instance Id passed

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store