How to Run AWS Lambda every 10 sec

Recently I had a requirement at work to run a cron job every 10 sec or 30 sec to poll some third-party API to pull some data. There will be more than 40 of these cron parallelly to fetch different sets of data from different APIs. The first obvious option would come to a serverless first mindset which I have is to run these on lambda functions. The only native way in AWS to run the Lambda function is to have an Event bridge trigger with Cron expressions....

February 18, 2023 · 3 min · Vishnu Prasad

How to set up AWS RDS Proxy with IAM Authentication enabled to Aurora Serverless V2 Cluster

What is RDS Proxy Many applications, including those built on modern serverless architectures, can have many open connections to the database server and may open and close database connections at a high rate, exhausting database memory and compute resources. Amazon RDS Proxy allows applications to pool and share connections established with the database, improving database efficiency and application scalability. With RDS Proxy, failover times for Aurora and RDS databases are reduced by up to 66%, and database credentials, authentication, and access can be managed through integration with AWS Secrets Manager and AWS Identity and Access Management (IAM)....

August 12, 2022 · 6 min · Vishnu Prasad

Cloudwatch Custom Metrics With CloudWatch Embedded Metric Format

Introduction Cloudwatch is an integral part of the AWS ecosystem. Every service in AWS reports to cloudwatch for the service logs, application logs, metrics, etc. In this article let’s discuss the cloudwatch custom metrics in detail. Metrics help us with finding the performance of the AWS services and the applications we run using these services. It also allows us to visualize the data with graphs and dashboards and create alarms based on the data reported tho metrics....

August 17, 2021 · 6 min · Vishnu Prasad

AWS SQS With Lambda, Partial Batch Failure Handling

Update Nov 23, 2021, My wish I mentioned at the end of this blog has been granted by AWS 🥳. AWS Lambda now supports partial batch response for SQS as an event source. Find the announcement here. I have written a new article on how to do it here https://vishnuprasad.blog/posts/aws-sqs-lambda-partial-batch-failure-improved-way/ Amazon Web Services released SQS triggers for Lambda functions in June 2018. You can use an AWS Lambda function to process messages in an Amazon Simple Queue Service (Amazon SQS) queue....

February 23, 2021 · 4 min · Vishnu Prasad

Decoupling Application configuration from application code in your serverless application with AWS Appconfig

The easiest and most common way of adding application configurations(Eg: feature toggle flags, secrets, fallback URLs, etc) with your serverless applications is by setting them as lambda environment variables. These variables are set to the lambda functions from a configuration file in your code (eg: serverless.yml) or read from secrets manager or parameter store etc and exported during the deployment on your CICD pipeline. The problem with this approach is, suppose you have a serverless application that has multiple lambda functions under it....

February 14, 2021 · 7 min · Vishnu Prasad