In our series about building AWS APIs, we've covered a lot of ground around learning the AWS ecosystem. Now that we're all feeling a bit more comfortable, it may be time to let everybody in on the world's worst-kept secret: Almost nobody builds architecture by interacting with the AWS UI directly. There are plenty examples of how this is done,
Use Python and MySQL to Build an Endpoint
Now that you know your way around API Gateway, you have the power to create vast collections of endpoints. If only we could get those endpoints to actually receive and return some stuff.
We'll create a GET function which will solve the common task of retrieving data from a database. The sequence will look something like:
- Connect to the database
Building APIs: The final frontier of cool-stuff-to-do-in-AWS
In our last adventure, we ventured off to create our very own cloud database by using Amazon's RDS service. We've also briefly covered the general concept behind what Lambda functions. In case you've already forgotten, Lambdas are basically just chunks of code in the cloud; think of them as tiny virtual servers, which have already been configured (and locked down)
Forcefully use the Pandas library in your AWS Lambda functions
In one corner we have Pandas: Python's beloved data analysis library. In the other, AWS: the unstoppable cloud provider we're obligated to use for all eternity. We should have know this day would come.
While not the prettiest workflow, uploaded Python package dependencies for usage in AWS Lambda is typically straightforward. We install the packages locally to a virtual env,
Get familiar with AWS as we set the stage to make something awesome
There comes a surreal moment in nearly every profession in which perspective is violently forced into our own self-awareness. People with cooler jobs probably have that moment when they save their first patient, or launch their first rocket. For me, the idea of building an API was this moment in software development. All those past blackboxes which spat out results
Spinning up a standalone MySQL Database with Amazon
Last time we became familiar with the handiwork of setting up MySQL locally, navigating databases via command line, and exposing your database to external access. While badass, it has come to my attention that most people don't bother doing things this way. Unless you're getting deep into some heavy architecture, most people opt to use cloud services such as AWS