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
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.