Every Lambda function I write starts in the same way: a bunch of code to unpack the event and then validate its contents. Sound familiar?
Moreover, I can never remember the exact key names for certain event payloads. How do I get the headers from an
ApiGateway event again? Is it
Oh right, it’s
multiValueHeaders. Of course it is.
So each new Lambda function I create starts off in a very similar way to every other Lambda function I create:
json.loadsto turn strings into dicts.
server.jsto use the certificate and require
You can create a certificate using OpenSSL with this command:
openssl req -x509 -out localhost.crt -keyout localhost.key \
-days 365 \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
This command will generate the certificate and the key:
reqthe command for…
Read on to find out why each of these principles has been chosen.
Registering and validating custom email addresses in Route53 and Simple Email Service (SES) doesn’t need to be difficult. But there is almost no documentation to show you how to do this easily. Here’s a simple solution.
Buying a Custom Domain via the Route53 console on AWS is really easy. They cost anything from $9 up. With help from some good documentation, you can be set up in a matter of minutes.
Once you have your domain, you can get up and running with a static website quickly as well. As static websites become more and more popular there are lots…
Setting up any personal machine is mostly about personal choice. The following are suggestions, based on my opinion. But, there’s lots of stuff here, see if you can find something that helps you. ✌️
Especially for my friend, Mark stevens.
Recent releases of Catalina have been somewhat problematic. Upgrading has caused some known issues with Wifi config, for instance. So before you go installing lots of tools and changing lots of configuration: upgrade to the latest OS Version.
🍏 > About This…
A fundamental principle of building systems in a serverless world is that your functions should do their job as quickly as possible. The longer functions run, the more they cost.
Regardless of what your Lambda functions are doing, in the majority of use cases, a big slice of the processing time will be spent sending data somewhere else.
If the goal is super-fast Lambdas; and sending data costs so much time, we should be trying to make this action as efficient as possible. The solution is batching data before sending.
I’ll cover the following topics:
I suspect the majority of contributors on Medium are like me. I’ve written this post for those people, sharing my experience over the past four months. I’ve learned a few things that have helped me write better, more quickly and with more fun.
This article isn’t the first Medium post about writing on Medium! There are so many it is a cliche. But many of these great stories are aimed at writers or aspiring writers.
I don’t consider myself a writer. Nor do I aspire to be a serious writer.
For me, writing is a hobby. It’s not part of…
If you’ve never used Continuous Delivery before, it can be an ominous prospect!
All those tools, all that tech, where do I even start!?
That is precisely how I felt when I first encountered Continuous Delivery. Like most things in Software Engineering (and life), the hardest step can be the first. That’s why I’ve written this guide to get you from rookie to continuous delivery in minutes! I’ve provided all the code and config that you’ll need.
A reliable, safe place to store your code is essential. Whether you are working alone or as part of a large team, source control will help you to manage your code.
When developing a new product, Software Engineers need to focus on the product. Concentrating on maintaining other services, like source control or delivery pipeline platforms is a waste of their time. AWS CodeCommit is a managed service, which means that Engineers do not have to spend time on maintaining or configuring it. It just works.
AWS provides excellent documentation for installing and configuring AWS CLI. For a more in-depth introduction to the tool, I recommend using their docs. This guide is a quick start, not a root and branch tutorial.
Install the tool using
pip. The installation can be done by opening up a terminal window and running:
pip3 install awscli --upgrade --user
This command will have
pip3 install the
awscli tool, upgrading any dependencies in the process. The
--user an argument ensures that the tool is installed against your user, instead of globally for the operating system.
Check the installed version by running
Principal Technical Architect @ ResponseTap (AWS Certified). Serverless First.