<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on Andrea Falzetti</title><link>https://falzetti.me/blog/</link><description>Recent content in Blog on Andrea Falzetti</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><lastBuildDate>Sun, 12 May 2019 12:14:34 +0600</lastBuildDate><atom:link href="https://falzetti.me/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>AWS Lambda: TypeError: Wrong arguments</title><link>https://falzetti.me/blog/2024/05/02/AWS-Lambda-TypeError-Wrong-arguments/</link><pubDate>Thu, 02 May 2024 22:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2024/05/02/AWS-Lambda-TypeError-Wrong-arguments/</guid><description>I&amp;rsquo;ve faced the following error for a few hours, until I realized how simple the solution was.
2024-05-02T20:03:06.574Z b8a190ca-89fd-4dc5-a277-a0fa06b35091 ERROR Invoke Error { &amp;#34;errorType&amp;#34;: &amp;#34;TypeError&amp;#34;, &amp;#34;errorMessage&amp;#34;: &amp;#34;Wrong arguments&amp;#34;, &amp;#34;stack&amp;#34;: [ &amp;#34;TypeError: Wrong arguments&amp;#34;, &amp;#34; at RAPIDClient.postInvocationResponse (file:///var/runtime/index.mjs:434:27)&amp;#34;, &amp;#34; at complete (file:///var/runtime/index.mjs:811:16)&amp;#34;, &amp;#34; at done (file:///var/runtime/index.mjs:835:11)&amp;#34;, &amp;#34; at succeed (file:///var/runtime/index.mjs:839:9)&amp;#34;, &amp;#34; at file:///var/runtime/index.mjs:872:20&amp;#34;, &amp;#34; at process.processTicksAndRejections (node:internal/process/task_queues:95:5)&amp;#34; ] } After checking line by line, I noticed that I was accessing an environment variable that was not definied.</description></item><item><title>AWS Lambda: Lessons learned over 5 years and 100 functions in production</title><link>https://falzetti.me/blog/2023/03/30/AWS-Lambda-Lessons-learned-over-5-years-and-100-functions-in-production/</link><pubDate>Thu, 30 Mar 2023 23:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2023/03/30/AWS-Lambda-Lessons-learned-over-5-years-and-100-functions-in-production/</guid><description>At onoranzefunebricloud.com we provide funeral agencies with digital solutions to do their best work, and to build such complex tools we use a combination of AWS services including dockerized applications in Fargate and lot of Serverless tools such as Lambda.
Over the years, as we introduced more functionalities we&amp;rsquo;ve also grown our usage of Lambda, and as of today we count over 100 Lambda functions in production.
In this post I want to share the lessons learned, the good and the bad.</description></item><item><title>Combining Node.js and Python in a Single AWS Lambda Function</title><link>https://falzetti.me/blog/2023/03/16/Combining-Node.js-and-Python-in-a-Single-AWS-Lambda-Function/</link><pubDate>Thu, 16 Mar 2023 22:53:00 +0000</pubDate><guid>https://falzetti.me/blog/2023/03/16/Combining-Node.js-and-Python-in-a-Single-AWS-Lambda-Function/</guid><description>Recently, I encountered a situation where I needed to run a Python script from a Node.js runtime using AWS Lambda.
AWS supports several runtimes for Lambda including Node.js, Python, Java, .Net, Go, Ruby and also Custom Runtime.
In my case I was already using nodejs16.x which of course, does not come with Python installed. After cosindering using Lambda layers or trying to compile the .py script into some stand-alone binary (which failed due to missing Python dependencies on the Lambda anyway), I&amp;rsquo;ve decided to give a try to the Custom Runtime.</description></item><item><title>Hello Gitpod</title><link>https://falzetti.me/blog/2022/04/22/Hello-Gitpod/</link><pubDate>Fri, 22 Apr 2022 17:17:00 +0000</pubDate><guid>https://falzetti.me/blog/2022/04/22/Hello-Gitpod/</guid><description>I meant to write this blog post a month ago, but&amp;hellip; life happened :)
I generally write technical articles on my blog rather than talking about my personal life, but 4 years ago, I wrote Hello DAZN, and I want to keep up with the tradition, so&amp;hellip; Hello Gitpod 🧡
At the beginning of March this year, I&amp;rsquo;ve joined gitpod.io ✨
I&amp;rsquo;ve spent the last few years at DAZN, focusing on DevX (Developer Experience), empowering fellow engineers to get their job done smoothly and efficiently.</description></item><item><title>Deploying GFPGAN to AWS using Docker and Fargate</title><link>https://falzetti.me/blog/2022/01/17/Deploying-GFPGAN-to-AWS-using-Docker-and-Fargate/</link><pubDate>Mon, 17 Jan 2022 20:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2022/01/17/Deploying-GFPGAN-to-AWS-using-Docker-and-Fargate/</guid><description>This post aims to help you deploy GFPGAN on AWS using ECS Fargate.
What is GFPGAN?! I&amp;rsquo;ve recently discovered this fantastic Machine Learning project trained and designed to restore faces.
The project&amp;rsquo;s headline is:
GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.
In short, given a blurred, damaged, or low-quality photo of a person&amp;rsquo;s face, the algorithm it&amp;rsquo;s able to restore the face and improve its quality.</description></item><item><title>How to stream CloudWatch logs to Elasticsearch without custom code</title><link>https://falzetti.me/blog/2022/01/10/How-to-stream-CloudWatch-logs-to-Elasticsearch-without-custom-code/</link><pubDate>Mon, 10 Jan 2022 20:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2022/01/10/How-to-stream-CloudWatch-logs-to-Elasticsearch-without-custom-code/</guid><description>Intro In this post, I want to share the approach I have been using to ship logs from AWS CloudWatch to Elasticsearch without writing a single line of code.
My use case In my side-project, I use a combination of Lambdas and Fargate tasks which both write JSON-formatted logs to CloudWatch.
I use CloudWatch to debug application errors while I use Elasticsearch for storing custom events such as User Actions (e.</description></item><item><title>How to configure ECS Fargate Scheduled Autoscaling</title><link>https://falzetti.me/blog/2021/08/25/How-to-configure-ECS-Fargate-Scheduled-Autoscaling/</link><pubDate>Wed, 25 Aug 2021 07:35:00 +0000</pubDate><guid>https://falzetti.me/blog/2021/08/25/How-to-configure-ECS-Fargate-Scheduled-Autoscaling/</guid><description>You are looking at configuring ECS Fargate scheduled autoscaling, and you&amp;rsquo;re feeling a bit lost?
That&amp;rsquo;s how I felt a few days ago. To set this up, I struggled for a couple of days. Unfortunately, the documentation and examples I found online didn&amp;rsquo;t help me much, so once I figured it out, I decided to share a working code example using Terraform.
To be on the same page, in this post, I am assuming that you know what you are doing, and you are aware that there are different methods of autoscaling.</description></item><item><title>My notes from dotCSS &amp; dotJS 2018</title><link>https://falzetti.me/blog/2018/11/21/My-notes-from-dotCSS-dotJS-2018/</link><pubDate>Wed, 21 Nov 2018 00:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2018/11/21/My-notes-from-dotCSS-dotJS-2018/</guid><description>For the third year in a row I have attended the largest JavaScript conference in Europe: dotJS. This time I travelled with my amazing collagues from DAZN and we had a blast!
In this short blog post I want to share a few of the things that I learnt during the event which I think it&amp;rsquo;s worth sharing with you.
Variable fonts View the source in CodePen
What&amp;rsquo;s a variable font?</description></item><item><title>Tools to boost your DX</title><link>https://falzetti.me/blog/2018/04/17/Tools-to-boost-your-DX/</link><pubDate>Tue, 17 Apr 2018 00:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2018/04/17/Tools-to-boost-your-DX/</guid><description>Whether you are working on the back-end or the front-end, having the right tool for the job, can really make a difference some times.
With this blog post, I want to share with you some of the tools that I use pretty much every day and I believe can be useful to any software developer.
TL;DR
jq, yq, xq HTTPie Choosy Ag Trailer jira shpotify now Dash duet 1. jq, yq, xq Handle JSON, YAML and XML in the terminal jq, yq and xq are command line tools that allow you dealing with JSON, YAML and XML documents directly from your shell.</description></item><item><title>Hello DAZN</title><link>https://falzetti.me/blog/2017/11/01/Hello-DAZN/</link><pubDate>Wed, 01 Nov 2017 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/11/01/Hello-DAZN/</guid><description>Today, I am happy to announce that I have joined DAZN (pronounced &amp;ldquo;Da Zone&amp;rdquo;), a revolutionary sports streaming service.
After four years of service at Activate, I have decided to try a different experience. In my time at Activate, as a developer, I had the opportunity to learn and grow a lot. Activate provided me with an extraordinarily flexible and challenging environment. Working with their clients and partner startups was a chance to strengthen my skills, learning every day, experimenting and introducing new technologies to the team.</description></item><item><title>Building an accessible and re-usable React Component</title><link>https://falzetti.me/blog/2017/10/18/Building-an-accessible-and-re-usable-React-Component/</link><pubDate>Wed, 18 Oct 2017 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/10/18/Building-an-accessible-and-re-usable-React-Component/</guid><description>In one of my recent posts I talked about how I have introduced Storybook to the team and how we adopted it in our development lifecycle.
In this article, I want to share with you, my experience building an accessible custom input React component and how I found Storybook a useful dev tool that helped me achieve my goal.
Let&amp;rsquo;s start!
Challenge 🤓 In this project, several views are sharing a similar piece of UI, a box with an icon and some text.</description></item><item><title>The Picasso code</title><link>https://falzetti.me/blog/2017/10/09/The-Picasso-code/</link><pubDate>Mon, 09 Oct 2017 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/10/09/The-Picasso-code/</guid><description>Recently, I have been reviewing the following JavaScript code, and I found so many issues that I have decided to discuss them here. First of all, I am not trying to embarrass anyone, so I am not mentioning where this comes from. With this post, I want to use bad examples to promote and remind all of us, including myself, to use common sense and best practices when it comes to writing new code.</description></item><item><title>Elastic{ON} Tour London 2017</title><link>https://falzetti.me/blog/2017/06/22/ElasticON-Tour-London-2017/</link><pubDate>Thu, 22 Jun 2017 22:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/06/22/ElasticON-Tour-London-2017/</guid><description>Elastic{ON} Tour 2017 was held today in London at The Brewery, and I had the chance to attend it. The Elastic team has done a great job in organising the event, and I would like to thank them for the beautiful day. The location and catering were great, and so was the training Lab on Timelion, pronounced &amp;ldquo;Timeline&amp;rdquo;, is a Kibana module that helps to visualise time series data.
The day started with an introduction to Elastic, followed by an hands-on training on Time Series with Timelion for about 45 minutes.</description></item><item><title>Bundling React 15, Bootstrap 4, Storybook 3 with Webpack 2</title><link>https://falzetti.me/blog/2017/05/30/Bundling-React-15-Bootstrap-4-Storybook-3-with-Webpack-2/</link><pubDate>Tue, 30 May 2017 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/05/30/Bundling-React-15-Bootstrap-4-Storybook-3-with-Webpack-2/</guid><description>How many times did it happen to you that you were debugging some code and at the end of the day you didn&amp;rsquo;t manage to find a solution? How frustrating is that?
Good news is, you will feel so much better when you find the solution to your issue and everything will look easier. Your skills have just levelled up.
Today, it was one of those days for me. I have spent long hours trying to make something work, and I eventually found a solution, so I thought it was a good thing to share it with the community.</description></item><item><title>Datadog PNG snapshot not showing</title><link>https://falzetti.me/blog/2017/04/17/Datadog-PNG-snapshot-not-showing/</link><pubDate>Mon, 17 Apr 2017 19:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/04/17/Datadog-PNG-snapshot-not-showing/</guid><description>Issue If you are here, you have probably experienced the same issue I did using the Datadog programmatic API v1 to generate PNG snapshot of your metrics.
I have integrated Datadog metrics in Slack using snapshots and incoming webhooks as shown below:
The problem I was facing was that the image was missing or simply not displaying! But, whenever I opened the URL of the snapshot in the browser or using the Slack Message Builder there!</description></item><item><title>Building an extensible Chat Bot using JavaScript &amp; YAML</title><link>https://falzetti.me/blog/2017/01/08/Building-an-extensible-Chat-Bot-using-JavaScript-YAML/</link><pubDate>Sun, 08 Jan 2017 13:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2017/01/08/Building-an-extensible-Chat-Bot-using-JavaScript-YAML/</guid><description>In this post, I will share with you my experience in designing and coding an extensible chat bot using YAML and JavaScript. I will show you that it&amp;rsquo;s not always required to use AI, ML, or NPL to make a great bot. This won&amp;rsquo;t be a step-by-step guide. My goal is to give you an overview of a project like this and inspire you to build your own.
…
Read the full article on PacktPub.</description></item><item><title>How to build a JavaScript Microservices platform</title><link>https://falzetti.me/blog/2016/12/31/How-to-build-a-JavaScript-Microservices-platform/</link><pubDate>Sat, 31 Dec 2016 08:30:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/12/31/How-to-build-a-JavaScript-Microservices-platform/</guid><description>Microservices is one of the most popular topics in software development these days, as
well as JavaScript and chat bots. In this post, I share my experience in designing and implementing a platform using a microservices architecture. I will also talk about which tools were picked for this platform and how they work together. Let’s start by giving you some context about the project.
…
Read the full article on PacktPub.</description></item><item><title>How to fix broken base64 image using image-webpack and file-loader</title><link>https://falzetti.me/blog/2016/11/11/How-to-fix-broken-base64-image-using-image-webpack-and-file-loader/</link><pubDate>Fri, 11 Nov 2016 12:45:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/11/11/How-to-fix-broken-base64-image-using-image-webpack-and-file-loader/</guid><description>Challenge If you are here, you are probably trying to setup webpack in order to handle your images. The problem I was experiencing and tyring to document here is, after installing image-webpack and file-loader and using &amp;lt;img src={require('logo.png')}/&amp;gt; the browser was displaying a broken image (encoded in base64).
I have followed this article written by David which helps setting up webpack and image-webpack-loader, the problem I had was that the browser was displaying a broken image so after a little research I&amp;rsquo;ve found webpack/file-loader/issue/35 which explains the reason of this.</description></item><item><title>Serverlessconf London 2016</title><link>https://falzetti.me/blog/2016/10/31/Serverlessconf-London-2016/</link><pubDate>Mon, 31 Oct 2016 23:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/10/31/Serverlessconf-London-2016/</guid><description>ServerlessConf London 2016 First of all, I have to thank the @AWSUserGroupUK meetup group for giving me the great opportunity to join this amazing conference.
It has been the rd edition of the ServerlessConf, the first was held in New York , the second in Tokyo and this in London .
The main sponsor was certainly Amazon so we have seen a lot of AWS stuff but besides sponsoring the event they have also done most of the effort so far in providing serverless solutions to the market.</description></item><item><title>Render ES6 javascript template literals contained in a variable</title><link>https://falzetti.me/blog/2016/10/22/Render-ES6-javascript-template-literals-contained-in-a-variable/</link><pubDate>Sat, 22 Oct 2016 00:32:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/10/22/Render-ES6-javascript-template-literals-contained-in-a-variable/</guid><description>Challenge In the current project I&amp;rsquo;m working on, at Activate, I am using node.js and I have variables coming from a yaml file that contain ES6-like template literals, for example:
messages: - &amp;#34;Hey, ${user.name}, how are you feeling today?&amp;#34; - &amp;#34;What&amp;#39;s the weather like in ${user.profile.city}?&amp;#34; and I need to render the variables before sending the message to the client. As you might know, template literals, in order to be rendered need to be wrapped by backtick quotes, for example:</description></item><item><title>Randomize variables in a string in javascript</title><link>https://falzetti.me/blog/2016/10/21/Randomize-variables-in-a-string-in-javascript/</link><pubDate>Fri, 21 Oct 2016 12:15:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/10/21/Randomize-variables-in-a-string-in-javascript/</guid><description>Challenge I have a string that looks like:
[Hi|Hello|Hey] ${user.name}! Would you like to [go for a walk|to the park]?
I need to render the text randomising the action (go for a walk or to the park) so that the message looks slightly different every time that is sent. Each block of square brackets could contain N variables (eg. [walk|run|swim|play tennis]) and each message can contain multiple blocks of random substrings.</description></item><item><title>New plugin for Passwordless.net based on Node-Cache</title><link>https://falzetti.me/blog/2016/06/05/New-plugin-for-Passwordless.net-based-on-Node-Cache/</link><pubDate>Sun, 05 Jun 2016 19:58:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/06/05/New-plugin-for-Passwordless.net-based-on-Node-Cache/</guid><description>Yesterday I&amp;rsquo;ve published my first npm package and I&amp;rsquo;m feeling quite proud. I&amp;rsquo;ve been programming in NodeJS for a few months now and I have to say, I love the concept behind npm. The fact that you can rely on a bunch of packages ready to be used, installable in few seconds that are often really well written, tested and documented and last but not least open-source, is just great.</description></item><item><title>How to create a smart Slack Bot in Node.js</title><link>https://falzetti.me/blog/2016/04/04/How-to-create-a-smart-Slack-Bot-in-Node.js/</link><pubDate>Mon, 04 Apr 2016 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/04/04/How-to-create-a-smart-Slack-Bot-in-Node.js/</guid><description>The challenge here was creating a bot able to schedule events. Part of our internal tools at Activate Media, PlannerBot, so it has been named, is now a member of our team. He currently lives in Slack, online 24/7 for 365 days of the year, programmed with the idea in mind that one day he could be moved to Facebook Messenger, Skype, or any other messaging platform.
Demo In this case I give a partial information, so the bot will ask me the missing details.</description></item><item><title>How to create a simple Slack Bot in Node.js</title><link>https://falzetti.me/blog/2016/03/22/How-to-create-a-simple-Slack-Bot-in-Node.js/</link><pubDate>Tue, 22 Mar 2016 09:00:00 +0000</pubDate><guid>https://falzetti.me/blog/2016/03/22/How-to-create-a-simple-Slack-Bot-in-Node.js/</guid><description>In this post I want to help you creating a simple Slack bot with Node.js.
Slack has created two different integrations methods, Incoming/Outcoming Webhooks and Bot Users. If you are interested in the latter case, please read my article about Creating a Slack User Bot.
In this article, we are going to integrate the Slack Incoming Webhooks which allows you to send data into Slack in real-time.
The application created in this example reads the events from a calendar and sends the daily events to a Slack channel.</description></item></channel></rss>