Use Amazon Q with CodeWhisperer


Today I would like to share how to use Amazon Q with CodeWhisperer. The use cases can be self-learning, code review, bug fixing …

I previously wrote a blog of how to use CodeWhisperer to improve developer’s productivity. If you missed it, here you go – “Use Amazon CodeWhisperer for free“. In that blog, I explained how to get CodeWhisperer up and running in your choice of IDE. If you have not done that, then you need to set it up first.

If you have already setup the CodeWhisperer as part of AWS Toolkit for VSCode before, you may need to upgrade the plugin to the latest version. Other than that, it is ready to go!

Amazon Q is so easy to use, just choose the piece of code you are interested to look into, then right click and choose the “Send to Amazon Q”. You can choose the pre-fined prompts (explain, refactor, fix, optimize) or just send the code then add your own prompt.

Here is a demo that I use Amazon Q + CodeWhisperer to help me understand the source code of Langchain. What a great tutor!

Leave a comment