cdk-chalice Adds Support for Accessing Chalice-generated CloudFormation Resources
cdk-chalice 0.8.1 adds support for accessing AWS Chalice-generated CloudFormation resources as native CDK objects. It is useful if you need to explicitly reference these resources in the broader AWS Cloud Development Kit (AWS CDK) application, or customize the resources generated by Chalice. In this blog post, I will explain how this feature works and provide an example.
The new capability is based on the CDK cloudformation-include module, which was released as a developer preview in CDK 1.…
Thoughts on Interoperability Between AWS CDK, AWS SAM and AWS Chalice
Today, AWS has three frameworks to build infrastructure logic and runtime logic for applications based on Amazon API Gateway and AWS Lambda. These are the AWS Cloud Development Kit (AWS CDK), AWS Serverless Application Model (AWS SAM), and AWS Chalice. In this blog post, I will describe tradeoffs between some combinations of them.
To begin with, AWS recently announced the general availability of SAM CLI (v1.0.0). SAM CLI allows to locally invoke Lambda functions generated by CDK.…
Adapting Maslow's Pyramid to Personal Development
The software engineering world is constantly increasing in breadth and depth. There is so much to learn, and it is very challenging to prioritize what and when. Recently, I looked at Maslow’s hierarchy of needs in its pyramid form, and then an idea stroke me - personal development might be very much represented in a similar manner. The missing link for me was adding time sensitivity to the needs (i.e. priorities).…
Getting Things Done With Outlook and Asana
Nowadays, much of incoming (reactive) work arrives through email. In this post I want to share an approach I found efficient for myself to manage that work, in addition to proactive work. The process below builds on Getting Things Done time management method and the Eisenhower method for setting priorities.
This is the regular state of my Outlook inbox (except some outliers here and there of course 😊). I usually do one of the following actions when processing inbox, and then archive the email immediately:…
Automated Path From Hardcoded SQL Queries to SQLAlchemy ORM With Flask
Let’s assume you started by developing the database schema directly on the server (e.g. using MySQL Workbench) and used hardcoded SQL queries in the code (e.g. using one of Transaction Script, Domain Model or Logic in SQL approaches).
Then at some point you feel confident to use SQLAlchemy‘s Object-Relational Mapping (ORM) framework. On a side note, I highly recommend to read OrmHate article by Martin Fowler to get some perspective on when to use ORM frameworks.…
Organizing Flask-based Web API Directory Structure
Acknowledgements: This post was heavily influenced by Explore Flask book and series of Miguel Grinberg’s posts starting with Designing a RESTful API with Python and Flask.
Still, the above and most of the other examples I found usually refer to directory structure of frontend applications or very simple web APIs. It took me a while to build a big picture of how to build the directory structure of a web API with Flask, hence I thought it might be useful to share.…
Drilling Down to Amazon EC2 Instances Data Transfer Costs
The use case I would like to address in this post revolves around the need to understand which specific Amazon EC2 instances incur the highest data transfer charges, including high-level understanding of traffic flow (e.g. to/from Internet, inter-region, intra-region and etc.). For detailed analysis of traffic flow, I would recommend to use Amazon VPC Flow Logs – see Querying Amazon VPC Flow Logs in Amazon Athena (serverless query service) documentation.…
Bootstrapping Tcl Unit Testing With Tcltest
If you are working with Tcl, and interested in adding unit tests to your project using tcltest, read on.
Usually there is some bootstrap work required to run your unit tests. For example, every test should load the relevant libraries before using them in a test. There is also a need in a test runner that would execute the test suite and report results. Since there are several ways to implement the above, and there are some gotchas along the way, I thought it would be useful to provide a reference implementation.…
Using Couchbase Python SDK on Cloud Foundry
I wanted to use Couchbase as a session store for my app instances, and specifically Couchbase Python SDK. The problem I faced was that Couchbase Python SDK (and some of Couchbase other non-C SDKs) requires Couchbase C SDK to be installed a priori – it is not installed by pip automatically.
Sadly, Conda package manager doesn’t have Couchbase C SDK in its repository, so I could not use Cloud Foundry Python Conda buildpack to install it (it can be very useful to install SciPy for example, which is supported by Conda).…