Amazon CodeWhisperer —on cruise control — leveraging the new PrivateLink Integration with Amazon CodeWhisperer endpoints, case studies and useful tech links !!
Amazon CodeWhisperer, a generative AI coding assistant and which is trained on billions of lines of code and can generate code suggestions ranging from snippets to full functions in real time based on your comments and existing code. Since its launch, there has been a lot of buzz and adoption by developers across the world. I have also written two personal blogs — one on getting started and another (using an driving analogy 😃) to start accelerating on your journey !!
Hopefully, now that you have accelerated, this blog goes to the next level of using CodeWhisperer (CW) which will cover the following key things:
- Leveraging the new PrivateLink Integration with Amazon CodeWhisperer endpoints and your VPC — for scenarios where you want to use your developer tools to access CodeWhisperer from your laptop/desktop within your office network/on-prem network and without using an internet connectivity to access CodeWhipserer directly, leveraging access to AWS using AWS Direct Connect or AWS VPN. Very useful for customers who have strict controls on accessing internet from within their office networks ..
- Links to some “how-to” awesome content that has been recently published including using CodeWhisperer with React, Juptyter Lab and Python, as well as CodeWhisperer professional edition features for integration with Okta and Microsoft Entra ID (Formerly Azure AD)
- Links to few case studies of large customers, especially Systems Integrators, who have adopted Amazon CodeWhisperer at scale.
But wait, first !!
CodeWhisperer Individual Tier is FREE — https://aws.amazon.com/codewhisperer/pricing/
The CodeWhisperer Individual Tier is free to use. Individual developers can sign up and sign in using an email address with an AWS Builder ID to start using CodeWhisperer within minutes. The Individual Tier provides code suggestions, reference tracking, and security scans.
Hope you have recovered from the “price sticker” shock 🤣, lets get started !!
Leveraging the new Amazon CodeWhisperer and interface VPC endpoints (AWS PrivateLink)
Amazon CodeWhisperer supports multiple IDE’s (Integrated Development environments) leveraging add-ons/plugins like the AWS Toolkit for Visual Studio Code and AWS toolkit for Jetbrains. Security conscious customers and developers running IDE’s like VS Code and Jetbrains from their office networks, will need private access to AWS services, rather than accessing them over the internet. AWS PrivateLink is a highly available, scalable technology that you can use to privately connect your VPC to services as if they were in your VPC. The growing list of AWS services that can integrate with AWS PrivateLink is available at https://docs.aws.amazon.com/vpc/latest/privatelink/aws-services-privatelink-support.html. Traffic between your VPC and CodeWhisperer does not leave the Amazon network.
NEWS FLASH — The good news is that we can establish a private connection between your VPC and Amazon CodeWhisperer by creating an interface VPC endpoint, powered by AWS PrivateLink.

You can easily test this, by setting up a AWS Client VPN connection between your laptop and a VPC on AWS. This will also work, if you a have AWS Direct Connect (with a private VIF) or a AWS site to site VPN. These steps are clearly documented at https://docs.aws.amazon.com/codewhisperer/latest/userguide/vpc-interface-endpoints.html
Step 1: Create a VPN connection between your on-premises like your laptop or desktop and your VPC. If you already have a site to site VPN or AWS Direct Connect, this step is not needed. I setup a Client VPN without split tunnel, so all traffic from client desktop/laptop is via the VPN endpoint only.
Step 2: Create an interface VPC endpoint for CodeWhisperer.

We will be using the vpc endpoint, similar to vpce-xxxxxx.codewhisperer.us-east-1.vpce.amazonaws.com for our connectivity to CodeWhisperer.
Step 3: Set up an inbound Amazon Route 53 endpoint. This will enable you to use the DNS name of your CodeWhisperer endpoint from your on-premises laptop/desktop.


Step 4: Setup the http/https proxy of your IDE to point to the VPC endpoint for CodeWhisperer.
I used Visual Studio Code, setup with the AWS toolkit for accessing CodeWhisperer. Now, since we have setup the VPC endpoint for CodeWhisperer, we need to manually add the https proxy for VS Code to access CodeWhisperer via the VPC endpoint and not directly through the internet. Just ensure you use the private endpoint like https://vpce-xxxxxx.codewhisperer.us-east-1.vpce.amazonaws.com for the http proxy setting and turn on the setting for “use proxy support for all extensions”.

Please note the exact setting in the IDE where you set the proxy will differ for Jetbrains.
That’s it !!
Lets test the network connectivity first .. I connected to the AWS network via the AWS VPN Client and tested a ping to the CodeWhisperer VPC endpoint (it should return some random result, showing connectivity exists) and any random public website (which should not return a result).

With this confirmation, launch your Visual Studio Code (or Jetbrains) and start on your accelerated coding journey with Amazon CodeWhisperer !!

Some amazing guides/how-to’s for Amazon CodeWhisperer
A ton of new guides are being published every week, on various topics related to Amazon CodeWhisperer. You can find a lot of this information at the official website at https://aws.amazon.com/codewhisperer/resources/
The following resources, which have been recently published, which I found very useful:
- Accelerate Python Coding with Amazon CodeWhisperer — https://www.youtube.com/watch?v=pUXFUBfqKGA
- Build an Image Gallery App using React with Amazon CodeWhisperer — https://www.youtube.com/watch?v=LV6CiWnoo5I
- How to use Reference Tracking and Security Scanning with Amazon CodeWhisperer - https://www.youtube.com/watch?v=ed_4T2CnNx8
- How to use Amazon CodeWhisperer in JupyterLab — https://www.youtube.com/watch?v=NJaHPWX-4C4
In addition to the capabilities offered in the Individual Tier, the CodeWhisperer Professional Tier offers administrative capabilities to organizations that want to provide their developers with access to CodeWhisperer. The following resources are very useful, if you need to setup access for developers in Amazon CodeWhisperer using AWS IAM Identity Center with other third party identity providers:
- How to configure access for developers in Amazon CodeWhisperer using AWS IAM Identity Center and Okta Workforce Identity Cloud — https://www.youtube.com/watch?v=-dSfLb4I46s
- How to configure access for developers in Amazon CodeWhisperer using AWS IAM Identity Center and Microsoft Entra ID (Formerly Azure AD) — https://www.youtube.com/watch?v=Y75bOHlaevU
The above is not a complete list by any means, just a few ones that have been released recently in July/August 2023 and which I found very interesting. I will try to keep this section current, by refreshing the above list on a periodic basis.
Some public references to customers/partners who are using Amazon CodeWhisperer
There are several customer and partner testimonials for Amazon CodeWhisperer at https://aws.amazon.com/codewhisperer/testimonials/
Amazon CodeWhisperer, in my personal opinion, can be a huge game changer and productivity booster for all kinds of developers, for individuals as well as companies of all sizes and especially for companies who are System Integrators with a large and diverse pool of software developers. Some recent announcements from HCL technologies, Persistent systems, Accenture, TCS and others are an indication of the increasing interest in Amazon CodeWhisperer.
That is all folks, hope this blog was useful. Please do contact your AWS account team or contact me on LinkedIn or twitter, if you need more information.
Bye, Namaskara 🙏