Using Pulumi with AWS SQS and Lambdas

Cyrus Najmabadi Cyrus Najmabadi

Two weeks ago Amazon added Simple Queue Service (SQS) as a supported event source for Lambda. SQS is one of AWS’s oldest services, providing access to a powerful message queue that can do things like guarantee messages will be delivered at least once, or messages that will be processed in the same order they were received in. Adding SQS as a supported event source for Lambda means that now it’s possible to use SQS in a serverless computing infrastructure, where Lambdas are triggered in response to messages added to your SQS queue. Now, instead of needing some sort of Service dedicated to polling your SQS queue, or creating Simple Notification Service (SNS) notifications from your messages, you can instead just directly trigger whatever Lambda you want.

Read more →

Build your first serverless app using only JavaScript

Marc Holmes Marc Holmes
Build your first serverless app using only JavaScript

In this tutorial, we’ll use Pulumi, to build a complete serverless application using JavaScript. When we say ‘using only JavaScript’, we’re not kidding:

  • write code just like an Express app… but end up with a fully deployable serverless app
  • lambdas are… just lambdas
  • no YAML required… freedom from indentation
  • all the features of the V8 runtime… async await ahoy
  • all the behaviors of immutable infrastructure as code tools… but we really mean ‘as code’

Pulumi also supports containers (including Kubernetes), managed services, infrastructure and everything else in between that you might need for building cloud applications. Better than that, you can even combine them all in the same program.

Read more →

How we use Pulumi to build Pulumi

Luke Hoban Luke Hoban
How we use Pulumi to build Pulumi

Here at Pulumi we are (perhaps unsurprisingly!) huge fans of using Pulumi to manage our cloud infrastructure and services. We author our infrastructure in strongly-typed programming languages, which allows us to to benefit from rich tooling - documenting and factoring our infrastructure using the same software engineering practices we apply to our application code. This also allows us to create reusable abstractions which accelerate our ability to deliver new features and services, and our ability to standardize and refactor infrastructure patterns across our services with relative ease. 

Like other users, we use Pulumi at a variety of levels of abstraction. We use Pulumi for raw infrastructure provisioning, defining the core networking layer for our AWS-based backend infrastructure. And we use Pulumi to define how our application services are deployed into ECS using just a few lines of code. Pulumi hosts and manages static content for www.pulumi.com and get.pulumi.com. We use Pulumi to define the CloudWatch dashboards connected to our infrastructure. And for monitoring, Pulumi defines metrics and notifications/alarms in PagerDuty and Slack.

Best of all, we’ve been able to take things we’ve learned from these use cases, and others we’ve worked with beta users on over the last few months (thank you!), and factor common patterns out into reusable libraries like @pulumi/aws-infra and @pulumi/cloud for ourselves and others to build upon.

In this post, we’ll do a deeper dive into each of these use cases, highlighting unique aspects of how we use Pulumi itself, and some of our engineering processes around how we integrate Pulumi into the rest of our toolchain.

Read more →

Code, Deploy, and Manage a Serverless REST API on AWS with Pulumi

Donna Malayeri Donna Malayeri
Code, Deploy, and Manage a Serverless REST API on AWS with Pulumi

Pulumi makes it easy to build serverless applications and connect to other cloud resources. In this blog post, we’ll create a simple REST API that counts the number of times a route has been hit, using JavaScript to define both the infrastructure and application code. In Pulumi, you define your application infrastructure in regular code, using JavaScript, Python or Go, and you can target AWS, Azure, GCP, or Kubernetes. The Pulumi command line tool transforms your into a declarative plan, following the best practices of immutable infrastructure.

Read more →

Build a Video Thumbnailer with Pulumi using Lambdas, Containers, and Infrastructure on AWS

Donna Malayeri Donna Malayeri
Build a Video Thumbnailer with Pulumi using Lambdas, Containers, and Infrastructure on AWS

Pulumi makes it easy to build cloud applications that use a combination of containers, lambdas, and connected data services and infrastructure: Colada apps. 

An example of a Colada app is extracting a thumbnail from a video. A serverless function can only run for 5 minutes, so we’ll run a container in AWS Fargate to do the video processing. 

In this app, a Lambda function is triggered whenever a new video is uploaded to S3. This function launches a task in Fargate that uses FFmpeg to extract a video thumbnail. A second Lambda function is triggered when a new thumbnail has been created. 

Read more →

Deploying production-ready containers with Pulumi

Donna Malayeri Donna Malayeri
Deploying production-ready containers with Pulumi

Containers are a great way to deploy applications to the cloud, especially with new execution models like AWS Fargate. Pulumi makes it easy to deploy production Docker containers, handling details such as creating a container registry instance in ECR, creating task definitions in ECS, and configuring a load balancer. With Pulumi, deploying a container to production is almost as easy as running it locally! In this blog post, we’ll deploy a simple Docker container running NGINX.

Read more →

Introducing Pulumi, a Cloud Development Platform

Joe Duffy Joe Duffy

Ahoy! Today we launched Pulumi, an open source cloud development platform, providing the cloud’s first true programming model using real programming languages. We believe that containers, serverless, and hosted cloud services change everything about how we design and build software. All developers these days are cloud developers. We saw a big gap in the way people want to create this software, and how they are required to do it today with configuration YAML and templating languages, and sought to close that gap.

Read more →