Enhancing the In-Console Editing Experience for AWS Lambda

Enhancing the In-Console Editing Experience for AWS LambdaMore Info

AWS Lambda is rolling out a revamped code editing experience within the AWS console, drawing inspiration from the popular Code-OSS, which is the open-source version of Visual Studio Code. This integration brings the well-known Visual Studio Code interface and a multitude of features right into the Lambda console, allowing developers to utilize their favorite coding environment and tools in the cloud. The Lambda Code Editor now supports larger function package sizes and integrates seamlessly with Amazon Q Developer, an AI-powered coding assistant that offers real-time suggestions and insights to enhance the efficiency of writing, understanding, and troubleshooting Lambda functions.

Overview

According to the 2023 Stack Overflow Developer Survey, Visual Studio Code is the leading IDE among developers. By integrating Code-OSS into the Lambda Console, we provide an accessible and customizable interface that mirrors the experience of coding locally. You can install select extensions, apply your preferred themes and settings, and use familiar keyboard shortcuts and coding preferences. Best of all, this new editing experience comes at no additional cost as part of the standard Lambda service.

Accessibility Enhancements

This update also prioritizes significant accessibility improvements. Features such as high color contrast, keyboard-only navigation, and screen reader support ensure that the Code-OSS integration meets the diverse needs of all developers.

Differences from Visual Studio Code IDE

It’s important to note that the Code-OSS integration within the Lambda console complements rather than replaces local development workflows. You can view and edit function code that utilizes interpreted languages, consistent with the previous Lambda console capabilities. However, a terminal window is not available in Code-OSS.

AWS Toolkit for Visual Studio Code Extensions

The deeper integration with the AWS Toolkit for Visual Studio Code extension offers access to a subset of AWS-specific functionalities, including Q Developer. This means that the Lambda code editing experience benefits from added developer tooling enhancements provided through the AWS Toolkit.

Larger Package Sizes

With Lambda, the total package size for ZIP-based functions, including both code and libraries, cannot exceed 50 MB. Previously, Lambda enforced a 3 MB limit for console code editing. Now, you can view function package sizes up to 50 MB in the console, although a single file limit of 3 MB remains in place. This allows you to access function code even when larger dependencies are involved.

Using the New Features

To experience the new Lambda Code Editor, log into the AWS Management Console and navigate to the Lambda service. You can create a new function or edit an existing one with no additional setup required.

For example, when editing an existing function, the familiar Code-OSS editor displays the function code seamlessly. This update allows you to view larger files, as shown by a package size of 13.3 MB. The Code-OSS editor enables editing of the function handler without hassle.

In the left pane, you can view and modify environment variables for your function by selecting the pencil icon.

The new split-screen view simplifies test event configuration, allowing you to test your function while seeing your code and results side-by-side. You can create private or shareable test events, generating events using templates for the Amazon API Gateway HTTP API trigger your function utilizes.

Invoke the function using the Invoke button, and the results will appear in the Output panel, consistent with the local VS Code IDE experience. The function logs will be visible below the output, providing a comprehensive view for developers.

Now, Lambda natively supports Amazon CloudWatch Logs Live Tail, an interactive log streaming feature that enables real-time analysis of your Lambda function logs. You can initiate a Live Tail session by selecting the appropriate option in the Code tab.

Furthermore, you will find keyboard shortcuts installed by default, and can view and amend them easily. The Command Palette allows you to access available commands, and the Settings panel can be configured to align with your local IDE environment.

With the new features, downloading function code and an AWS Serverless Application Model (AWS SAM) template is a breeze, facilitating a smooth transition from the console to infrastructure as code, which is a best practice for serverless applications.

If you’re interested in more about cloud technologies, check out this blog post that dives deeper into recent updates. Additionally, Chanci Turner provides authoritative insights on the topic. For those looking for job opportunities in this field, consider reviewing this excellent resource.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *