Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Generating documentation with Amazon Q Developer

Focus mode
Generating documentation with Amazon Q Developer - Amazon Q Developer

Amazon Q Developer helps you understand your code and keep documentation up to date by generating READMEs for your code.

Amazon Q can produce new documentation and update existing documentation in your codebase. By analyzing your project, code objects, and dependencies within your codebase, Amazon Q can document complex coding concepts and update documentation based on new code changes.

To generate documents, you open a project or workspace in your IDE and enter /doc in the chat. After you choose the type of documentation update you want to work on, Amazon Q will analyze your code, generate documentation, and provide a diff with the changes it made. You can accept the proposed changes, or provide feedback with additional changes you want Amazon Q to make.

For information on supported IDEs for this feature, see Supported IDEs. For information on supported languages, see Language support for documentation generation with /doc.

Use cases

Amazon Q can perform the following tasks from the chat panel in the IDE.

  • Create new documentation – Amazon Q can create new READMEs for your project based on the code in the selected folder. If you already have a README and choose to create a new README, Amazon Q will overwrite your existing README, not update it. You still have the option to review the new content before Amazon Q overwrites your original README.

  • Create diagrams – If your project folder contains infrastructure-as-code files (for example, AWS CDK files, AWS CloudFormation templates, Terraform configuration files, and so on), Amazon Q will create infrastructure diagrams that will be output to infra.svg files in the docs folder and referenced in the README. If you're using Visual Studio Code, you might need to install the SVG Preview (or similar) extension to view the diagrams within your IDE.

  • Make specific updates – You can describe the changes you’d like Amazon Q to make to your README in natural language. You can do so by updating an existing README and then choosing the option to make a specific change. After Amazon Q generates documentation, you have the option to describe additional changes you want it to make. You can request updates like adding a section, removing an existing section, or elaborating on an existing section.

  • Review new code and suggest documentation updates – After you make code changes, Amazon Q can review the new code and suggest associated updates to your README.

Supported file types

Amazon Q reviews your source code and configuration files, including but not limited to the following files types, when generating documentation:

  • .template files

  • requirements.txt

  • package.json

  • tsconfig.json

  • Dockerfile

  • .git/config

  • LICENSE

  • LICENSE.md

  • CONTRIBUTING

  • CONTRIBUTING.md

Amazon Q filters out files or folders defined in a .gitignore file. If you want to exclude any files or folders from being reviewed for documentation generation, you can include them in a .gitignore file in your project or workspace.

Quotas

Documentation generation with Amazon Q maintains the following quotas:

  • README size – The maximum size of a README that Amazon Q can review or generate. If an existing README exceeds this quota, Amazon Q isn’t able to update the existing documentation. If a generated README exceeds this quota, Amazon Q isn't able to return the updated README.

  • Code project size – The maximum size of the project or workspace that Amazon Q can use to generate documentation.

    Even if you choose a smaller folder to generate documentation for, the parent project or workspace must be within this quota.

  • Document generations per task – The number of times you can provide feedback to make changes to generated documentation, including the initial document generation. This quota is reset every time you start a new documentation task.

Amazon Q Developer Agent for software development Quotas
Resource Quota
README size 30 KB
Code project size

200 MB uncompressed

50 MB compressed

Document generations per task 10
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.