Implementing Amazon Q Developer: Lessons from the field (DEV310)

Introduction to Amazon CodeWhisperer

The Opportunity Ahead

  • AWS' introduction to Amazon CodeWhisperer (Amazon Q) in 2017 has been a game-changer for AI and machine learning in the hands of developers worldwide.
  • Amazon Q enables AI-paired programming, which is seen as the future of development, boosting productivity and transforming the role of developers.

Deployment Steps for Amazon CodeWhisperer

Free Tier vs. Pro Tier

  • Free Tier: Code suggestions in IDE, CLI, or AWS Console, limited advanced features, 50 chat interactions/month, 5 developer agents, 1000 lines of code migration
  • Pro Tier: User management, security policies, customization, higher limits, $19/developer/month

Authentication

  • AWS Builder ID: Unique identifier for developers to access Amazon Q without a full AWS account.
  • AWS Identity Center: Enables SSO for enterprise-scale deployment, matching corporate credentials.

Key Use Cases

  1. Manual Refactoring and Code Maintenance: Modernizing legacy code (e.g., Java 8 to Java 17, Spring Boot updates).
  2. Scaling Code Quality: Maintaining consistent code quality and best practices across a development team.
  3. Handling Large Codebases: Navigating and understanding complex codebases with the help of AI.
  4. Unexpected Use Case: Helping developers understand and write Excel formulas.

Demos

  1. New Feature Development: Generating a Flask API for a to-do list app from a prompt.
  2. Code Explanation: Providing detailed explanations of a factorial function.

Safety and Security Considerations

  1. Data and Code Sample Usage: Pro tier users don't have to worry about AWS using their data, but free tier users must opt-out.
  2. Model Updates: Quarterly automatic updates ensure the latest version of Amazon Q.
  3. Scalability: Amazon Q is fully managed, so no need to worry about scaling.
  4. Code Ownership: Developers own the code generated by Amazon Q.

Amazon CodeWhisperer Dashboard

  • Metrics include user activity, lines of code generated, acceptance rate, percentage of code written, and accepted recommendations with references.
  • Helps evaluate productivity gains and make a strong business case for using Amazon Q.

Lessons Learned

  1. Establish an AI acceptable use policy.
  2. Implement a robust developer onboarding plan.
  3. Leverage available credits for a proof-of-concept.
  4. Developers become expert prompt engineers over time.

Challenges and Solutions

  1. Handling large files by splitting them into smaller chunks.
  2. Usability challenges with the VS Code extension, now improved with inline code suggestions.
  3. Customization requires a minimum of 20MB of code data.

Personal Experience and Code Transformation Demo

  • Expectations for modern code style improvements were not met, but this feature has been added to the backlog.
  • Demonstration of transforming Java 7/8 code to Java 17, including package updates and dependency changes.

Conclusion

  • Amazon CodeWhisperer boosts developer productivity, creativity, and efficiency, without replacing developers.
  • AI-paired programming is the future, and developers should embrace the opportunity to upskill and become more capable.
  • Free access to a related LinkedIn Learning course is available upon request.

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.

Talk to us