CodeWhisperer Demo

Artificial Intelligence & MLOps
Video

Amazon CodeWhisperer can enhance your productivity as a software engineer by accelerating productivity, improving confidence in your code and enhancing security. Join Caylent’s Randall Hunt and Mark Olson as they guide you through a demo, demonstrating CodeWhisperer’s capability to accelerate a developer’s ability to deliver code.


Amazon CodeWhisperer is an AI coding assistant and code generator. Within a set of languages, you can instruct CodeWhisperer to generate the rest of the method based on the doc string or method header you've provided by leveraging transformers to predict what comes next. This is a significant efficiency gain as a developer because it's like doing a math test with a calculator, you don't have to do the arithmetic anymore. All you need to know is, where things go, similar to putting together pieces of legos.

To show you the capabilities of CodeWhisperer, let’s run through a quick demo where we will upload a file to S3, and create a method around that.

Using Python, first input - import boto3


CodeWhisperer provides completions as it thinks that we might be in a Lambda function, even though we’re not. 

Then we will input - create an S3 client 

CodeWhisperer will complete that for you. In this case, instead of creating a bucket, let’s use an existing bucket instead. So we will input - make a method that uploads a file to S3

Now that the file has been uploaded, we can continue by starting to type and CodeWhisperer will predict and autocomplete the input before we finish typing.

CodeWhisperer will offer you multiple suggestions to choose from. 

And you can even have it do more complicated things, for instance let’s ask it to - make a method that uploads a file to S3 with KMS keys.



While this is a relatively straightforward and common example, a key takeaway for developers and their leadership should be the power CodeWhisperer has to increase the time spent in flow state. Using CodeWhisperer as an assistant allows developers to focus on business logic rather than remembering the precise method signature of an AWS service API that you may only need once or twice, avoiding context switching to Google, Bing, Stack Overflow, or API documentation.

One of the things that separates CodeWhisperer from other AI code generators is that it will point you to different reference materials. So as you cycle through various suggestions, it not only presents objects but also indicates the sources of its material. This feature enhances the security of your code usage by offering clear insights into its origin and references.

CodeWhisperer can also show surprising semantic awareness in its choice of function name. Given a standard Python Inventory class and the request to generate a function to return items costing more than $10 it generated a function called "find_expensive_items". When asked for items less than $10 it generated "find_cheap_items". This is a level of semantic awareness that sets the tool apart.

Pricing

CodeWhisperer is free by default, but there is a paid professional version that costs $19 per user a month that allows users to set organizational policies. However, the free version also supports various programming languages, allowing users to put together the different sub components of a method, function, or program and CodeWhisperer will generate those on your behalf.

Summary 

CodeWhisperer will be able to accelerate a developer’s ability to deliver code through the use of shortcuts, but the understanding of what good software design looks like still relies on the practitioner. 

CodeWhisperer is constantly evolving and improving so the CodeWhisperer that we're using today could be 10 times better two years from now.

Next Steps

Are you exploring ways to take advantage of Analytical or Generative AI in your organization? Partnered with AWS, Caylent's data engineers have been implementing AI solutions extensively and are also helping businesses develop AI strategies that will generate real ROI. For some examples, take a look at our Generative AI offerings.



Accelerate your GenAI initiatives

Leveraging our deep experience and patterns

Browse GenAI Offerings
Artificial Intelligence & MLOps
Video
Randall Hunt

Randall Hunt

Randall Hunt, VP of Cloud Strategy and Innovation at Caylent, is a technology leader, investor, and hands-on-keyboard coder based in Los Angeles, CA. Previously, Randall led software and developer relations teams at Facebook, SpaceX, AWS, MongoDB, and NASA. Randall spends most of his time listening to customers, building demos, writing blog posts, and mentoring junior engineers. Python and C++ are his favorite programming languages, but he begrudgingly admits that Javascript rules the world. Outside of work, Randall loves to read science fiction, advise startups, travel, and ski.

View Randall's articles
Mark Olson

Mark Olson

As Caylent's VP of Customer Solutions, Mark leads a team that's entrusted with envisioning and proposing solutions to an infinite variety of client needs. He's passionate about helping clients transform and leverage AWS services to accelerate their objectives. He applies curiosity and a systems thinking mindset to find the optimal balance among technical and business requirements and constraints. His 20+ years of experience spans team leadership, technical sales, consulting, product development, cloud adoption, cloud native development, and enterprise-wide as well as line of business solution architecture and software development from Fortune 500s to startups. He recharges outdoors - you might find him and his wife climbing a rock, backpacking, hiking, or riding a bike up a road or down a mountain.

View Mark's articles

Related Blog Posts

Building a RAG AI with OpenSearch Serverless and LangChain

Learn how to build a RAG-based GenAI bot on AWS using OpenSearch Serverless, through our step-by-step example.

Artificial Intelligence & MLOps

An Overview of Generative AI Keywords and Technologies

Understand key concepts like Large Language Models (LLMs), Retrieval Augmented Generation (RAG) & Prompt Engineering to arm you with the knowledge needed to leverage the remarkable capabilities of GenAI.

Artificial Intelligence & MLOps

Building Generative AI Apps with Amazon Bedrock

Explore the basics of GenAI, the necessary skills needed to utilize it, resources you need to build your own AI apps, and how to use Amazon Bedrock to reduce the initial investments towards getting started.

Artificial Intelligence & MLOps