x

[eBook Presented by AWS & Thundra] Mastering Observability on the Cloud 📖 Download:

Improving your Serverless feedback loop with sls-dev-tools

Apr 22, 2020

 

sls-dev-tools

Visibility is an aspect of Serverless development that leaves a lot to be desired. After deploying a function code change, knowing if that lambda has been invoked, finding out how it’s performing, and viewing the relevant metrics and logs, is an unpleasant and time consuming process.

That’s where Serverless Dev Tools comes in.

sls-dev-tools is an open source project that aims to change the Serverless developer experience. Our goal is to provide the Serverless community with metrics, logs and feedback directly in the terminal, eliminating the need to constantly jump to the AWS Console.

Unlike Thundra, sls-dev-tools isn’t for Serverless Observability in your staging, UAT or production environments. It is not a distributed logging visibility too, it’s not an alert platform and it’s not a tracing tool.

sls-dev-tools is in short, Chrome Dev Tools for the Serverless World.

Installation

Run npm install -D sls-dev-tools or yarn add -D sls-dev-tools to add the tool to your project.

Alternatively run npm install -g sls-dev-tools to install the tool globally.

Our latest released version is sls-dev-tools v1.0.0 as of today! We want this project to be framework agnostic, and you can use it with any IaC, from Serverless to SAM.

Features

Stay connected to key metrics

Selecting a lambda displays the number of invocations and errors during your desired time period, as well as the durations of the 5 most recent invocations. Know immediately how your code changes are affecting performance.

Deploy from within the tool!

One of our favourite features is the ability to deploy lambdas from within the tool in a single keypress. This allows you to select a lambda and hit ‘d’ to deploy it, or hit ‘s’ to deploy the whole stack!

0_rFduKde66yXPW2NE

Receive immediate feedback on the state of your deployment

Get the most out of EventBridge!

The tool has a lot of support for EventBridge, showing you all the event buses available on your stack, and even supporting Event Injection! Edit forms within the tool to create events, and inject them on to any of your buses.

We didn’t stop there, as the tool also has support for the EventBridge Schema Registry. Search all your registries and the schemas they contain. On selecting a schema, the tool automatically detects the necessary properties for the event, meaning you can inject the event without needing to worry about formatting JSON, or downloading the schema code bindings.

0_84sbEEsMoTNb-RkC
Schemas made simple

A whole host of shortcuts to speed up the developer experience

One of our latest features allows you to use the map to change region from within the tool. Select the map, navigate between the different regions and switch regions just by hitting enter! Soon we hope to add similar functionality for changing your current stack from within the tool as well!


Switch between different workflows without having to restart the tool

We try to avoid the AWS console as much as possible, but for those occasions when you need to see a resource’s AWS page, hit ‘o’ while selecting a lambda or event bus and the tool opens up the page in your browser.

Tell us what you want to see!

sls-dev-tools is an open source project and we welcome and encourage community PRs. One of the recent features, being able to see the runtimes of your lambdas, was added by Thundra’s own Serkan Ozal, and the ability to show integrated services for each lambda (for example, detecting Thundra from layers) might be coming soon! A number of our features come straight from community suggestions and PR’s so if you have an idea, get in touch with us!

https://github.com/Theodo-UK/sls-dev-tools

Our twitter page is also a great way to contact the team, or follow the latest updates on the tool!