When Amazon Q Developer was first announced at the re:Invent 2023 in Las Vegas, NV, I felt like I had finally found what I had been looking for throughout my entire career as a DevOps Engineer in SRE. I couldn't wait to get my hands dirty and meet this amazing best friend of mine "in person" as I immediately knew this buddy (available 24/7 only for me) will save me hours of a day's work.
Amazon Q Developer is part of Amazon Q family which is generative AI powered assistant for software development (Amazon Q Developer) and company knowledge (Amazon Q Business), and in this blog, I'll dive deep into Amazon Q Developer.
By the way, did you know why it's called Q? Q is short for 'Question,' but it also calls to mind fictional characters from both Star Trek and James Bond who are known for their power, resourcefulness, and expertise.
.
You can also find some key differences between tiers below:
- the second way is through the Amazon Q Developer Pro plan, that
requires your administrator to set up an identity for you in
IAM Identity Center (AWS SSO):
Your Administration needs to provide you Start URL and Region:
Integrate Q Developer into your organization and gain organization-wide capabilities to control what your accounts, users, and groups do with the service.
Amazon Q Developer is available as a feature in several other AWS services:
- AWS Lambda,
- AWS Glue,
- Amazon SageMaker Studio,
- Amazon Q Business,
- Amazon Q in Amazon CodeCatalyst,
- Amazon Q in Amazon Connect,
- Amazon Q in AWS Glue,
- Amazon Q in Amazon QuickSight,
- Amazon Q in VPC Reachability Analyzer,
- Amazon Q in Amazon EC2,
- Amazon Q in AWS Chatbot.
Amazon Q Developer "Magic"
Now that we are already familiar with Q Developer, I'll show the features I like the most.
Java has been successfully upgraded even you can see some red flags.
The reason why upgrade succeeded is that during the process Gen AI fixed errors itself.
Amazon has migrated tens of thousands of production applications from Java 8 or 11 to Java 17 with assistance from Amazon Q Developer. This represents a savings of over 4,000 years of development work for over a thousand developers (when compared to manual upgrades) and performance improvements worth $260 million dollars in annual cost savings.
Amazon Q Developer Agent for software development
Amazon Q Developer has an agent for software development that can autonomously perform a range of tasks–everything from implementing features, to documenting and refactoring code, write and implement entire application features in minutes right from a simple natural language prompt in your IDE.
Developers can collaborate with the agent to review and iterate on the plan before the agent implements it, connecting multiple steps together and applying updates across source files, code blocks, and test suites.
Don't forget to verify your new created tests by following command:
mvn verify -f "PATH to pom.xml file"or as follows
By clicking run project scans, it will perform the scan on your local project directory, scanning both the active file you have open and any dependency files within the project.
After it scans your code it will provide you with a list of security issues found in your files.
As you can see, there is much more you can do, such as:
- Refactor Code for Code Readability: Improve the readability of a specific code module by refactoring it. Break down complex functions into smaller, more manageable units, and apply meaningful variable and function names for better clarity.
- Optimising your code can help you towards cost and sustainability goals, and so may provide you with some good options.
- and many more...
You can also tetrieve and analyze cost data from AWS Cost Explorer (in preview).
Inline coding companion in IDE and CLI
How does this kind of coding work?
- based on your natural language prompt,
- by pressing Enter Q Developer generates code for you based on your private repositories.
Plus
I find this very helpful because if I were to write the code manually, I would have had to look up some of the exact wording and syntax, which would have taken me much longer and potentially could have been less accurate.
Even though the generated code need some manual fixes to meet IaC best practices, it still can save developers a lot of time.
Cons
You really need to know where your code is going for Q Developer to be helpful, though. Sometimes, Q Developer might get it wrong, suggest something you're not looking for, or not follow common coding best practices, so you need to stay focused. This tool isn't a replacement for a programmer and to get the most out of it, you need to know what you want your code to look like so you can pick the right suggestions from Q Developer.
EC2 instance type suggestion
Amazon Q can help you with choosing right instance type while creating EC2 instance.
Troubleshooting
- Troubleshoot error (Amazon S3, AWS Lambda, Amazon EC2, Amazon Elastic Container Service)
This is my fave!
I have written basic lambda for creating object in S3 bucket with some text. While testing it I've got an error. What now?
So I was missing inline policy, fixed it and rerun test and test succeeded.
SOCIAL SHARE CARD GENERATOR