TNS
VOXPOP
Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
0%
At work, but not for production apps
0%
I don’t use WebAssembly but expect to when the technology matures
0%
I have no plans to use WebAssembly
0%
No plans and I get mad whenever I see the buzzword
0%
Open Source / Rust / Software Development

AWS Gifts Java, Rust Developers with Useful Tools

AWS has delivered tools to enable Java developers to upgrade their systems and Rust developers to build apps for the AWS cloud.
Jan 5th, 2024 9:45am by
Featued image for: AWS Gifts Java, Rust Developers with Useful Tools
Image by Mark Valentine from Unsplash.

Amazon Web Services (AWS) has provided new tools to help both Java and Rust developers to build new applications, bring Java systems up to date and create Rust apps for the AWS cloud.

With Amazon Q, the company’s latest GenAI offering now in preview, AWS also announced a preview launch of Amazon Q Code Transformation, a new capability to simplify upgrading and modernizing existing application code using Amazon Q.

The document announces the preview launch of Amazon Q Code Transformation, a new capability to simplify upgrading and modernizing existing application code using Amazon Q, an AI-powered assistant from AWS.

It can currently perform Java application upgrades from versions 8 and 11 to Java version 17, a Long-Term Support (LTS) release of the Java platform.

In a Facebook post at the end of November, James Gosling, known as the father of Java, said: “It’s been time to migrate off of JDK8 for years and years, and yet lots of folks feel stuck. Well, there’s some new help: AWS just announced a new product: Amazon Q. It can, among many other things, perform Java application upgrades, from version 8 and 11 to version 17.”

Does All the Work

Amazon Q Code Transformation analyzes existing code, generates a transformation plan, and completes suggested tasks like updating dependencies, refactoring deprecated code, and incorporating security best practices.

“The Java transformation capability is really us taking the knowledge we have in Java, and the history we have in Java applications and Java upgrades and being able to train AI models to manage that process,” Doug Seven, general manager of Amazon CodeWhisperer and director of software development for Amazon Q, told The New Stack.

Seven said a developer using the Amazon Q transformation technology could assign Q the task of updating a Java project by telling Q to transform it. Amazon Q would then figure out a work plan for what needs to be done to update the project and let the developer review that plan.

Amazon Q would then go off and do the work of finding the dependencies that are deprecated and replacing them with modern dependencies, finding the places in the code that need to be updated, making those updates, validating that the code compiles, works, and does what it’s supposed to do, “and then it presents that as kind of a finished result to the developer to look over to see if it meets their expectations,” Seven said.

It can upgrade a Java app in minutes compared to days or weeks typically needed to do it manually. An internal Amazon team upgraded 1000 production Java 8 apps to Java 17 in two days (10 mins per app on average), said Danilo Poccia, chief evangelist (EMEA) at AWS in a blog post.

Painful Upgrades

“Java version upgrades are always painful, especially when it has to be done just for compliance reasons or to avoid being on an unsupported version,” Eric Newcomer, CTO at Intellyx, told The New Stack. Newcomer would know, as he has held CTO and other IT executive positions at Credit Suisse, Citi and WSO2.

“In other words, the new features and capabilities of the next Java version may not be providing a business reason to upgrade, so the budget that would otherwise go to implement a business feature has to be allocated to a version upgrade instead, and very often it becomes a last-minute or emergency exercise due to some kind of support issue or vulnerability in an older version, I expect most enterprises facing this type of situation would welcome all the help they can get,” he said.

The capability is available in the AWS Toolkit for IntelliJ IDEA and AWS Toolkit for Visual Studio Code for customers on the Amazon CodeWhisperer Professional Tier.

“You can upgrade Java 8 and 11 applications that are built using Apache Maven to Java version 17. The project must have the POM file (pom.xml) in the root directory,” Poccia said in the blog.

There is no additional cost to use it during the preview. After granting access, users can initiate app upgrades from within their IDE.

Amazon Investments

Amazon Q’s code transformation technology combines Amazon’s investments in automated reasoning and static code analysis with the power of generative AI and machine learning models trained on application upgrades.

“Combining Amazon’s long-term investments in automated reasoning and static code analysis with the power of generative AI, Amazon Q Code Transformation incorporates foundation models that we found to be essential for context-specific code transformations that often require updating a long tail of Java libraries with backward-incompatible changes,” Poccia said in the blog.

It also uses parts of the open source automated code refactoring tool OpenRewrite. AWS plans to contribute improvements back to the OpenRewrite community.

Jonathan Schneider, CEO and Co-founder of Moderne (the sponsor of OpenRewrite), said he welcomes AWS’ use of OpenRewrite, the open source automated code refactoring technology, as a component of their service. He also said Moderne looks forward “to their [AWS] contributions to make it even easier to migrate frameworks, patch vulnerabilities, and update APIs,” in a statement.

Rust SDK

Meanwhile, regarding Rust, AWS also delivered an AWS SDK for Rust, allowing customers to now use this for production workloads. The AWS SDK for Rust empowers developers to interact with AWS services and enjoy APIs that follow Rust idioms and best practices, the company said in a statement.

The company said all AWS SDKs support API lifecycle considerations such as credential management, retries, data marshaling, and serialization. The SDK also integrates with popular libraries in the Rust ecosystem like TokioTracing, and Hyper. Developers can visit awslabs/aws-sdk-rust on GitHub for AWS-focused open source Rust libraries.

The AWS SDK for Rust provides an idiomatic, type-safe API and supports modern Rust language features like async/await, non-blocking IO, and builders. It supports access to 300+ AWS Services, each with its own crate, AWS said.

Moreover, “the SDK works out of the box using sensible defaults but it’s also extensible, allowing users to customize it to their unique use case. It’s modular, allowing customers to compile crates only for the services they use. It is also engineered to be fast. With the Rust SDK, users can quickly transfer data to and from Amazon Simple Storage Service (Amazon S3), Amazon Elastic Compute Cloud (Amazon EC2), and Amazon DynamoDB,” a description of the SDK reads.

“A big aspect of the competition among public cloud providers is the differentiated cloud native services they provide,” Newcomer said. “Cloud providers compete on the basis of having better services, in other words. Having an SDK for Rust developers fits into that picture by providing such a differentiator, at least for Rust developers.”

Meanwhile, AWS competitor Microsoft does not have an officially supported Rust SDK for Azure, a company spokesperson confirmed for The New Stack. However, an “unofficial” Rust SDK for Azure is available on GitHub.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.