Configuring VPC and RDS via Cloudformation for AWS Lambda

in English, Tech

I have outlined the overall “project” and here is my notes on the RDS + VPC challange: Setting up RDS (and VPC) via CloudFormation The Serverless Framework has fields to include verbatim CloudFormation template data - but I found myself unable to figure out how to get the resulting connection information into my lambda function without running CloudFormation api calls to get outputs of a given CloudFormation stack either as plugin that repackages the zipfile of the lambda after the CloudFormation stack has executed or as seperate standalone stack where values are then available when the serverless framework deploys.

Running Python with Psycopg2 on AWS Lambda

in English, Tech

I have outlined the overall “project” and here is my notes on the psycopg2 challenge: Installing Psycopg and setting up logging In general - you need to include all dependencies when deploying the Lambda. I decided on an approach that included a “vendored” directory and do sys.path mangling. . ├── content │ ├── │ ├── │ └── ├── database -> ../database ├── ├── ├── lambdahelper.

Amazon Lambda, Serverless Framework, Python and RDS

in English, Tech

I’ve been playing around with the Serverless Framework for setting up a simple API which fetches either one piece of data from a database or a list of things. Setup I decided on using Amazon RDS PostgreSQL as the database and figured that would be a pretty standard thing to do but within the Serverless framework it’s apparently not done that often. AWS has got a tutorial so it’s not completely impossible.

Adding a view source link

in blog, english, programming

At the bottom of each of the blog posts I now have a See the source link. With hugo (and quite likely all other blog-enignes, what do I know?) this is pretty straight forward: Implementation For a site you can define global variables in config.toml and each Node, for example a post has both Frontmatter is available per “post”. All this is available in the templates which displays the content:

Lightbox Gallery Shortcodes

in English, hugo

In order to get the old wordpress posts image gallery to work (like CPH:Triathlon) I decided to take on some shortcodes. They look very much Jinja Macros which I know from my $dayjob - which might turn out to be a bit confusing. In essence my plan was to avoid too much boilerplate. At first i tried generalizing the wordpress markup into a shortcode but I found it a bit hard to get working.

Hugo, the Static Site Generator

in English, hugo, programming

So, years ago, Morten, provided me with a makefile and som m4 macros stuff and I played around with that for generating the pages for this blog back in the day. Then I switched back and forth between engines, and settled on wordpress for the last many years. But now Morten mentioned Hugo. I get the feeling that one of his hobbies is changing his blog-engine ;) That being said, who am I to talk?

CPH:Triathlon – Race report

in English, racerapport, triathlon

Intro So, my last race report is almost 3 years old by now. I’ve since then raced Ganløse famile tri september 9 2012, and Camilla Pedersen Duathlon October 2013 and lastly Herlev Olympic Tri May 2014. Herlev Olympic Camilla Pedersen Duathlon Camilla Pedersen Duathlon My daughter was born shortly after Hillerød Tri 2011 which of course naturally shifted priorities.

My favorite podcasts

in English, podcasts

Me and my bike I bike – alot. Training for triathlon and now also a 2x16km commute every day. Most of that time I listen to podcasts. For the toughest workouts I might switch to music, but most often I really enjoy the podcasts. I have been listening for podcasts for 4+ years and when I find something I like I get more or less zealous and dread the day when they stop (Im looking at you LugRadio!

Hillerød triathlon

in English, triathlon

Last year I got bitten by the triathlon bug during Copenhagen 4:18:4. Since then I started learning the front-crawl, more biking and consistent running. This spring I even joined KVIK Tri Team here at Amager and that really took my swimming up to a new level. Come april I bought a road bike: Giant Defy 1. Luckily I at the same time got a coworker bitten by the cycling bug so I had a friend to punish the roads with.