Seamless payment integration in your webapp with Stripe, Amplify and DynamoDB (+ indexes)

Prelude If you miss the beginning of my series, here’s my article about how to build an e-learning platform on AWS. Otherwise, if you are following this serie, the last time we build our backend to safely serve our HLS contents (if you miss it, follow the link).If you want to sell premium content you can leverage Stripe to handle multiple payments. This article will delve into the mechanisms of leveraging AWS services and signed cookies to deliver premium content seamlessly. ...

September 10, 2023 · 6 min

AWS Amplify in 2023: the good, the bad, and the evil

Prelude Today I want to deep dive into how you can leverage AWS Amplify, a tool that provides a comprehensive set of tools and services that streamline the process of developing and deploying web applications on AWS infrastructure: we will explore how to build a web application served by AWS API Gateway and Lambda functions. We will walk through the steps of initializing an Amplify project, adding Lambda functions, linking them to an API, and implementing authentication mechanisms. ...

May 5, 2023 · 8 min

How to: create a fleet of container-based-go-lambda with one command

Introduction As you might know, at the re:Invent AWS recently announced the capabilities of running Lambda by getting the code directly from a docker image you provide, as illustrated here. Moreover, they also announced the Amazon ECR Public and Amazon ECR Public Gallery that you can reach at https://gallery.ecr.aws/. And this was pretty much my reaction: What you might need to know before begin First of all: keep calm, because there’s already a Github Repo to build an entire fleet of microservices - with their respective ECR-based repository - with only one command from the shell. Hopefully, you can get up and running by simply opening a shell, cloning my repo, change the AWS_PROFILE_NAME at the top of the Makefile to point to your profile, and run: ...

December 12, 2020 · 6 min

HAL: AWS s3-sns based single-slack-command bot to handle your VPC

Introduction I recently build a Slack command to help me handle actions on my VPC. The only thing you need is an AWS account - Free Tier it’s ok. I recently wrote about how to maximize resources, with particular focus on the number of hours you have in Free Tier - using specific CloudWatch Rules. In this article, I want to describe how I extended my architecture to invoke actions - potentially, all the action provided by Amazon Web Services official SDK(s) - with a single Slack command. I decided to call this slack command HAL because I think it’s a really dangerous command 😜 ...

March 24, 2018 · 10 min

JarvisButton: how to invoke multiple AWS Lambda with one AWS IoT Button (not Enterprise ed.)

Introduction If you have an AWS account in Free Tier, bla bla bla ok stop: I am a AWS Lambda maniac. I only wrote about them (here, here). In this article, I want to talk about my new purchase that is - of course - related to AWS Lambda: the AWS IoT Button. It first made its appearance on the IoT scene in October of 2015 at AWS re:Invent with the introduction of the AWS IoT service. That year all re:Invent attendees received the AWS IoT Button providing them the opportunity to get hands-on with AWS IoT. So cute. Since that time, AWS IoT button has been made broadly available to anyone interested in the clickable IoT device. Here it is! 😎😎😎 ...

March 18, 2018 · 7 min

AWS Free Tier, Docker and Jenkins: smart resources handling with CloudWatch Events and Slack

Introduction If you have an AWS account in Free Tier, you have (updated: March, 13th 2018) 750 hours/month to run EC2 (small ones) in your VPC. You also have a lot of other resources, such as AWS Lambda functions (I wrote about them here and here) and CloudWatch Events. In this article, I talk about smart resources handling and some trick - actually, not so smart XD - I setup to take the best from the services. Attention!!! Picture Spoiler ...

March 11, 2018 · 10 min

Node.js, DynamoDB, and AWS Step Functions to collect <em>sentimented</em> movie reviews

Introduction Recently I worked with AWS Lambda and API Gateway to extend my set of personal APIs and collect information from several sources. I wrote an article on that (if you want to have a look). In this article I will talk about the AWS Step Functions service that enable create finite states machines to easy coordinate the components of distributed applications and microservices using visual workflows. Why AWS Step Functions? Because they let me create a tool to gather movie titles in teather, search for reviews about each of them and make a basic sentiment analysis over the review to help me decide what’s worth watching at teather and what’s worth waiting for on Netflix :D More in general, with AWS Step Functions, you can build applications made of individual components that each perform a discrete function: this lets you scale and change applications quickly. Step Functions is a reliable way to coordinate components and step through the functions of your application. They provides a graphical console to arrange and visualize the components of your application as a series of steps. This makes it simple to build and run multistep applications. Step Functions automatically triggers and tracks each step, and retries when there are errors, so your application executes in order and as expected. Step Functions logs the state of each step, so when things do go wrong, you can diagnose and debug problems quickly. ...

March 5, 2018 · 20 min

AWS Lambda, GoLang and Grafana to perform sentiment analysis for your company / business

Introduction In this article I will talk about my experience with AWS Lambda + API Gateway, GoLang (of course) and Grafana to build a sentiment analysis tool over customizable topics. Who should you read this post? Don’t know, maybe a CIO, a CTO, a CEO, a generic Chief or a MasterChef, for sure an AWS and GoLang fan like me. First of all: to better understand how to use Elasticsearch, read my previous post Elasticsearch over My home Network Attached Storage: it’s not so exciting as it seems, but you will have a general idea about what is Elasticsearch and how can you use it. Second: if you don’t know about AWS Lambda, study it. I personally believe that it represents one of the most interesting services currently offered by AWS: as they state, AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume and there is no charge when your code is not running. The amazing thing is that with a Free Tier trial you have 1 milions requests for free - O.O - to run code of any type of application or backend service - all with zero administration: you just upload your code - unfortunately the online editor for GoLang is not supported yet - and AWS Lambda1 takes care of everything required to run and scale your code with high availability. You can even set up your code to automatically trigger from other AWS services - as I have done with API Gateway - or call it directly from any web or mobile app. And…last but definetly not the least, why I’m writing this post!? Because starting from 15 January 2018, AWS Lambda support GoLang!!! ...

January 30, 2018 · 12 min