I kicked off a CodeStar project for a Node based serverless web service. Simple API Gateway with a Lambda behind it.
All good and simple, but configuring the Lambda to run in a VPC proved to be a very challenging task!
The error I got was: The provided execution role does not have permissions to call CreateNetworkInterface.
The internet is filled with suggestions (and many more).
But apparently I’m the first one who bumped into a new root cause…
So if you’re in the same situation then the keyword to the solution is Permission Boundaries!
Quoting the docs: A permissions…
Using JS to dynamically change the details of a transaction processed by Simplify’s hosted payment service, after page already loaded — you need to change how you load the Simplify JS script. See a working LIVE solution at https://www.kipanga.com.au/make-payment.html (don’t test on this page — it will charge your credit card for real).
The above solution also has the smarts to pickup invoice number and amount from the URL — this is useful if you want to link to this payment page from an invoice you sent to a client and pre-populate those fields based on information coming from the…
TL; DR; simple extension for Magento 2 that allows you to change Magento 2 SMTP settings. Link at the bottom.
Every time I set up a new Magento 2 website on an AWS EC2 instance, there comes the moment that I need to configure the SMTP settings. It’s never an easy task to configure Magento to use AWS SES SMTP interface. Not sure why, but the Magento team insists on making this a hard exercise. And every time I do this I tell myself I should make an extension out of this. But somehow it never happens. …
I’ve released an updated version with additional features:
A nice serverless solution for easily opening access to EC2 instances. Skip to the flowchart to see how this all works. A GitHub link is also somewhere down there. Enjoy.
You’re at Re:Invent conference, enjoying the talks, the drinks and the company. You’re sitting in a talk about a…
Use the below instructions to create an IAM user and policy to restrict your QNAP to access only what it needs instead of all your S3 buckets. Use the newly created user’s access/secret keys when setting up QNAP’s S3 Plus app.
A few months ago I bought myself a new NAS — the QNAP TS-251+.
I’m very impressed with everything you can do with it and very quickly it turned into a central component at our home:
s3fs isn’t new. There’s been quite a lot of talk about it already. What I did find missing though was how to configure it to mount on boot. There’s some references to it in the FAQ, but that didn’t work for me. So I figured there’s room to write a quick post about this.
Maybe it’s because I’m using a particular OS, not sure. Anyway, here is a quick recap of my adventure and victory with S3FS on Amazon Linux!
Quoting from s3fs Github README.md:
s3fs allows Linux and Mac OS X to mount an S3 bucket via FUSE. s3fs…
There are many examples out there, but I couldn’t find a single spot that centralises it all and is aligned with the AWS documentation. The below tips highlight what I feel is kinda odd, isn’t fully covered in the docos or simply requires some attention. I hope this will be helpful to someone! :)
Great! Here we go:
There are out of date tutorials out there. They use Custom Resources (“Custom::*”), which for most cases aren’t necessary anymore. CloudFormation (CF from now on) supports API Gateway (APIG) and it’s likely that the native CF APIG resources will be…
Last week one of my clients asked me to build for them a landing page for a conference they were organising. All they needed was a page with some info about the conference and a “contact us” form. They also advised that they were planning a promotion campaign 3 weeks before the conference takes place, so this mini-site should be able to handle the expected traffic spikes.
I decided to tackle that using a serverless approach — no server provisioning, don’t worry about peaks and pay only when traffic comes. Nice!
This is a follow up on my previous post about mapping error messages from AWS Lambda to an API-GW HTTP client.
So you’ve mapped your Lambda errors to proper HTTP status codes. You also cleaned the error message and added it to the response body. All seems in place. BUT — it doesn’t work — the response body doesn’t make it to the client.
Checking the developer tools in your favourite browser confirms the response body isn’t there. Trying to access it using the API Gateway JS SDK returns empty string as well..
To make it even more confusing —…
UPDATE — don’t miss the follow up which deals with not being able to read errors HTTP response body.
There are quite a few articles out there about how to map lambda errors in API-GW so that we can pass detailed errors to the client. Here’s my take on how to do this when your lambda is developed in Java.
It’s important to be aware of how Java based lambdas pass error details — unlike Node where you’d define a JSON with the error details and invoke context.fail(), in Java this method doesn’t exist and we rely on exceptions. Exception…
I love building stuff