id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
amazonq-developer-ug-078 | amazonq-developer-ug.pdf | 78 | instructions to specify their target code and target file name. 2. Context enrichment: Amazon Q unit tests agent uses the open project as context, allowing it to generate tests that align with the IDE project's code and dependencies. 3. Test generation: The Amazon Q agent infers the appropriate inputs for unit test generation or allows users to provide that information manually. It then generates the unit tests. Throughout this process, the agent provides progress updates in the chat. Note • When working with large projects, the initial project analysis may take some time. During this process, the progress indicator might remain at 0% for an extended period. This is normal behavior as Amazon Q indexes and uploads the project files. • Unit test generation is performed one file at a time. For multiple files, use the /test command separately on each file. 4. User review: Amazon Q provides a diff for the final generated tests. Developers can review the generated tests and choose to: • Accept the suggested tests. • Reject the changes. Generate unit tests with /test 229 Amazon Q Developer User Guide Usage and considerations The Amazon Q agent for unit tests is subject to general usage limits based on your subscription tier. These limits are shared across all Amazon Q features. Note Each /test command counts toward your usage limit within the free tier. For information about Amazon Q tiers of service, quotas, and pricing, see Understanding tiers of service for Amazon Q. You can use the Amazon Q dashboard in the AWS Management Console to track unit test generation metrics such as the number of unit tests generated, accepted, and the acceptance rate. You can also monitor the usage of quota-limited features and access detailed cost reports by feature. To learn about the Amazon Q dashboard, see the section called “Viewing usage metrics (dashboard)”. Handling special cases Amazon Q handles various special cases and limitations during the unit test generation process to provide a smooth user experience and helpful guidance. • Unsupported programming language: For unsupported languages, Amazon Q provides suggestions in the chat instead of generating test files. • Unsupported test framework: When encountering an unsupported test framework, Amazon Q attempts to generate tests using its best available capabilities. • Test requested for non-active file: Amazon Q only generates tests for the currently active file and instructs the user to open the desired file before retrying. • No function or method selected: When no function or method is detected in the selected lines, Amazon Q guides the user to select lines within the body of the functions or methods for which they want to generate unit tests. • Code element not found: If the specified class, function, method, or test case isn't found, Amazon Q prompts for verification of the element's name and location. • Non-public methods detected (Java): For Java projects, Amazon Q only generates tests for public methods and informs the user if private or protected methods are specified. Usage and considerations 230 Amazon Q Developer User Guide • Monthly usage limit reached: Upon reaching the monthly quota, Amazon Q notifies the user and provides information on usage limits. Note Amazon Q processes one file at a time. If you request tests for multiple files simultaneously, no error will be raised, but no tests will be generated. To generate tests, ensure you're working with one file at a time. Reviewing code with Amazon Q Developer Amazon Q Developer can review your codebase for security vulnerabilities and code quality issues to improve the posture of your applications throughout the development cycle. You can initiate a review of an entire codebase, analyzing all files in your local project or workspace, or enable auto reviews that assess your code as you write it. During a code review, Amazon Q assesses both your custom code and third-party libraries in your code. Before starting a code review, Amazon Q applies filtering to ensure that only relevant code is reviewed. As part of the filtering process, Amazon Q excludes unsupported languages, test code, and open source code. When Amazon Q discovers a potential security vulnerability or quality issue in your code, it generates a code issue with a description of the issue and a recommended fix. For some issues, you can generate and apply a code fix, which updates your code files in-place. Reviews are powered by both generative AI and rule-based automatic reasoning. Amazon Q detectors, informed by years of AWS and Amazon.com security best practices, power the rule- based security and quality reviews. As security policies are updated and detectors are added, reviews automatically incorporate new detectors to ensure your code is compliant with the most up-to-date policies. For information on supported IDEs for this feature, see Supported IDEs. For information on supported languages, see Language support |
amazonq-developer-ug-079 | amazonq-developer-ug.pdf | 79 | of the issue and a recommended fix. For some issues, you can generate and apply a code fix, which updates your code files in-place. Reviews are powered by both generative AI and rule-based automatic reasoning. Amazon Q detectors, informed by years of AWS and Amazon.com security best practices, power the rule- based security and quality reviews. As security policies are updated and detectors are added, reviews automatically incorporate new detectors to ensure your code is compliant with the most up-to-date policies. For information on supported IDEs for this feature, see Supported IDEs. For information on supported languages, see Language support for code reviews with /review. Topics • Types of code issues • Quotas Reviewing code (/review) 231 Amazon Q Developer User Guide • Starting a code review with Amazon Q Developer • Understanding code issues generated by Amazon Q Developer • Addressing code issues with Amazon Q Developer • Filtering code issues • Code issue severity in Amazon Q Developer code reviews Types of code issues Amazon Q reviews your code for the following types of code issues: • SAST scanning — Detect security vulnerabilities in your source code. Amazon Q identifies various security issues, such as resource leaks, SQL injection, and cross-site scripting. • Secrets detection — Prevent the exposure of sensitive or confidential information in your code. Amazon Q reviews your code and text files for secrets such as hardcoded passwords, database connection strings, and usernames. Secrets findings include information about the unprotected secret and how to protect it. • IaC issues — Evaluate the security posture of your infrastructure files. Amazon Q can review your infrastructure as code (IaC) code files to detect misconfiguration, compliance, and security issues. • Code quality issues — Ensure your code is meeting quality, maintainability, and efficiency standards. Amazon Q generates code issues related to various quality issues, including but not limited to performance, machine learning rules, and AWS best practices. • Code deployment risks — Assess risks related to deploying code. Amazon Q determines if there any risks to deploying or releasing your code, including application performance and disruption to operations. • Software composition analysis (SCA) — Evaluate third-party code. Amazon Q examines third- party components, libraries, frameworks, and dependencies integrated into your code, ensuring third-party code is secure and up to date. For a complete list of the detectors Amazon Q uses to review your code, see the Amazon Q Detector Library. Quotas Amazon Q security scans maintain the following quotas: Types of code issues 232 Amazon Q Developer User Guide • Input artifact size – The maximum size of all the files within an IDE project workspace, including third-party libraries, build JAR files, and temporary files. • Source code size – The maximum size of the source code that Amazon Q scans after filtering all third-party libraries and unsupported files. The following table describes the quotas maintained for auto scans and full project scans. Resource Auto reviews File or project reviews Input artifact size Source code size 200 KB 200 KB 500 MB 50 MB Starting a code review with Amazon Q Developer Amazon Q can review your entire codebase, or auto-review your code as you write it. Before you get started, make sure you've installed Amazon Q in an IDE that supports code reviews. For more information, see Installing the Amazon Q Developer extension or plugin in your IDE. Topics • Review as you code • Review a file or project Review as you code Note Amazon Q auto-reviews are only available with a Amazon Q Developer Pro subscription. Auto-reviews are rule-based reviews powered by Amazon Q detectors . Amazon Q automatically reviews the file you are actively coding in, generating code issues as soon as they are detected in your code. When Amazon Q performs auto reviews, it doesn’t generate in-place code fixes. Auto-reviews are enabled by default when you use Amazon Q. Use the following procedure to pause or resume auto-reviews. Starting a review 233 Amazon Q Developer Pause and resume auto-reviews To pause auto-reviews, complete the following steps. 1. Choose Amazon Q from the bottom of the IDE window. The Amazon Q task bar opens. User Guide 2. Choose Pause Auto-Reviews. To resume auto-reviews, choose Resume Auto-Reviews. Review a file or project You can also initiate a review from the chat panel to have Amazon Q review a particular file or project. File and project reviews include both rule-based and generative AI-powered reviews. Code issues generated during file or project reviews can include in-place code fixes. To start a file or project review, complete the following steps: JetBrains 1. Open a file or project you want to review in your IDE. 2. Choose the Amazon Q icon to open the chat panel. Enter /review. 3. A new chat tab opens. Amazon Q prompts you to |
amazonq-developer-ug-080 | amazonq-developer-ug.pdf | 80 | Resume Auto-Reviews. Review a file or project You can also initiate a review from the chat panel to have Amazon Q review a particular file or project. File and project reviews include both rule-based and generative AI-powered reviews. Code issues generated during file or project reviews can include in-place code fixes. To start a file or project review, complete the following steps: JetBrains 1. Open a file or project you want to review in your IDE. 2. Choose the Amazon Q icon to open the chat panel. Enter /review. 3. A new chat tab opens. Amazon Q prompts you to choose a project or file to review. If you’re reviewing a file, the file you want to review must be open and active in the IDE. If you’re reviewing a project, the project must be open in the IDE. 4. Choose the type of review you want to run. Amazon Q begins reviewing the project or file that you currently have open in the IDE. 5. When the review is complete, the Code Issues tab opens above the chat panel with a list of the issues Amazon Q found. 6. You can choose an issue to be redirected to the specific area of the file where the vulnerable or low-quality code was detected. To see more details about the issue, choose the magnifying glass icon to the right of the code issue name in the Code Issues tab. A Code Issue Details panel opens with information about the issue. 7. To address your code issues, see Addressing code issues with Amazon Q Developer. Starting a review 234 Amazon Q Developer Visual Studio Code User Guide 1. Open a file or project you want to review in your IDE. 2. Choose the Amazon Q icon to open the chat panel. Enter /review. 3. A new chat tab opens. Amazon Q prompts you to choose a project or file to review. If you’re reviewing a file, the file you want to review must be open and active in the IDE. If you’re reviewing a project, the project must be open in the IDE. 4. Choose the type of review you want to run. Amazon Q begins reviewing the project or file that you currently have open in the IDE. 5. When the review is complete, the Code Issues tab opens above the chat panel with a list of the issues Amazon Q found. 6. You can choose an issue to be redirected to the specific area of the file where the vulnerable or low-quality code was detected. To see more details about the issue, choose the magnifying glass icon to the right of the code issue name in the Code Issues tab. A Code Issue Details panel opens on the right side of the IDE with information about the issue. 7. To address your code issues, see Addressing code issues with Amazon Q Developer. Visual Studio 1. Open up a file from the project you want to scan in Visual Studio. 2. Choose the Amazon Q icon at the bottom of your file to open the Amazon Q task bar. 3. From the task bar, choose Run Security Scan. Amazon Q begins scanning your project. In the following image, in Visual Studio, the user chooses the Amazon Q icon, prompting a task bar from which the user may choose Run Security Scan. Starting a review 235 Amazon Q Developer User Guide 4. The status of your scan is updated in the Visual Studio output pane. You're notified when the scan is complete. For information about viewing and addressing findings, see Addressing code issues with Amazon Q Developer. Understanding code issues generated by Amazon Q Developer Note The following information about code issues is available in JetBrains IDEs and Visual Studio Code. For information about code issues in Visual Studio, see the section called “Address issues in Visual Studio”. A code issue generated by an Amazon Q review indicates that a security or quality issue was detected in your code. Code issues include the following details: • Code issue name and severity – Listed at the top of the panel, the CWEs and name of the issue, in addition to the severity of the issue. For more information about severity, see the section called “Code issue severity”. Understanding code issues 236 Amazon Q Developer User Guide • Code issue description – Describes the problem with the line or lines of code that generated the code issue. • Common Weakness Enumeration (CWE) – One or more CWE types that apply to the detector that identified the code issue. Choose the CWE link to learn more about it. • Directory library – A link to the detector in the Amazon Q Detector Library that generated the code issue. • File path – The location of |
amazonq-developer-ug-081 | amazonq-developer-ug.pdf | 81 | the issue. For more information about severity, see the section called “Code issue severity”. Understanding code issues 236 Amazon Q Developer User Guide • Code issue description – Describes the problem with the line or lines of code that generated the code issue. • Common Weakness Enumeration (CWE) – One or more CWE types that apply to the detector that identified the code issue. Choose the CWE link to learn more about it. • Directory library – A link to the detector in the Amazon Q Detector Library that generated the code issue. • File path – The location of the file that contains the code that generated the code issue. Learn more about a code issue When Amazon Q detects a code issue, it underlines the affected code in your IDE file, and adds the issue to the Code Issues tab. You take the following actions to learn more about the code issue: 1. To see the code that generated the code issue, choose the issue from the Code Issues tab. The file where the code is written opens and the problematic code is underlined. The following image shows the Code Issues tab in Visual Studio Code. 2. To see code issue details, choose the issue, and then choose the magnifying glass icon to open the Code Issue Details panel. You can also hover your cursor over the underlined code to see a popover with the same information. Understanding code issues 237 Amazon Q Developer User Guide The following image shows the magnifying glass icon for a code issue in Visual Studio Code. Addressing code issues with Amazon Q Developer The topics in this section explain how to address and resolve code issues, and, where applicable, how to ignore issues. Topics • Address code issues in JetBrains and Visual Studio Code • Address code issues in Visual Studio Address code issues in JetBrains and Visual Studio Code To address a code issue in JetBrains and Visual Studio Code, you will either have the option to generate an in-place fix or generate an explanation that you can use to manually update your code. You can take the following actions: • Generate an in-place code fix • Explain the issue and get new code • Ignore the issue, or ignore all similar issues Generate in place fixes for your file If you open a code issue and see the Generate fix button, complete the following procedure to update your code in-place. 1. In the Code Issues tab, choose the code issue you want to address. 2. Choose the wrench glass icon to open the Code Issue Details panel, where Amazon Q will start generating a fix. The following image shows the wrench icon for a code issue in Visual Studio Code. Addressing code issues 238 Amazon Q Developer User Guide 3. Updated code appears in the Code Issue Details panel. You can perform the following actions: a. Below the suggested code, choose Open diff to see a diff of the suggested code changes in the file where the code originated. b. Below the suggested code, choose Copy to copy the code to your clipboard. 4. To apply the generated fix to your file, choose Accept fix at the bottom of the panel to replace the problematic code with the suggested code. a. If the suggested code doesn’t satisfy your requirements, you can choose Regenerate fix to see an alternate solution. b. When you apply the fix, the Code Issue Details panel closes, and the issue is automatically resolved and removed from the list of issues in the Code Issues tab. Explain the code issue and get new code If the code issue doesn’t include the Generate fix button, complete the following procedure to see an in-depth explanation of the issue and steps for resolving it manually in the chat panel. 1. In the Code Issues tab, choose the code issue you want to address. 2. Choose the magnifying glass icon to open the Code Issue Details panel. The following image shows the magnifying glass icon for a code issue in Visual Studio Code. 3. At the bottom of the Code Issue Details panel, choose Explain. 4. The type of code issue and associated code are sent to Amazon Q in the chat panel. Amazon Q provides an explanation of the issue and suggests new code you can use to replace the problematic code. Addressing code issues 239 Amazon Q Developer User Guide 5. To add the code to your file, you can choose Insert at cursor to add the new code where your cursor is in the file. You can also choose Copy and paste the code to your file yourself. Make sure to remove the underlined code to replace it with the new code. Ignore a code issue If the |
amazonq-developer-ug-082 | amazonq-developer-ug.pdf | 82 | and associated code are sent to Amazon Q in the chat panel. Amazon Q provides an explanation of the issue and suggests new code you can use to replace the problematic code. Addressing code issues 239 Amazon Q Developer User Guide 5. To add the code to your file, you can choose Insert at cursor to add the new code where your cursor is in the file. You can also choose Copy and paste the code to your file yourself. Make sure to remove the underlined code to replace it with the new code. Ignore a code issue If the code issue isn’t applicable, you can choose the ignore icon from the Code Issues tab to ignore the issue and remove it from the list of issues in the Code Issues tab. The following image shows the ignore icon for a code issue in Visual Studio Code. You can also choose Ignore from the Code Issue Details panel. The issue will be ignored and removed from the list of issues in the Code Issues tab. If you choose Ignore all from the Code Issue Details panel, this and other code issues with the same CWE will be ignored. Address code issues in Visual Studio To view code issues detected by Amazon Q in Visual Studio, open the Visual Studio Error List by expanding the View heading in the Visual Studio main menu and choosing Error List. You can use the information in the code issue to update your code. After updating your code, review your code again to see if the issues were addressed. By default, the Visual Studio Error List displays all of the warnings and errors for your code base. To filter your Amazon Q code issues from the Visual Studio Error List, create a filter by completing the following procedure. Note Code issues are only visible after you've run a code review in which Amazon Q detected issues. Code issues appear as warnings in Visual Studio. In order to view issues detected by Amazon Q in the Error List, the Warnings option in the Error List heading must be selected. Addressing code issues 240 Amazon Q Developer User Guide Filter code issues in the Error List 1. 2. 3. 4. 5. From the Visual Studio main menu, choose view and then Error List to open the Error List pane. From the Error List pane, right-click the header row to open the context menu. From the context menu, expand Show Columns, and then select Tool in the expanded menu. The Tool column is added to your Error List. From the Tool column header, select the Filter icon and choose Amazon Q to filter for Amazon Q code issues. Filtering code issues Note You can only filter code issues in JetBrains IDEs and Visual Studio Code. When you filter code issues, only issues that meet the selected criteria are generated during code reviews. You can filter the issues based on their severity. To filter code issues, complete the following procedure: 1. From the Code Issues tab, choose the filter icon. The following image shows the filter icon in the Code Issues tab in Visual Studio Code. 2. The Filter Issues panel opens. Select or deselect the boxes next to the severity types you want to filter for, and then choose OK. Only the issues you select will appear in the Code Issues tab. Filtering code issues 241 Amazon Q Developer User Guide Code issue severity in Amazon Q Developer code reviews Amazon Q defines the severity of the code issues detected in your code so you can prioritize what issues to address and track the security posture of your application. The following sections explain what methods are used to determine the severity of code issues and what each level of severity means. How severity is calculated The severity of a code issue is determined by the detector that generated the issue. Detectors in the Amazon Q Detector Library are each assigned a severity using the Common Vulnerability Scoring System (CVSS). The CVSS considers how the finding can be exploited in its context (for example, can it be done over internet, or is physical access required) and what level of access can be obtained. The following table outlines how severity is determined based on the level of access and level of effort required for a bad actor to successfully attack a system. Level of Effort Not exploitable Requires access to system Internet with high LoE Over internet N/A High Critical Critical N/A Medium High High Low Low Medium Medium Level of access Full control of system or its output Access to sensitive information Can crash or slow down the system Code issue severity 242 Amazon Q Developer User Guide Level of Effort Not exploitable Requires access to system Internet with |
amazonq-developer-ug-083 | amazonq-developer-ug.pdf | 83 | access can be obtained. The following table outlines how severity is determined based on the level of access and level of effort required for a bad actor to successfully attack a system. Level of Effort Not exploitable Requires access to system Internet with high LoE Over internet N/A High Critical Critical N/A Medium High High Low Low Medium Medium Level of access Full control of system or its output Access to sensitive information Can crash or slow down the system Code issue severity 242 Amazon Q Developer User Guide Level of Effort Not exploitable Requires access to system Internet with high LoE Over internet Info Info Low Low Provides additional security Best practice Info N/A N/A N/A Severity definitions The severity levels are defined as follows. Critical – The code issue should be addressed immediately to avoid it escalating. Critical code issues suggest that an attacker can gain control of the system or modify its behavior with moderate effort. It is recommended that you treat critical findings with the utmost urgency. You also should consider the criticality of the resource. High – The code issue must be addressed as a near-term priority. High severity code issues suggest that an attacker can gain control of the system or modify its behavior with high effort. It is recommended that you treat a high severity finding as a near-term priority and that you take immediate remediation steps. You also should consider the criticality of the resource. Medium – The code issue should be addressed as a midterm priority. Medium severity findings can lead to crash, unresponsiveness, or unavailability of the system. It is recommended that you investigate the implicated code at your earliest convenience. You also should consider the criticality of the resource. Low – The code issue does not require action on its own. Low severity findings suggest programming errors or anti-patterns. You do not need to take immediate action on low severity findings, but they can provide context when you correlate them with other issues. Informational – No recommended action. Code issue severity 243 Amazon Q Developer User Guide Informational findings include suggestions for quality or readability improvements, or alternative API operations. No immediate action is necessary. Generating documentation with 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. Topics • Use cases • Supported file types • Quotas • Generating and updating READMEs with Amazon Q Developer • Best practices for documentation generation with Amazon Q Developer 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 Generating documentation (/doc) 244 Amazon Q Developer User Guide 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 |
amazonq-developer-ug-084 | amazonq-developer-ug.pdf | 84 | 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: Supported file types 245 Amazon Q Developer User Guide • 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 README size Quota 30 KB Code project size 200 MB uncompressed 50 MB compressed Document generations per task 10 Generating and updating READMEs with Amazon Q Developer Before you get started, make sure you've installed Amazon Q in an IDE that supports documentation generation. For more information, see the section called “Installing Amazon Q”. To generate or update READMEs with Amazon Q in the IDE, complete the following procedure: 1. Open your IDE where you have the Amazon Q extension installed. 2. Choose the Amazon Q icon to open the chat panel. Enter /doc. 3. A new chat tab opens. Amazon Q prompts you to create a new README for your code or to update existing an README. 4. Choose which type of documentation task you want to work on. Generating a README 246 Amazon Q Developer User Guide If you update an existing README, choose whether you want Amazon Q to update your README with recent code changes, or if you want to provide specific changes Amazon Q should make to your README. 5. Amazon Q prompts you to confirm that you want to generate documentation for the current open folder in your IDE, or you can choose a new folder. If you chose to make specific changes to your README, describe in detail what updates you want Amazon Q to make. For ideas on what to include in your description, see Best practices. Amazon Q begins generating your documentation. If your project folder contains infrastructure-as-code files, Amazon Q will create infrastructure diagrams that will be output to infra.svg files in the docs folder and referenced in the README. 6. After Amazon Q has generated your documents, it provides a diff with any changes. You can review the diffs, and then choose Accept in the chat to update your README in place. If you want to make changes to the documentation generated, choose Make changes. You can then describe what you’d like Amazon Q to change and it will generate an updated README. Best practices for documentation generation with Amazon Q Developer To improve results from documentation generation with Amazon Q, follow these best practices: • Amazon Q can generate documentation for any amount of code within the code project size quota, however very large repositories will take longer to generate documentation for and might be less specific. If you have a large repository, consider requesting documentation for a subset of code or a single file for more specific results. • The quality of documentation Amazon Q generates can be improved if your code is well- commented and organized, has good naming conventions for programming entities, and follows other standard coding conventions. • Amazon Q |
amazonq-developer-ug-085 | amazonq-developer-ug.pdf | 85 | from documentation generation with Amazon Q, follow these best practices: • Amazon Q can generate documentation for any amount of code within the code project size quota, however very large repositories will take longer to generate documentation for and might be less specific. If you have a large repository, consider requesting documentation for a subset of code or a single file for more specific results. • The quality of documentation Amazon Q generates can be improved if your code is well- commented and organized, has good naming conventions for programming entities, and follows other standard coding conventions. • Amazon Q produces the highest quality documentation for code written in one or more of the supported languages. Code written in other languages might not be reflected in generated documentation, or could produce lower quality documentation. For more information on languages, see Language support for documentation generation with /doc. • If you want to request specific changes to a README in natural language, you can do so by choosing to update an existing README and then choosing the option to make a specific change. Best practices 247 Amazon Q Developer User Guide After Amazon Q generates documentation, you can also choose to make changes and describe what updates you want Amazon Q to make. • When describing the updates you want Amazon Q to make to your documentation, consider the following: • The description of changes should include the sections you want to modify, the content you want to add or remove, and specific issues that need correcting. • Changes should relate to how project functionality is reflected in the README. • Content you refer to should be available in your codebase. • Amazon Q doesn’t have access to private or internal platforms. Amazon Q also might not have knowledge of third party tools or software or specialized tooling in your code. If your code includes resources Amazon Q can’t access or isn't familiar with, that code won’t be documented. You can manually edit the README to include content Amazon Q isn’t able to generate. Supported languages for Amazon Q Developer in the IDE Amazon Q Developer provides support for a wide range of programming languages across its various features and capabilities. This page outlines the languages and versions supported for each of its features. Language support for inline suggestions Amazon Q supports inline code suggestions for multiple programming languages. The accuracy and quality of the code generation for a programming language depends on the size and quality of the training data. In terms of the quality of the training data, the programming languages with the most support are: • C • C++ • C# • Dart • Go • Java • JavaScript • Kotlin Supported languages 248 User Guide Amazon Q Developer • Lua • PHP • PowerShell • Python • R • Ruby • Rust • Scala • Shell • SQL • Swift • SystemVerilog • TypeScript The Infrastructure as Code (IaC) languages with the most support are: • CDK (Typescript, Python) • HCL (Terraform) • JSON • YAML Language support for chat and inline chat Amazon Q supports a variety of programming languages for chat and inline chat in the IDE, with enhanced performance for popular programming and IaC languages, including but not limited to the following: • C • C++ • C# • Dart • Go • Java Chat and inline chat 249 User Guide Amazon Q Developer • JavaScript • Kotlin • PHP • Python • Ruby • Rust • Scala • Shell • SQL • Swift • TypeScript The Infrastructure as Code (IaC) languages with the most support are: • CDK (Typescript, Python) • HCL (Terraform) • JSON • YAML Amazon Q chat and inline chat support languages not listed here, including less common languages, though quality can vary. Language support for transformations The supported languages for transformation depend on the environment where you are transforming code. In JetBrains IDEs and Visual Studio Code, the following languages are supported for transformation: • Java • Embedded SQL conversion for Oracle to PostgreSQL database migration In Visual Studio, the following languages are supported for transformation: Transformations 250 Amazon Q Developer • C# in .NET applications User Guide For more information about supported languages and other prerequisites for transformation, see the topic for the type of transformation your are performing. Language support for feature development with /dev The Amazon Q agent for feature development supports a variety of languages, with enhanced performance for popular programming languages, including but not limited to the following: • Java • Python • JavaScript • TypeScript The feature development agent also supports less common languages, though quality can vary. Language and framework support for unit test generation with /test The Amazon Q agent for unit test generation supports the following languages and test frameworks: |
amazonq-developer-ug-086 | amazonq-developer-ug.pdf | 86 | more information about supported languages and other prerequisites for transformation, see the topic for the type of transformation your are performing. Language support for feature development with /dev The Amazon Q agent for feature development supports a variety of languages, with enhanced performance for popular programming languages, including but not limited to the following: • Java • Python • JavaScript • TypeScript The feature development agent also supports less common languages, though quality can vary. Language and framework support for unit test generation with /test The Amazon Q agent for unit test generation supports the following languages and test frameworks: • Python • Supported test frameworks: Pytest, Unittest • Java • Supported test frameworks: JUnit (JUnit 4 and 5, JUnit Jupiter), Mockito Language support for code reviews with /review Amazon Q code reviews support the following language versions: • Java ‐ Java 17 and earlier • JavaScript ‐ ECMAScript 2021 and earlier • Python ‐ Python 3.11 and earlier, within the Python 3 series • C# ‐ All versions (.NET 6.0 and later recommended) Feature development (/dev) 251 User Guide Amazon Q Developer • TypeScript ‐ All versions • Ruby ‐ Ruby 2.7 and 3.2 • Go ‐ Go 1.18 • C ‐ C11 and earlier • C++ ‐ C++17 and earlier • PHP ‐ PHP 8.2 and earlier • Kotlin ‐ Kotlin 2.0.0 and earlier • Scala ‐ Scala 3.2.2 and earlier • JSX ‐ React 17 and earlier • Infrastructure as Code (IaC) languages • AWS CloudFormation ‐ 2010-09-09 • Terraform ‐ 1.6.2 and earlier • AWS CDK ‐ TypeScript and Python Automatic code fixes are available for scans in the following languages and versions: • Java ‐ Java 17 and earlier • JavaScript ‐ ECMAScript 2021 and earlier • Python ‐ Python 3.11 and earlier, within the Python 3 series • C# ‐ All versions (.NET 6.0 and later recommended) • TypeScript ‐ All versions • Infrastructure as Code (IaC) languages • AWS CloudFormation ‐ 2010-09-09 • Terraform ‐ 1.6.2 and earlier • AWS CDK ‐ TypeScript and Python Language support for documentation generation with /doc The Amazon Q agent for document generation supports a variety of languages, with enhanced performance for popular programming languages, including but not limited to the following: • C++ Documentation generation (/doc) 252 Amazon Q Developer • C# • Java • JavaScript • Python • PHP • TypeScript User Guide The document generation agent also supports less common languages, though quality can vary. Language support for customizations Amazon Q supports customizations for the following languages, and uses the listed file types to create customizations: • Bash/Shell (.sh, .zsh, .bash) • C (.c, .h) • C# (.cs) • C++ (.cpp, .hpp, .h) • Dart (.dart) • Go (.go) • HCL (.hcl) • HTML (.html, .htm) • Java (.java) • JavaScript (.js, .jsx) • JSON (.json) • Kotlin (.kt, .kts) • Markdown (.md, .mdx) • PHP (.php) • Powershell (.ps1, .psm1, .psd1) • Python (.py) • reStructuredText (.rst) • Ruby (.rb) Customizations 253 Amazon Q Developer • Rust (.rs) • Scala (.scala) • Terraform (.tf, .tfvars) • Text (.txt) • TypeScript (.ts, .tsx) • YAML (.yaml, .yml) User Guide Customizations 254 Amazon Q Developer User Guide Using Amazon Q Developer on the command line You can use Amazon Q Developer to enable completions for hundreds of popular CLIs like git, npm, docker, and aws. Amazon Q for command line integrates contextual information, providing Amazon Q with an enhanced understanding of your use case, enabling it to provide relevant and context-aware responses. As you begin typing, Amazon Q populates contextually relevant subcommands, options, and arguments. You can install Amazon Q for command line on macOS and specific Linux environments, including AppImage and Ubuntu packages, which provides features such as autocompletion, Amazon Q chat, and inline zsh completion. You can work with Amazon Q CLI to do the following: • Command line interface to chat through natural language conversations, questions, and responses within your terminal environment. • Translate natural language instructions to executable shell code snippets. • Inline suggestions as you type in your command prompt, with completions to popular CLIs. For more information, see Supported command line environments and Installing Amazon Q for command line. Topics • Supported command line environments • Installing Amazon Q for command line • Using chat on the command line • Using MCP with Amazon Q Developer • Using the editor command in the CLI • Context management and profiles • Using context hooks • Configuring Amazon Q settings • Using Amazon Q autocomplete on the command line • Contributing to Amazon Q for command line 255 Amazon Q Developer User Guide Supported command line environments The autocomplete feature of Amazon Q for command line is supported on macOS and specific Linux environments, including AppImage and Ubuntu. The following environments |
amazonq-developer-ug-087 | amazonq-developer-ug.pdf | 87 | Topics • Supported command line environments • Installing Amazon Q for command line • Using chat on the command line • Using MCP with Amazon Q Developer • Using the editor command in the CLI • Context management and profiles • Using context hooks • Configuring Amazon Q settings • Using Amazon Q autocomplete on the command line • Contributing to Amazon Q for command line 255 Amazon Q Developer User Guide Supported command line environments The autocomplete feature of Amazon Q for command line is supported on macOS and specific Linux environments, including AppImage and Ubuntu. The following environments are supported for both macOS and Linux: • Shells: bash, zsh, fish • CLIs: Over 500 of the most popular CLIs such as git, aws, docker, npm, and yarn macOS Amazon Q for command line integrates with the following environments for macOS: • Terminal emulators: iTerm2, macOS terminal, Hyper, Alacritty, Kitty, WezTerm. To see the full list of terminals, see the Amazon Q for command line open source code. • IDEs: VS Code terminal, Jetbrains terminals (except Fleet) • macOS 10.15 (Catalina) or later • Architecture: x86_64 (Intel) or arm64 (Apple Silicon) Linux Amazon Q for command line integrates with the following environments for Linux: • Platform requirements: Amazon Q for command line for Linux supports Ubuntu 22 and 24, and compatibility for a subset of features on Ubuntu 20. It may otherwise work with GNOME v42+ or environments where the display server is Xorg and the input method framework is IBus. • Terminal emulators: GnomeConsole, GnomeTerminal, Kitty, Hyper, WezTerm, Alacritty, Tilix, Terminator • Architecture: x86_64 or aarch64 • Note: Desktop functionality is currently only available on x86_64 architecture Windows Amazon Q for command line works in Linux environments running the Windows Subsystem for Linux (WSL). This environment supports autocomplete, which requires a full installation and Supported environments 256 Amazon Q Developer User Guide terminal specific support. It also supports inline completion for zsh, which works with a minimal installation and is terminal agnostic. A full installation provides a GUI dashboard while minimal installation doesn't. Natural languages Amazon Q Developer provides multi-natural-language support for the Amazon Q Developer command-line interface (CLI). Some of the supported natural languages include Mandarin, French, German, Italian, Japanese, Spanish, Korean, Hindi, and Portuguese, with more languages available. To utilize this functionality, you can initiate a conversation with Amazon Q Developer using your preferred natural language. Amazon Q automatically detects the language and provides responses in the appropriate language. Installing Amazon Q for command line You can install Amazon Q for command line for macOS by initiating a file download for the Amazon Q application. For more information, see Supported command line environments. There are two modalities to consider when installing Amazon Q for command line. Minimal installation only distributes the binaries needed on Linux for Amazon Q chat and for the autocomplete feature to function over SSH (q and qterm). Full distribution contains the desktop application and requires the autocomplete feature to be used. If you want to only use the Amazon Q chat, consider that the minimal distribution also ships and installs qterm to your shell. You can use qterm for zsh to support inline completions and a full version isn't required. For more information, see Installing with a zip file. macOS You can install Amazon Q for command line for macOS by downloading the application or by using Homebrew. After installing Amazon Q for command line for macOS, you can enable SSH integration to be able to use autocomplete for over 500 command line tools. For more information, see Using autocomplete over SSH. To install Amazon Q for command line for macOS 1. Download Amazon Q for command line for macOS. Natural languages 257 Amazon Q Developer User Guide 2. (Optional) Verify the downloaded file for Amazon Q for command line on macOS. For more information, see ???. 3. Double-click on the downloaded .dmg file, and drag the app into your applications folder. 4. 5. In your applications folder, double-click on Amazon Q. The GUI will open. Enable the shell integrations. This will allow you to run Amazon Q from the shell, and will also allow Amazon Q to help you with shell command auto-completions. 6. Authenticate with Builder ID, or with IAM Identity Center using the start URL given to you by your account administrator. 7. Follow the instructions to install the shell integrations, and to grant macOS accessibility permissions. To install Amazon Q for command line for macOS with Homebrew 1. 2. If you don't already have Homebrew installed, install the package manager from brew.sh. In a working terminal, install Amazon Q for command line using the following command: brew install amazon-q 3. Verify the installation by using the following command: macOS 258 Amazon Q Developer q --version User Guide Windows |
amazonq-developer-ug-088 | amazonq-developer-ug.pdf | 88 | command auto-completions. 6. Authenticate with Builder ID, or with IAM Identity Center using the start URL given to you by your account administrator. 7. Follow the instructions to install the shell integrations, and to grant macOS accessibility permissions. To install Amazon Q for command line for macOS with Homebrew 1. 2. If you don't already have Homebrew installed, install the package manager from brew.sh. In a working terminal, install Amazon Q for command line using the following command: brew install amazon-q 3. Verify the installation by using the following command: macOS 258 Amazon Q Developer q --version User Guide Windows Subsystem for Linux (WSL) While Amazon Q CLI doesn't have a native Windows version, you can use it on Windows through the Windows Subsystem for Linux (WSL). This provides a Linux environment running on Windows where you can install and use the Amazon Q CLI. To install Amazon Q for command line for Windows with WSL 1. 2. 3. Install the WSL on your Windows machine by following the Microsoft WSL installation guide. Install a Linux distribution such as Ubuntu from the Microsoft Store. Launch your WSL Linux distribution. 4. Download the appropriate zip file installer version of the Linux package for your WSL distribution. To learn about the different zip files, see Installing with a zip file. Note This is a minimal Linux installation. Desktop Linux users have GUI components available that are not included in the zip installer for remote SSH and Windows WSL systems. 5. Configure your AWS credentials within the WSL environment using the following command: q login Note When using Amazon Q CLI in WSL, it has access to files within the WSL filesystem. To work with files on your Windows drives, access them through the /mnt/drive letter within WSL. Windows Subsystem for Linux (WSL) 259 Amazon Q Developer Linux AppImage Warning User Guide This installation method requires a GUI. If you are installing on Linux without a GUI, see Installing with a zip file. You can install Amazon Q for command line for Linux using the AppImage format, which is a portable format that works on most Linux distributions without requiring installation. To install Amazon Q for command line for Linux using AppImage 1. Download Amazon Q for command line for Linux AppImage. 2. Make the AppImage executable: chmod +x amazon-q.appimage 3. Run the AppImage: ./amazon-q.appimage 4. Authenticate with Builder ID, or with IAM Identity Center using the start URL given to you by your account administrator. Ubuntu Warning This installation method requires a GUI. If you are installing on Linux without a GUI, see Installing with a zip file. You can install Amazon Q for command line for Ubuntu using the .deb package. To install Amazon Q for command line for Ubuntu 1. Download Amazon Q for command line for Ubuntu. Linux AppImage 260 Amazon Q Developer User Guide wget https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb 2. Install the package: sudo apt-get install -f sudo dpkg -i amazon-q.deb 3. Launch Amazon Q for command line: q 4. Authenticate with Builder ID, or with IAM Identity Center using the start URL given to you by your account administrator. Installing with a zip file The setup for Linux integration with the Amazon Q Developer CLI requires installing the appropriate file for your system, verifying the file, and installing the program. Install and update requirements • You must be able to extract or "unzip" the downloaded package. If your operating system doesn't have the built-in unzip command, use an equivalent. • Amazon Q for command line requires glibc 2.34 or newer, which is included by default in most major Linux distributions released since 2021. • For older distributions with glibc versions earlier than 2.34, use the special musl-based version (indicated by -musl.zip in the filename). • Amazon Q for command line is supported on 64-bit x86_64 and ARM aarch64 versions of recent distributions of Fedora, Ubuntu, and Amazon Linux 2023. Checking your glibc version To determine which version you need, check your glibc version: ldd --version If the version is 2.34 or newer, use the standard version. If it's older, use the musl version. With a zip file 261 Amazon Q Developer User Guide To download the installation file Choose the appropriate download command based on your system architecture and glibc version: Standard version (glibc 2.34+) Linux x86-64 curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip" Linux ARM (aarch64) curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux.zip" -o "q.zip" Musl version (for glibc < 2.34) Linux x86-64 with musl curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip" -o "q.zip" Linux ARM (aarch64) with musl curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux-musl.zip" -o "q.zip" To verify the download (optional) If you chose to manually download the Amazon Q command line installer package .zip, you can verify the signatures using the GnuPG tool: 1. |
amazonq-developer-ug-089 | amazonq-developer-ug.pdf | 89 | appropriate download command based on your system architecture and glibc version: Standard version (glibc 2.34+) Linux x86-64 curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip" Linux ARM (aarch64) curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux.zip" -o "q.zip" Musl version (for glibc < 2.34) Linux x86-64 with musl curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip" -o "q.zip" Linux ARM (aarch64) with musl curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux-musl.zip" -o "q.zip" To verify the download (optional) If you chose to manually download the Amazon Q command line installer package .zip, you can verify the signatures using the GnuPG tool: 1. Download and install the gpg command using your package manager. For more information, see the GnuPG documentation. 2. Create a public key file by creating a text file, and then paste in the following text: -----BEGIN PGP PUBLIC KEY BLOCK----- With a zip file 262 Amazon Q Developer User Guide mDMEZig60RYJKwYBBAHaRw8BAQdAy/+G05U5/EOA72WlcD4WkYn5SInri8pc4Z6D BKNNGOm0JEFtYXpvbiBRIENMSSBUZWFtIDxxLWNsaUBhbWF6b24uY29tPoiZBBMW CgBBFiEEmvYEF+gnQskUPgPsUNx6jcJMVmcFAmYoOtECGwMFCQPCZwAFCwkIBwIC IgIGFQoJCAsCBBYCAwECHgcCF4AACgkQUNx6jcJMVmef5QD/QWWEGG/cOnbDnp68 SJXuFkwiNwlH2rPw9ZRIQMnfAS0A/0V6ZsGB4kOylBfc7CNfzRFGtovdBBgHqA6P zQ/PNscGuDgEZig60RIKKwYBBAGXVQEFAQEHQC4qleONMBCq3+wJwbZSr0vbuRba D1xr4wUPn4Avn4AnAwEIB4h+BBgWCgAmFiEEmvYEF+gnQskUPgPsUNx6jcJMVmcF AmYoOtECGwwFCQPCZwAACgkQUNx6jcJMVmchMgEA6l3RveCM0YHAGQaSFMkguoAo vK6FgOkDawgP0NPIP2oA/jIAO4gsAntuQgMOsPunEdDeji2t+AhV02+DQIsXZpoB =f8yY -----END PGP PUBLIC KEY BLOCK----- 3. Import the Amazon Q command line public key with the following command, substituting public-key-file-name with the file name of the public key you created: gpg --import public-key-file-name gpg: directory '/home/username/.gnupg' created gpg: keybox '/home/username/.gnupg/pubring.kbx' created gpg: /home/username/.gnupg/trustdb.gpg: trustdb created gpg: key 50DC7A8DC24C5667: public key "Amazon Q command line Team <q-command line@amazon.com>" imported gpg: Total number processed: 1 gpg: imported: 1 4. Download the Amazon Q command line signature file for the package you downloaded. It has the same path and name as the .zip file it corresponds to, but has the extension .sig. Standard version (glibc 2.34+): Linux x86-64: curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux.zip.sig" -o "q.zip.sig" Linux ARM (aarch64): curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux.zip.sig" -o "q.zip.sig" Musl version (for glibc < 2.34): With a zip file 263 Amazon Q Developer Linux x86-64 with musl: User Guide curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip.sig" -o "q.zip.sig" Linux ARM (aarch64) with musl: curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us- east-1.amazonaws.com/latest/q-aarch64-linux-musl.zip.sig" -o "q.zip.sig" 5. Verify the signature, passing both the downloaded .sig and .zip file names as parameters to the gpg command: gpg --verify q.zip.sig q.zip The output should look similar to the following: gpg: Signature made Wed 24 Apr 2024 12:08:49 AM UTC gpg: using EDDSA key 9AF60417E82742C9143E03EC50DC7A8DC24C566 gpg: Good signature from "Amazon Q command line Team <q-command line@amazon.com>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 9AF6 0417 E827 42C9 143E 03EC 50DC 7A8D C24C 5667 Note The warning in the output is expected and doesn't indicate a problem. It occurs because there isn't a chain of trust between your personal PGP key (if you have one) and the Amazon Q for command line PGP key. For more information, see Web of trust. To install Amazon Q CLI 1. Unzip the installer: unzip q.zip With a zip file 264 Amazon Q Developer 2. Run the install program: ./q/install.sh By default, the files are installed to ~/.local/bin. Setting up SSH for remote use User Guide After installing Amazon Q CLI, you can configure remote Linux integration to enable command line functionality with Amazon Q on remote machines. Local macOS Integration To enable SSH integration from your local macOS machine: 1. Open your terminal or command prompt. 2. Enable the local SSH integrations: q integrations install ssh Remote Linux Integration To configure the SSH integration on your remote Linux machine: 1. Edit your SSH server configuration: sudo -e /etc/ssh/sshd_config 2. Add the following lines to the end of the config file: AcceptEnv Q_SET_PARENT AllowStreamLocalForwarding yes 3. Restart the SSH service: sudo systemctl restart sshd 4. Disconnect from the SSH session and reconnect. For remote use 265 Amazon Q Developer User Guide 5. After reconnecting, log in to Amazon Q: q login 6. Verify the installation: q doctor Known limitations If the Amazon Q desktop client quits while connected to a remote machine with SSH, an error message may print repeatedly: connect to /var/folders/tg/u1vx4xfmvqav0oxfa4zfknaxiwmbsbr/T/cwrun/remote.sock port -2 failed: Connection refused To stop the error, either exit the SSH session and reconnect or restart the Amazon Q desktop client. Troubleshooting If you encounter issues with the SSH integration: 1. Run q doctor to identify and fix common issues 2. Ensure both local and remote configurations are correct 3. Check that your SSH server is properly configured to accept the required environment variables 4. Verify that you're using the correct version (standard or musl) for your system Uninstalling Amazon Q for command line You can uninstall Amazon Q for command line if you no longer need it. To uninstall Amazon Q for command line on macOS 1. Open the Applications folder in Finder. 2. Locate the Amazon Q application. 3. Drag the application to the Trash, or right-click and |
amazonq-developer-ug-090 | amazonq-developer-ug.pdf | 90 | 1. Run q doctor to identify and fix common issues 2. Ensure both local and remote configurations are correct 3. Check that your SSH server is properly configured to accept the required environment variables 4. Verify that you're using the correct version (standard or musl) for your system Uninstalling Amazon Q for command line You can uninstall Amazon Q for command line if you no longer need it. To uninstall Amazon Q for command line on macOS 1. Open the Applications folder in Finder. 2. Locate the Amazon Q application. 3. Drag the application to the Trash, or right-click and select "Move to Trash". 4. Empty the Trash to complete the uninstallation. Uninstalling 266 Amazon Q Developer User Guide To uninstall Amazon Q for command line on Ubuntu 1. Use the apt package manager to remove the package: sudo apt-get remove amazon-q 2. Remove any remaining configuration files: sudo apt-get purge amazon-q Debugging Amazon Q Developer for the command line If you're having a problem with Amazon Q Developer for command line, run q doctor to identify and fix common issues. Expected output $ q doctor # Everything looks good! Amazon Q still not working? Run q issue to let us know! If your output doesn't look like the expected output, follow the prompts to resolve your issue. If it's still not working, use q issue to report the bug. Common issues Here are some common issues you might encounter when using Amazon Q for command line: Authentication failures If you're having trouble authenticating, try running q login to re-authenticate. Autocomplete not working Ensure your shell integration is properly installed by running q doctor. SSH integration issues Verify that your SSH server is properly configured to accept the required environment variables. Debugging 267 Amazon Q Developer Troubleshooting steps User Guide Follow these steps to troubleshoot issues with Amazon Q for command line: 1. Run q doctor to identify and fix common issues. 2. Check your internet connection. 3. Verify that you're using a supported environment. For more information, see Supported command line environments. 4. Try reinstalling Amazon Q for command line. 5. If the issue persists, report it using q issue. Using chat on the command line The Amazon Q Developer CLI provides an interactive chat experience directly in your terminal. You can ask questions, get help with AWS services, troubleshoot issues, and generate code snippets without leaving your command line environment. Starting a chat session To start a chat session with Amazon Q, use the chat subcommand: $ q chat This opens an interactive chat session where you can type questions or commands. To exit the chat session, type /quit or press Ctrl+D. Chat commands Amazon Q supports several commands that you can use during a chat session. These commands start with a forward slash (/). Chat commands Command Description /prompts Lists all available prompts Using chat 268 Amazon Q Developer User Guide Command Description /usage ! ctrl-j ctrl-k Displays an estimate of the context window usage Executes a shell command from inside an Amazon Q CLI session Allows multi-line input Fuzzy search /editor Uses the configured editor to compose prompts /help /issue /quit /clear /reset /tools Displays a list of available commands Reports an issue or make a feature request Exits the chat session Clears the chat history from the current session Resets the conversation context, clearing all previous messages Manages tools and permissions for tools that Amazon Q can use /acceptall Deprecated. Disables confirmation prompts when Amazon Q performs actions on your system /profile /context /compact Manages Q profiles for Q Developer commands Manages the context information available to Amazon Q Compacts the conversation history and shows the output of the compacted conversation history Managing tool permissions You can use the /tools command to manage permissions for tools that Amazon Q uses to perform actions on your system. This provides granular control over what actions Amazon Q can perform. Managing tool permissions 269 Amazon Q Developer Tools commands User Guide Command Description help trust Shows help related to tools. Trusts a specific tool for the session. untrust Reverts a tool to per-request confirmation. trustall Trusts all tools (equivalent to deprecated /acceptall). reset Resets all tools to default permission levels. To view the current permission settings for all tools: $ q chat Amazon Q> /tools This displays a list of all available tools and their current permission status (trusted or per-request). Tool permissions have two possible states: • Trusted: Amazon Q can use the tool without asking for confirmation each time. • Per-request: Amazon Q must ask for your confirmation each time before using the tool. To trust or untrust a specific tool for the current session: Amazon Q> /tools trust fs_read Amazon Q> /tools untrust execute_bash Managing tool permissions 270 Amazon Q Developer User Guide You can |
amazonq-developer-ug-091 | amazonq-developer-ug.pdf | 91 | permission levels. To view the current permission settings for all tools: $ q chat Amazon Q> /tools This displays a list of all available tools and their current permission status (trusted or per-request). Tool permissions have two possible states: • Trusted: Amazon Q can use the tool without asking for confirmation each time. • Per-request: Amazon Q must ask for your confirmation each time before using the tool. To trust or untrust a specific tool for the current session: Amazon Q> /tools trust fs_read Amazon Q> /tools untrust execute_bash Managing tool permissions 270 Amazon Q Developer User Guide You can also trust all tools at once with /tools trustall(equivalent to the deprecated / acceptall command): Amazon Q> /tools trustall Warning Using /tools trustall carries risks. For more information, see Understanding security risks. The following image shows the status of the CLI tools when they are all in their default trust status. Managing tool permissions 271 Amazon Q Developer User Guide The following tools are natively available for Amazon Q to use: Available tools Tool Description fs_read Reads files and directories on your system. fs_write Creates and modifies files on your system. execute_bash Executes bash commands on your system. use_aws Makes AWS CLI calls to interact with AWS services. report_issue Opens a browser to report an issue with the chat to AWS. When Amazon Q attempts to use a tool that doesn't have explicit permission, it will ask for your approval before proceeding. You can choose to allow or deny the action, or trust the tool for the remainder of your session. Each tool has a default trust behavior. fs_read is the only tool that is trusted by default. Here are some examples of when to use different permission levels: • Trust fs_read: When you want Amazon Q to read files without confirmation, such as when exploring a codebase. • Trust fs_write: When you're actively working on a project and want Amazon Q to help you create or modify files. • Untrust execute_bash: When working in sensitive environments where you want to review all commands before execution. • Untrust use_aws: When working with production AWS resources to prevent unintended changes. When Amazon Q uses a tool, it shows you the trust permission being used. Managing tool permissions 272 Amazon Q Developer User Guide You can also specify trust permissions as part of starting a q chat session. Summarizing conversations The /compact command compacts the conversation history and shows the output of the compacted conversation history. When the length of characters in your conversation history approaches the limit, Amazon Q provides a warning message, indicating that you should /compact your conversation history Summarizing conversations 273 Amazon Q Developer User Guide Security considerations and best practices Amazon Q provides powerful capabilities that can modify your system and AWS resources. Understanding security implications and following best practices helps you use these capabilities safely. Understanding security risks When using Amazon Q, be aware of the following potential security risks: • Unintended system changes: Amazon Q may interpret your requests in unexpected ways, leading to unintended modifications • AWS resource modifications: Resources could be created, modified, or deleted, potentially affecting production environments or incurring costs • Data loss: Commands that delete or overwrite files could result in data loss • Security vulnerabilities: Commands might compromise system security if not properly reviewed Security considerations 274 Amazon Q Developer User Guide These risks are significantly increased when using /tools trustall or /acceptall, which bypass confirmation prompts. Specific examples of risks include: • A request to "clean up old files" might delete important configuration files • A request to "optimize my EC2 instances" might terminate running instances • A request to "fix security issues" might modify permissions in ways that expose sensitive data Warning AWS recommends against using /tools trustall or /acceptall mode in production environments or when working with sensitive data or resources. You are responsible for all actions performed by Amazon Q when these modes are enabled. General security best practices When using Amazon Q in any environment, especially those with sensitive files, private keys, tokens, or other confidential information, consider implementing these security measures: Restricting file access By default, Amazon Q can read files without asking for permission each time (fs_read is trusted by default). For sensitive environments, you can restrict this behavior: Amazon Q> /tools untrust fs_read With this setting, Amazon Q will ask for your explicit permission before reading any file. This gives you granular control over which files Amazon Q can access during your session. You can also make this setting persistent by adding it to your shell startup script: echo 'alias q="q --untrust-fs-read"' >> ~/.bashrc This ensures that every new Amazon Q session starts with fs_read untrusted, requiring explicit permission for file access. Security considerations 275 Amazon Q Developer Additional security measures |
amazonq-developer-ug-092 | amazonq-developer-ug.pdf | 92 | for permission each time (fs_read is trusted by default). For sensitive environments, you can restrict this behavior: Amazon Q> /tools untrust fs_read With this setting, Amazon Q will ask for your explicit permission before reading any file. This gives you granular control over which files Amazon Q can access during your session. You can also make this setting persistent by adding it to your shell startup script: echo 'alias q="q --untrust-fs-read"' >> ~/.bashrc This ensures that every new Amazon Q session starts with fs_read untrusted, requiring explicit permission for file access. Security considerations 275 Amazon Q Developer Additional security measures User Guide For environments with highly sensitive information, consider these additional measures: • Use Amazon Q in a dedicated development environment that doesn't contain sensitive credentials or data • Store sensitive files outside your project directories or in locations with restricted permissions • Use environment variables for sensitive values instead of hardcoding them in files • Consider using /tools untrust use_aws to require explicit permission before making AWS API calls • Use project rules to define security guidelines and restrictions (see Using project rules) Using /tools trustall safely If you must use /tools trustall or /acceptall for specific workflows, follow these safety practices to minimize risks: • Only use in development or testing environments, never in production • Enable /tools trustall only for specific tasks, then immediately disable it using /tools reset to return to default permissions • Back up important data before enabling /tools trustall • Use AWS credentials with minimal permissions when /tools trustall is enabled • Carefully monitor all actions Amazon Q takes while /tools trustall is enabled To return to the default permission settings after using /tools trustall, use the reset command: Amazon Q> /tools reset This reverts all tools to their default permission levels, with only fs_read trusted by default. Using MCP with Amazon Q Developer The Model Context Protocol (MCP) is an open standard that enables AI assistants to interact with external tools and services. Amazon Q Developer CLI now supports MCP, allowing you to extend Q's capabilities by connecting it to custom tools and services. Using MCP 276 User Guide Amazon Q Developer Topics • MCP overview • Key benefits • MCP architecture • Core MCP concepts • MCP configuration • MCP tools and prompts • MCP security MCP overview MCP (Model Context Protocol) is an open protocol that standardizes how AI assistants communicate with external tools. It defines a structured way for AI models to discover available tools, request tool execution with specific parameters, and receive and process tool results. Think of MCP like a universal connector for AI models, enabling them to interact with external systems, fetch live data, and integrate with various tools seamlessly. This allows Amazon Q to provide more contextually relevant assistance by accessing the information it needs in real-time. Example MCP Architecture Overview +-------------------+ +-------------------+ | | | | | Amazon Q Dev CLI | | External Data | | (MCP Host) | | & Services | | | | | +--------+----------+ +---------+---------+ | | | | v | +--------+-----------------------------+--------+ | | | MCP Servers | | | | +-------------+ +-------------+ | | | | | | | | | AWS Docs | | GitHub | ... | MCP overview 277 Amazon Q Developer User Guide | | MCP Server | | MCP Server | | | | | | | | | +-------------+ +-------------+ | | | +-----------------------------------------------+ <caption> MCP architecture showing how Amazon Q Developer CLI connects to external data sources through MCP servers </caption> Key benefits • Extensibility: Connect Amazon Q to specialized tools for specific domains or workflows • Customization: Create custom tools tailored to your specific needs • Ecosystem Integration: Leverage the growing ecosystem of MCP-compatible tools • Standardization: Use a consistent protocol supported by multiple AI assistants • Flexibility: MCP allows you to switch between different LLM providers while maintaining the same tool integrations • Security: Keep your data within your infrastructure with local MCP servers MCP architecture MCP follows a client-server architecture where: • MCP Hosts: Programs like Amazon Q Developer CLI that want to access data through MCP • MCP Clients: Protocol clients that maintain 1:1 connections with servers • MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol • Local Data Sources: Your computer's files, databases, and services that MCP servers can securely access • Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to Key benefits 278 Amazon Q Developer User Guide Example MCP Communication Flow User | v +------------------+ +-----------------+ +------------------+ | | | | | | | Amazon Q Dev CLI | --> | MCP Client API | --> | MCP Server | | | | | | | +------------------+ +-----------------+ +------------------+ |
amazonq-developer-ug-093 | amazonq-developer-ug.pdf | 93 | • MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol • Local Data Sources: Your computer's files, databases, and services that MCP servers can securely access • Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to Key benefits 278 Amazon Q Developer User Guide Example MCP Communication Flow User | v +------------------+ +-----------------+ +------------------+ | | | | | | | Amazon Q Dev CLI | --> | MCP Client API | --> | MCP Server | | | | | | | +------------------+ +-----------------+ +------------------+ | v +------------------+ | | | External Service | | | +------------------+ <caption> Communication flow between user, Amazon Q Developer CLI, and external services through MCP </caption> Core MCP concepts Tools Tools are executable functions that MCP servers expose to clients. They allow Amazon Q to: • Perform actions in external systems • Process data in specialized ways • Interact with APIs and services • Execute commands on your behalf Tools are defined with a unique name, a description, an input schema (using JSON Schema), and optional annotations about the tool's behavior. Prompts Prompts are predefined templates that help guide Amazon Q in specific tasks. They can: Core MCP concepts 279 User Guide Amazon Q Developer • Accept dynamic arguments • Include context from resources • Chain multiple interactions • Guide specific workflows • Surface as UI elements (like slash commands) Resources Resources represent data that MCP servers can provide to Amazon Q, such as: • File contents • Database records • API responses • Documentation • Configuration data MCP configuration MCP configuration in Amazon Q Developer CLI is managed through JSON files. This section covers how to configure MCP servers to extend Q's capabilities. Configuration files Amazon Q Developer CLI supports two levels of MCP configuration: 1. Global Configuration: ~/.aws/amazonq/mcp.json - Applies to all workspaces 2. Workspace Configuration: .amazonq/mcp.json - Specific to the current workspace If both files exist, their contents are combined. In case of conflicts, the workspace configuration takes precedence. Configuration format The MCP configuration file uses a JSON format with the following structure: { MCP configuration 280 Amazon Q Developer "mcpServers": { "server-name": { "command": "command-to-run", "args": ["arg1", "arg2"], "env": { "ENV_VAR1": "value1", "ENV_VAR2": "value2" } } } } Configuration fields: • mcpServers: Object containing server definitions • server-name: A unique identifier for the MCP server • command: The command to execute to start the MCP server • args: Array of command-line arguments to pass to the command • env: Environment variables to set when running the server Example configurations Basic example: { "mcpServers": { "markdown-tools": { "command": "npx", "args": [ "-y", "@example/markdown-mcp" ] } } } Example with environment variables: { MCP configuration User Guide 281 Amazon Q Developer User Guide "mcpServers": { "api-tools": { "command": "npx", "args": [ "-y", "@example/api-mcp" ], "env": { "API_URL": "https://api.example.com", "API_KEY": "your-api-key" } } } } Configuration reference The complete schema for MCP configuration files: { "mcpServers": { "server-name": { "command": "string", // Required: Command to execute "args": ["string"], // Optional: Command-line arguments "env": { // Optional: Environment variables "ENV_VAR": "string" } ] } } } Environment variable substitution: • ${env:VAR_NAME}: Substitutes the value of the environment variable VAR_NAME • ${file:/path/to/file}: Substitutes the contents of the specified file MCP tools and prompts This section covers how to use MCP tools and prompts with Amazon Q Developer CLI. MCP tools and prompts 282 Amazon Q Developer Understanding MCP tools User Guide MCP tools are executable functions that MCP servers expose to Amazon Q Developer CLI. They enable Q to perform actions, process data, and interact with external systems on your behalf. Each tool in MCP has: • Name: A unique identifier for the tool • Description: A human-readable description of what the tool does • Input Schema: A JSON Schema defining the parameters the tool accepts • Annotations: Optional hints about the tool's behavior and effects Discovering available tools To see what tools are available in your Q CLI session: /tools This command displays all available tools, including both built-in tools and those provided by MCP servers. Tools can have different permission levels that determine how they're used: • Auto-approved: These tools can be used without explicit permission for each invocation • Requires approval: These tools need your explicit permission each time they're used • Dangerous: These tools are marked as potentially risky and require careful consideration before approval Using tools You can use MCP tools in two ways: 1. Natural Language Requests: Simply describe what you want to do, and Q will determine which tool to use. 2. Direct Tool Invocation: You can also explicitly request Q to use a specific tool. MCP tools and prompts 283 Amazon Q Developer Working with prompts User Guide MCP servers can provide |
amazonq-developer-ug-094 | amazonq-developer-ug.pdf | 94 | These tools can be used without explicit permission for each invocation • Requires approval: These tools need your explicit permission each time they're used • Dangerous: These tools are marked as potentially risky and require careful consideration before approval Using tools You can use MCP tools in two ways: 1. Natural Language Requests: Simply describe what you want to do, and Q will determine which tool to use. 2. Direct Tool Invocation: You can also explicitly request Q to use a specific tool. MCP tools and prompts 283 Amazon Q Developer Working with prompts User Guide MCP servers can provide predefined prompts that help guide Q in specific tasks: • List available prompts: /prompts • Use a prompt: • @prompt-name [--args=value] • @server-name/prompt-name [--args=value] Example of using a prompt with arguments: @aws-docs explain-service --service=lambda This would invoke the "explain-service" prompt from the "aws-docs" MCP server, passing "lambda" as the service argument. MCP security When using MCP servers with Amazon Q Developer CLI, it's important to understand the security implications and best practices. Security model The MCP security model in Amazon Q Developer CLI is designed with these principles: 1. Explicit Permission: Tools require explicit user permission before execution 2. Local Execution: MCP servers run locally on your machine 3. Isolation: Each MCP server runs as a separate process 4. Transparency: Users can see what tools are available and what they do Security considerations Key security considerations when using MCP: • Only install servers from trusted sources • Review tool descriptions and annotations before approving • Use environment variables for sensitive configuration MCP security 284 Amazon Q Developer User Guide • Keep MCP servers and the Q CLI updated • Monitor MCP logs for unexpected activity Using the editor command in the CLI The Amazon Q Developer CLI provides an /editor command that opens your preferred text editor to compose complex prompts. This is particularly useful for multi-line prompts, code examples, or when you need to carefully structure your questions. Basic usage To open your default editor with an empty prompt: Amazon Q> /editor To open your editor with initial text: Amazon Q> /editor Write a Python function that calculates Fibonacci numbers When you use the /editor command, Amazon Q creates a temporary file with a .md extension, opens your specified editor with this file, and then reads the content and submits it as your prompt when you save and close the editor. Setting your preferred editor Amazon Q uses your system's $EDITOR environment variable to determine which editor to open. If not set, it defaults to vi. Temporary setting (current session only) To set your editor for the current terminal session only: $ export EDITOR=nano Permanent setting To make your editor preference persistent across sessions, add the export command to your shell configuration file: Using the editor command 285 Amazon Q Developer User Guide # For bash (add to ~/.bashrc) export EDITOR=nano # For zsh (add to ~/.zshrc) export EDITOR=nano # For fish shell (add to ~/.config/fish/config.fish) set -x EDITOR nano After editing your configuration file, either restart your terminal or source the file: $ source ~/.bashrc # or ~/.zshrc Common editor options Here are some common editor options you can use: • vi or vim - Vi/Vim text editor • nano - Nano text editor (beginner-friendly) • emacs - Emacs text editor • code -w - Visual Studio Code (requires VS Code CLI to be installed) • subl -w - Sublime Text (requires Sublime CLI to be installed) Note The -w flag for GUI editors is important as it makes the terminal wait until the file is closed. How it works The /editor command follows this workflow: 1. When you use the /editor command, Amazon Q creates a temporary file with a .md extension 2. Your specified editor opens with this file 3. You write your prompt in the editor and save the file 4. When you close the editor How it works 286 Amazon Q Developer User Guide 5. Amazon Q reads the content and submits it as your prompt 6. The temporary file is automatically cleaned up Working with code in the editor When you write code in the editor, the entire content is sent as your prompt to Amazon Q when you close the editor. The code is not executed locally - it's treated as text input for the AI. Example: Writing and submitting code 1. Type /editor to open your editor 2. Write a Python script in the editor: def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2) # This function seems inefficient # How can I improve it? 3. Save and close the editor 4. Amazon Q will receive this entire text as your prompt and respond with suggestions for improving the code This approach is useful for: • Getting |
amazonq-developer-ug-095 | amazonq-developer-ug.pdf | 95 | prompt to Amazon Q when you close the editor. The code is not executed locally - it's treated as text input for the AI. Example: Writing and submitting code 1. Type /editor to open your editor 2. Write a Python script in the editor: def fibonacci(n): if n <= 1: return n else: return fibonacci(n-1) + fibonacci(n-2) # This function seems inefficient # How can I improve it? 3. Save and close the editor 4. Amazon Q will receive this entire text as your prompt and respond with suggestions for improving the code This approach is useful for: • Getting code reviews • Asking for optimizations • Explaining complex code structures • Providing context for debugging help Combining with other commands The /editor command becomes even more powerful when combined with other Amazon Q CLI commands. Here are some practical combinations to enhance your workflow. Working with code in the editor 287 Amazon Q Developer User Guide Using /editor with /compact The /compact command makes Amazon Q responses more concise. This combination is excellent for efficient code reviews: Amazon Q> /editor # Write in the editor: Please review this Python function that calculates prime numbers: def is_prime(n): if n <= 1: return False if n <= 3: return True if n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return True # Save and close Amazon Q> /compact # This makes Amazon Q provide a concise code review Using /editor with /context The /context command adds files to the conversation context. This combination is useful for discussing code that references other files: Amazon Q> /context path/to/config.json Amazon Q> /editor # Write in the editor: Given the config.json file I just shared, please help me write a Python function that: 1. Loads the configuration 2. Validates all required fields are present 3. Returns a validated config object # Save and close Combining with other commands 288 Amazon Q Developer Using /editor with /clear User Guide The /clear command starts a new conversation. This combination helps when switching topics: Amazon Q> /clear Amazon Q> /editor # Write in the editor: I want to start a new discussion about AWS Lambda cold starts. What are the best practices for minimizing cold start times for Python Lambda functions? # Save and close Using /editor for multi-step conversations The /editor command creates a fresh temporary file each time it's used. You can use it multiple times in a conversation to build on previous responses: # First use of editor for initial complex question Amazon Q> /editor # Write in editor: I need to design a database schema for a library management system. Requirements: - Track books, authors, publishers - Handle member checkouts and returns - Support reservations and waiting lists - Generate overdue notices # After getting Amazon Q's response with initial schema design # Second use of editor for follow-up with specific implementation details Amazon Q> /editor # Write in editor: Based on your proposed schema, I have some follow-up questions: 1. How would you modify the Member table to support different membership tiers? 2. What indexes would you recommend for optimizing checkout queries? 3. Can you show me SQL to create the Books and Authors tables with proper relationships? The benefit of this approach is that you can carefully craft complex follow-up questions that reference the previous conversation, without having to type everything in the command line. Each Combining with other commands 289 Amazon Q Developer User Guide editor session gives you the space and formatting control to compose detailed questions that build on Amazon Q's previous responses. Using /editor with /profile Switch to a different context profile before using the editor for specialized questions: Amazon Q> /profile set aws-developer Amazon Q> /editor # Write detailed AWS-specific questions that benefit from the AWS developer profile context Using /editor with /help If you're unsure about command options, you can use /help before /editor: Amazon Q> /help editor # Review the help information Amazon Q> /editor # Use the editor with better understanding of available options Best practices for command combinations 1. Use /context before /editor when you need to reference specific files 2. Use /editor before /compact when you want concise responses to complex questions 3. Use /clear before /editor when starting a completely new topic 4. Use multiple /editor sessions for complex, multi-part conversations where you need to carefully craft follow-up questions 5. Consider your current profile before using /editor to ensure you're in the right context Tips for effective use • Use the editor for complex prompts that benefit from careful structuring • Include code examples with proper indentation • |
amazonq-developer-ug-096 | amazonq-developer-ug.pdf | 96 | of available options Best practices for command combinations 1. Use /context before /editor when you need to reference specific files 2. Use /editor before /compact when you want concise responses to complex questions 3. Use /clear before /editor when starting a completely new topic 4. Use multiple /editor sessions for complex, multi-part conversations where you need to carefully craft follow-up questions 5. Consider your current profile before using /editor to ensure you're in the right context Tips for effective use • Use the editor for complex prompts that benefit from careful structuring • Include code examples with proper indentation • Organize multi-part questions with clear sections • Use Markdown formatting for better structure Best practices for command combinations 290 Amazon Q Developer User Guide • If you save an empty file, no prompt will be submitted Troubleshooting • Editor not opening: Verify your $EDITOR environment variable is set correctly • "No such file or directory" error: Ensure the editor command is installed and in your PATH • Terminal hanging: For GUI editors, make sure to use the wait flag (e.g., -w) • Content not being submitted: Check that you saved the file before closing the editor Context management and profiles Understanding profiles and context Profiles allow you to switch between sets of contexts that give you unique ways for Amazon Q Developer CLI to interact with you and your systems. Context files contain information like development rules, project details, or coding standards that Amazon Q uses to provide more relevant and tailored responses. There is always a default profile, which contains a global context and workspace context: • Global context: Files that are applied to all profiles • Workspace context: Files specific to the current profile When you add new profiles, they will have their own unique workspace context, allowing you to specify patterns of files that make that profile behave and interact in ways unique to your workflow and processes. For example, you might create: • A "terraform" profile with infrastructure-as-code guidelines • A "python" profile with Python coding standards • A "java" profile with Java best practices By switching profiles, you can quickly change the context that Amazon Q uses to provide responses without having to manually specify these files in each conversation. Troubleshooting 291 Amazon Q Developer Managing profiles User Guide You can manage profiles using either the /profile command or the /context profile commands. Using the /profile command The /profile command allows you to view and switch between different context profiles in the Amazon Q Developer CLI. When you run the /profile command without arguments, it displays a list of available profiles: q chat > /profile Available profiles: * default dev prod staging The asterisk (*) indicates the currently active profile. To switch to a different profile, specify the profile name: q chat > /profile set dev Switched to profile: dev Managing context Context files are markdown files that contain information you want Amazon Q to consider during your conversations. These can include project requirements, coding standards, development rules, or any other information that helps Amazon Q provide more relevant responses. Adding context You can add files or directories to your context using the /context add command: q chat > /context add README.md Managing profiles 292 Amazon Q Developer User Guide Added 1 path(s) to profile context. To add a file to the global context (available across all profiles), use the --global flag: q chat > /context add --global coding-standards.md Added 1 path(s) to global context. You can also add multiple files at once using glob patterns: q chat > /context add docs/*.md Added 3 path(s) to profile context. Viewing context To view your current context, use the /context show command: q chat > /context show Global context: /home/user/coding-standards.md Profile context (terraform): /home/user/terraform-project/README.md /home/user/terraform-project/docs/architecture.md /home/user/terraform-project/docs/best-practices.md Removing context To remove files from your context, use the /context rm command: q chat > /context rm docs/architecture.md Removed 1 path(s) from profile context. To remove files from the global context, use the --global flag: q chat > /context rm --global coding-standards.md Managing context 293 Amazon Q Developer User Guide Removed 1 path(s) from global context. To clear all files from your context, use the /context clear command: q chat > /context clear Cleared all paths from profile context. To clear the global context, use the --global flag: q chat > /context clear --global Cleared all paths from global context. Common use cases Here are some common use cases for context profiles: Using project rules Amazon Q supports project-level rules that can define security guidelines and restrictions. These rules are defined in Markdown files in the .amazonq/rules directory of your project. For example, you can create rules that specify: • Which directories Amazon Q should avoid accessing • Security requirements for generated code • Coding standards and best practices Project |
amazonq-developer-ug-097 | amazonq-developer-ug.pdf | 97 | > /context clear Cleared all paths from profile context. To clear the global context, use the --global flag: q chat > /context clear --global Cleared all paths from global context. Common use cases Here are some common use cases for context profiles: Using project rules Amazon Q supports project-level rules that can define security guidelines and restrictions. These rules are defined in Markdown files in the .amazonq/rules directory of your project. For example, you can create rules that specify: • Which directories Amazon Q should avoid accessing • Security requirements for generated code • Coding standards and best practices Project rules can be added to your context using the /context add command: q chat > /context add .amazonq/rules/*.md Added 3 path(s) to profile context. You can also add project rules to your global context to apply them across all profiles: q chat Common use cases 294 Amazon Q Developer User Guide > /context add --global .amazonq/rules/security-standards.md Added 1 path(s) to global context. For more information about creating and using project rules, see Creating project rules for use with Amazon Q Developer chat in the IDE documentation. Working with multiple projects If you work on multiple projects with different requirements, you can create a profile for each project: q chat > /profile create project-a Created profile: project-a > /context add ./project-a/README.md ./project-a/docs/*.md Added 4 path(s) to profile context. > /profile create project-b Created profile: project-b > /context add ./project-b/README.md ./project-b/docs/*.md Added 3 path(s) to profile context. You can then switch between profiles as you move between projects: q chat > /profile project-a Switched to profile: project-a Different development roles You can create profiles for different roles you perform: q chat > /profile create backend-dev Created profile: backend-dev > /context add backend-standards.md api-docs/*.md Added 4 path(s) to profile context. > /profile create devops Created profile: devops > /context add infrastructure/*.md deployment-guides/*.md Common use cases 295 Amazon Q Developer User Guide Added 5 path(s) to profile context. Using context hooks Context hooks are a feature in Amazon Q Developer CLI that you can use to automatically inject context into your conversations with Q Developer. Instead of manually adding context with the / context command, context hooks run commands and include their output as context. Types of context hooks Q Developer CLI supports two types of context hooks: Conversation start hooks Run once at the beginning of a conversation. Their output is added to the conversation context and persists throughout the session. Per-prompt hooks Run with each user message. Their output is added only to the current prompt. Managing context hooks You can manage context hooks by using the /context hooks command in the Q Developer CLI. View your hooks To view all configured hooks at both global and profile levels: /context hooks This command displays all hooks that are configured for your current profile and at the global level, along with their status (enabled or disabled). Add a hook To add a new context hook: /context hooks add [--global] <name> --trigger <trigger> --command <command> Context hooks 296 Amazon Q Developer <name> A unique name for the hook <trigger> Either per_prompt or conversation_start <command> The shell command to execute --global (Optional) Add the hook to global configuration instead of the current profile Example Adding a git status hook /context hooks add git-status --trigger per_prompt --command "git status --short" Remove a hook To remove an existing context hook: /context hooks rm <name> [--global] Enable or disable hooks To enable a specific hook: /context hooks enable [--global] <name> To disable a specific hook: /context hooks disable [--global] <name> To enable all hooks: /context hooks enable-all [--global] To disable all hooks: Managing context hooks User Guide 297 Amazon Q Developer User Guide /context hooks disable-all [--global] Get help with hooks To display detailed help for the hooks commands: /context hooks help Configurations You can verify the configuration of your hooks at the following locations. If the hook is global: ~/.aws/amazonq/global_context.json If the hook is profile-based: ~/.aws/amazonq/profiles/profile-name/context.json Example use cases The following examples demonstrate common use cases for context hooks. Git status Add a hook to show git status with each prompt: /context hooks add git-status --trigger per_prompt --command "git status --short" This hook runs the git status --short command before each prompt and includes the output in your conversation with Q Developer. This helps Q Developer understand the current state of your git repository when you ask questions about version control or need help with git commands. Project information Add a hook to show project information at the start of a conversation: Example use cases 298 Amazon Q Developer User Guide /context hooks add project-info --trigger conversation_start --command "echo 'Project: '$(basename $(pwd))" This hook runs once at the beginning of your conversation and includes the current project name in the context. This helps Q Developer provide more |
amazonq-developer-ug-098 | amazonq-developer-ug.pdf | 98 | --short command before each prompt and includes the output in your conversation with Q Developer. This helps Q Developer understand the current state of your git repository when you ask questions about version control or need help with git commands. Project information Add a hook to show project information at the start of a conversation: Example use cases 298 Amazon Q Developer User Guide /context hooks add project-info --trigger conversation_start --command "echo 'Project: '$(basename $(pwd))" This hook runs once at the beginning of your conversation and includes the current project name in the context. This helps Q Developer provide more relevant responses that are specific to your project. Tip You can expand this hook to include more project information, such as the programming language, framework, or project structure. Behavior and limitations When you use context hooks, keep the following behaviors and limitations in mind: • Hooks run in parallel to minimize impact on response time • Hook output is formatted and clearly marked in the context • The /clear command re-evaluates conversation start hooks • Hooks are stored in your Q Developer CLI configuration • Currently, only inline command hooks are supported • Hook output is limited to 10KB per hook • Hooks time out after 5 seconds by default Security considerations When you use context hooks, consider the following security best practices: • Context hooks execute shell commands with your current user permissions. Be careful about which commands you include in your hooks, as they have the same access as your user account. • Be careful when adding hooks that might expose sensitive information, such as credentials or personal data. Review the output of your hooks to ensure that they don't include information that you don't want to share. • Consider disabling hooks when they're not needed. This reduces the risk of accidentally exposing sensitive information. Behavior and limitations 299 Amazon Q Developer User Guide • Don't use hooks to run commands that could modify your system or data. Hooks should be used for reading information, not for making changes. • Be cautious when using hooks in shared environments. Other users might be able to see the output of your hooks if they have access to your Q Developer CLI sessions. Warning Never include commands in your hooks that expose passwords, access keys, or other credentials. This information could be stored in your conversation history and potentially exposed to others. Troubleshooting If you encounter issues with context hooks, try the following solutions: Troubleshooting context hooks Issue Solution Hook doesn't run Verify that the hook is enabled with /context hooks Command fails Test the command directly in your terminal to ensure it works Output is too large Modify your command to limit output size Hook times out Optimize your command for faster execution Configuring Amazon Q settings Amazon Q provides various ways to customize its behavior through settings. You can access these settings through both a graphical interface and command-line options. Accessing settings You can access Amazon Q settings in two ways: • Settings GUI: Run q settings to open the graphical settings interface Troubleshooting 300 Amazon Q Developer User Guide • Command line: Use various commands to view and modify settings directly Command line settings management You can manage Amazon Q settings directly from the command line using the following commands: Basic settings commands Command Description q settings Opens the settings GUI interface q settings all Lists all current settings q settings all - Lists all settings in formatted JSON f json-pretty q settings open Opens the settings file in your default editor q settings [KEY] Views or sets a specific setting [VALUE] q settings -d Deletes a specific setting [KEY] When using q settings commands, you can specify the output format: q settings -f [FORMAT] Available formats: • plain: Outputs results as markdown (default) • json: Outputs results as JSON • json-pretty: Outputs results as formatted JSON Command line settings management 301 Amazon Q Developer User Guide Autocomplete and inline suggestions Amazon Q provides commands to manage inline suggestions that appear as you type in your terminal: Inline suggestion commands Command Description q inline enable Enables inline suggestions that appear as you type q inline disable Disables inline suggestions q inline status Shows whether inline suggestions are enabled or disabled q inline set- customization Sets which customization model to use for suggestions q inline show- Shows available customization models customizations Amazon Q supports different customization models for suggestions, which may vary depending on your environment and installation. Other Amazon Q CLI commands Amazon Q offers several other command-line features: Additional CLI commands Command Description q chat Opens an interactive chat session with Amazon Q q translate Translates natural language to shell commands q doctor q update Diagnoses and fixes common installation issues Checks for and installs updates to |
amazonq-developer-ug-099 | amazonq-developer-ug.pdf | 99 | suggestions q inline status Shows whether inline suggestions are enabled or disabled q inline set- customization Sets which customization model to use for suggestions q inline show- Shows available customization models customizations Amazon Q supports different customization models for suggestions, which may vary depending on your environment and installation. Other Amazon Q CLI commands Amazon Q offers several other command-line features: Additional CLI commands Command Description q chat Opens an interactive chat session with Amazon Q q translate Translates natural language to shell commands q doctor q update Diagnoses and fixes common installation issues Checks for and installs updates to Amazon Q q theme Gets or sets the visual theme Autocomplete and inline suggestions 302 Amazon Q Developer User Guide Command Description q integrations Manages system integrations For more information about any command, use the --help flag: q [COMMAND] --help Log files Amazon Q Developer CLI maintains log files that can be useful for troubleshooting. These logs are stored locally on your machine and are not sent to AWS. Log files are located at: • macOS: $TMPDIR/qlog/ • Linux: ~/.local/share/amazonq/logs/ The log level can be controlled by setting the Q_LOG_LEVEL environment variable. Valid values are: • error: Only error messages (default) • warn: Warning and error messages • info: Informational, warning, and error messages • debug: Debug, informational, warning, and error messages • trace: All messages including detailed trace information Warning Log files may contain sensitive information from your conversations and interactions with Amazon Q, including file paths, code snippets, and command outputs. While these logs are stored only on your local machine and are not sent to AWS, you should be cautious when sharing log files with others. Example of setting the log level (for debugging purposes): Log files 303 Amazon Q Developer User Guide # For bash/zsh export Q_LOG_LEVEL=debug q chat # For fish set -x Q_LOG_LEVEL debug q chat Using Amazon Q autocomplete on the command line Amazon Q for command line provides AI-powered autocompletion for hundreds of popular command line tools, including git, npm, docker, and aws. As you type commands, Amazon Q suggests relevant options, subcommands, and arguments based on your current context. Using Amazon Q autocomplete Autocomplete is automatically enabled after you install Amazon Q for command line. To use Amazon Q autocomplete 1. Install the Amazon Q command line. 2. Open your terminal or command prompt. 3. Start typing a command, and Amazon Q will display suggestions for completing your command. 4. Press Tab to accept the suggestion, or continue typing to refine your command. Autocomplete works with hundreds of command line tools, making it easier to remember command options and syntax. Using autocomplete over SSH You can set up Amazon Q autocomplete to work over SSH connections from your local machine. To use autocomplete over SSH 1. Install Amazon Q for command line on your local machine. For more information, see Installing Amazon Q for command line. Autocomplete 304 Amazon Q Developer User Guide 2. Set up SSH integration on both your local machine and remote server. For more information, see Setting up SSH for remote use. 3. Connect to your remote server using SSH: ssh user@remote-server 4. Verify that autocomplete is working by typing a command and checking for suggestions. Amazon Q inline on the command line Amazon Q for command line provides AI-generated completions as you type in the command line. Supported tools Amazon Q autocomplete supports a wide range of command line tools, including: • AWS CLI • Git • Docker Inline 305 Amazon Q Developer • npm • kubectl • terraform • And many more standard Unix/Linux commands Translating natural language to bash User Guide The q translate command lets you write a natural language instruction, such as "copy all files in my current directory to Amazon S3", and Amazon Q translates it to an instantly executable shell code snippet. To translate natural language to bash 1. Open your terminal or command prompt. 2. Use one of the following: • q translate prompt • # prompt For example: # list all ec2 instances in us-west-2 region Amazon Q will translate this to: aws ec2 describe-instances --region us-west-2 You can press Enter to execute the command, or modify it before executing. Configuring autocomplete behavior By default, Amazon Q shows suggestions automatically as you type. You can modify this behavior in two ways: 1. Change when suggestions appear: • Open the settings GUI with q settings • Navigate to the "CLI completions" section Translating 306 Amazon Q Developer User Guide • Enable the option "suggest on [tab]" to only show suggestions when you press Tab 2. Disable inline suggestions completely: q inline disable This gives you control over when and how suggestions appear in your terminal, allowing you to customize the experience to your workflow preferences. Contributing to Amazon Q |
amazonq-developer-ug-100 | amazonq-developer-ug.pdf | 100 | before executing. Configuring autocomplete behavior By default, Amazon Q shows suggestions automatically as you type. You can modify this behavior in two ways: 1. Change when suggestions appear: • Open the settings GUI with q settings • Navigate to the "CLI completions" section Translating 306 Amazon Q Developer User Guide • Enable the option "suggest on [tab]" to only show suggestions when you press Tab 2. Disable inline suggestions completely: q inline disable This gives you control over when and how suggestions appear in your terminal, allowing you to customize the experience to your workflow preferences. Contributing to Amazon Q for command line You can help improve Amazon Q for command line by providing feedback, reporting issues, and suggesting new features. GitHub repository Amazon Q for command line is an open-source project. You can find the source code and contribute to the project on GitHub. Visit the Amazon Q Developer CLI GitHub repository to: • View the source code • Report issues • Submit pull requests • Participate in discussions Reporting issues You can report issues with Amazon Q for command line directly from the command line or through GitHub. To report an issue using the command line 1. Open your terminal or command prompt. 2. Run the following command: q issue Contributing 307 Amazon Q Developer User Guide 3. Follow the prompts to describe the issue you're experiencing. 4. Review the information that will be included in your report, including system information and logs. 5. Confirm to submit the issue report. The issue report will be sent to the Amazon Q team for investigation. To report an issue on GitHub 1. Visit the Issues page on the GitHub repository. 2. Click "New issue". 3. 4. Fill out the issue template with details about the problem you're experiencing. Submit the issue. Providing feedback You can provide feedback on Amazon Q for command line to help improve the product. To provide feedback 1. Open your terminal or command prompt. 2. Run the following command: q feedback 3. Follow the prompts to provide your feedback. Your feedback will be sent to the Amazon Q team and used to improve future versions of the product. RFCs You can participate in discussions about new features and improvements to Amazon Q for command line through the RFC (Request for Comments) process. Visit the Discussions page on the GitHub repository to: • View existing RFCs Providing feedback 308 Amazon Q Developer User Guide • Comment on proposed features • Submit your own RFC for a new feature Telemetry data Amazon Q for command line collects telemetry data to help improve the product. This data includes information about how you use the product, such as which commands you run and how often you use different features. You can opt out of telemetry data collection at any time. To opt out of telemetry data collection 1. Open your terminal or command prompt. 2. Run the following command: q telemetry disable To re-enable telemetry data collection, use the following command: q telemetry enable Telemetry data 309 Amazon Q Developer User Guide Third-party integration with Amazon Q Developer Amazon Q Developer integrates with popular development platforms to enhance your software development workflows through specialized artificial intelligence (AI) capabilities. Supported integrations include and GitLab Duo and GitHub, providing AI-powered assistance throughout the development lifecycle. These integrations help streamline development by automating routine tasks, improving code quality, and accelerating modernization efforts. GitLab Duo with Amazon Q GitLab Duo with Amazon Q Developer provides a comprehensive suite of AI experiences integrated directly into your GitLab workflows. Available for GitLab Self-Managed offering and Ultimate tier subscribers, the integration enables quick actions in GitLab issues and merge requests to trigger AI capabilities. The integration also includes GitLab Duo Chat powered by Amazon Q, providing contextual assistance throughout your development process. GitLab Duo with Amazon Q provides: • Feature development of high-level ideas with a quick action in GitLab issues • Code reviews for code quality, issues, and security concerns with a quick action in merge requests • Code modernization to latest supported Java version with a quick action in GitLab issues • Unit test generation with a quick action in merge requests • Integrated chat support for development tasks To get started, see Set up GitLab Duo with Amazon Q. GitHub with Amazon Q (preview) The Amazon Q Developer integration with GitHub enables automated feature development, code reviews, and Java modernization through specialized AI agents. When you assign a GitHub issue to Amazon Q Developer, it uses the issue and project code as context to generate new code and create a pull request. During the development process, you can provide feedback and Amazon Q Developer iterates on the suggested code, creating a collaborative development workflow. Amazon Q Developer offers the following key capabilities in GitHub: |
amazonq-developer-ug-101 | amazonq-developer-ug.pdf | 101 | support for development tasks To get started, see Set up GitLab Duo with Amazon Q. GitHub with Amazon Q (preview) The Amazon Q Developer integration with GitHub enables automated feature development, code reviews, and Java modernization through specialized AI agents. When you assign a GitHub issue to Amazon Q Developer, it uses the issue and project code as context to generate new code and create a pull request. During the development process, you can provide feedback and Amazon Q Developer iterates on the suggested code, creating a collaborative development workflow. Amazon Q Developer offers the following key capabilities in GitHub: GitLab Duo with Amazon Q 310 Amazon Q Developer User Guide • Feature development label that automatically implements new features and bug fixes from idea to pull request • Automated code reviews of new pull requests for code quality, issues, and security concerns • Code transformation label that automatically upgrades codebase to supported Java version • Iterative development by providing feedback on generated code and implementing • Browser extensions to quickly assign feature development and code transformation tasks to Amazon Q Developer To get started, see Quickstart: Installing, using features in GitHub, and increasing usage limits. GitLab Duo with Amazon Q GitLab Duo with Amazon Q provides a suite of artificial intelligence (AI) experiences, such as propose code implementation for your idea, transform your code to Java 17, review merge requests for quality and vulnerabilities, and suggest unit tests. Additionally, you can use the GitLab Duo Chat feature that supports Amazon Q to address developmental tasks, such as vulnerability explanation, troubleshoot failed pipelines, and code refactoring. It's available for the GitLab Self- Managed offering and the Ultimate tier subscription (GitLab Duo with Amazon Q subscription add- on). For more information, see the GitLab plans in the GitLab documentation. After configuring GitLab Duo with Amazon Q, you can use quick actions in GitLab issues and merge request comments to trigger the AI capabilities. For more information, see GitLab Duo concepts and Getting started with GitLab Duo with Amazon Q. To learn about all features available on GitLab Duo with Amazon Q, see Additional supported features in the GitLab documentation. Topics • GitLab Duo concepts • Getting started with GitLab Duo with Amazon Q • Customizing a CI/CD pipeline for code transformation • Troubleshooting issues for GitLab Duo with Amazon Q GitLab Duo concepts Here are some concepts and terms to know when using GitLab Duo with Amazon Q. Topics GitLab Duo 311 Amazon Q Developer User Guide • Configuring GitLab Duo with Amazon Q • Onboarding with AWS identity provider and IAM role creation • GitLab quick actions Configuring GitLab Duo with Amazon Q Before you can use Amazon Q artificial intelligence (AI) capabilities in GitLab, you must first do the following: • Have a self-managed instance with GitLab 17.8.0 or later. • Have a GitLab Ultimate subscription with Amazon Q (no trial access). • Turn on GitLab Duo features (experimental and beta features are off by default). For more information, see Turn on beta and experimental features. • Create an IAM identity provider for GitLab. For more information, see Create an IAM identity provider in the GitLab documentation. • Create an IAM role that trusts the IAM identity provider is able to access Amazon Q in GitLab, which requires the use of specific permissions. For more information, see Create an IAM role in the GitLab documentation. Onboarding with AWS identity provider and IAM role creation As part of the GitLab Duo onboarding process, you need to create an Amazon Q Developer profile through the Amazon Q Developer console. The profile allows you to create customization and control settings for all or a subset of users in your identity provider. After creating a profile, you need an OpenID Connect (OIDC) identity provider (IdP), as well as an IAM service role, to establish trust between GitLab Duo and your AWS account. To learn how to create the required resources and set up GitLab Duo with Amazon Q, see Set up GitLab Duo with Amazon Q in the GitLab documentation. When the new IAM role is created, the required trust policy with the necessary permissions is also created. A role trust policy is a required resource-based policy that is attached to a role in IAM. You need to add a permissions policy, which grants ability to connect with Amazon Q and utilize the features in the GitLab Duo with Amazon Q integration. The policy must be added when creating the IAM role. To learn more about the permissions provided by the permissions policy, see GitLabDuoWithAmazonQPermissionsPolicy. GitLab Duo concepts 312 Amazon Q Developer User Guide Alternatively, you can create an inline policy and add the required permissions. You can choose to create an inline policy if you want to custom access control. For more |
amazonq-developer-ug-102 | amazonq-developer-ug.pdf | 102 | a required resource-based policy that is attached to a role in IAM. You need to add a permissions policy, which grants ability to connect with Amazon Q and utilize the features in the GitLab Duo with Amazon Q integration. The policy must be added when creating the IAM role. To learn more about the permissions provided by the permissions policy, see GitLabDuoWithAmazonQPermissionsPolicy. GitLab Duo concepts 312 Amazon Q Developer User Guide Alternatively, you can create an inline policy and add the required permissions. You can choose to create an inline policy if you want to custom access control. For more information, see Managed policies and inline policies and Policies and permissions in AWS Identity and Access Management in the IAM User Guide. Trust policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sts:AssumeRoleWithWebIdentity", "Principal": { "Federated": "arn:aws:iam::{{AWS_Account_ID}}:oidc-provider/ auth.token.gitlab.com/cc/oidc/{{Instance_ID}}" }, "Condition": { "StringEquals": { "auth.token.gitlab.com/cc/oidc/{{Instance_ID}}:aud": "gitlab-cc- {{Instance_ID}}" }, } } ] } Permissions policy { "Version": "2012-10-17", "Statement": [ { "Sid": "GitLabDuoUsagePermissions", "Effect": "Allow", "Action": [ "q:SendEvent", "q:CreateAuthGrant", "q:UpdateAuthGrant", "q:GenerateCodeRecommendations", "q:SendMessage", "q:ListPlugins", GitLab Duo concepts 313 Amazon Q Developer User Guide "q:VerifyOAuthAppConnection" ], "Resource": "*" }, { "Sid": "GitLabDuoManagementPermissions", "Effect": "Allow", "Action": [ "q:CreateOAuthAppConnection", "q:DeleteOAuthAppConnection" ], "Resource": "*" }, { "Sid": "GitLabDuoPluginPermissions", "Effect": "Allow", "Action": [ "q:CreatePlugin", "q:DeletePlugin", "q:GetPlugin" ], "Resource": "arn:aws:qdeveloper:*:*:plugin/GitLabDuoWithAmazonQ/*" } ] } Optionally, you can also use customer managed keys (CMK) to encrypt your resources if you want full control over the lifecycle and usage of your key. The kms:ViaService condition key to limit who can use CMK for encrypting and decrypting content. For more information, see Manage access to Amazon Q Developer for third-party integration. GitLab quick actions When invoked, quick actions perform tasks for you in GitLab issues and merge requests. To learn how to invoke quick actions in GitLab, see the GitLab documentation. Merge request generation and iteration • /q dev – Allows you to go from a high-level idea captured in a GitLab issue to having Amazon Q generate a ready-to-review merge request with the proposed code implementation. This helps streamline the process of turning concepts into working code. The merge request is created in a new branch and Amazon Q assigns the issue creator as a merge request reviewer. You're GitLab Duo concepts 314 Amazon Q Developer User Guide also provided a merge request summary. For more information, see Turn an idea into a merge request. • /q dev (revise) – Allows you to iterate on the proposed code implementation provided by Amazon Q rather than starting again from an issue. Amazon Q reviews your feedback and makes updates to the code that was originally generated. You’re also provided with commit messages for each change being made. The description following each iteration is updated and a comment describing the feedback is incorporated into the iteration. You can then review and merge the suggestions to your code. For more information, see Make code changes based on feedback. Code transformation • /q transform – Allows you to initiate the upgrade process from Java Maven 8 or Java Maven 11 to Java Maven 17 project. Starting from a GitLab issue, Amazon Q analyzes the code to determine the necessary Java upgrades or modernization, updates the issue, automatically opens a new merge request with the proposed changes, and assigns the issue creator as a reviewer. You need a GitLab Runner setup to build, and it needs to be customized for code transformation. For more information, Customizing a CI/CD pipeline for code transformation and Upgrade Java. Note The source version of a Maven project needs to be identified before you can transform your code, so your compiler settings need to be set within a pom.xml file. Therefore, your pom.xml file must have a source and target. Unit test generation • /q test – Allows you to generate unit tests for new added lines of source code in your merge request. Amazon Q comments with unit test suggestions that can be added to your test file. You can apply the generated tests at once or review each test individually before applying. If a test file isn’t found in the merge request, Amazon Q provides the unit tests that you can manually add to a test file. For more information, see Create test coverage. Code review • /q review – Allows you to initiate a merge request review in GitLab Duo with Amazon Q. An automatic code review is initiated for new merge requests. As a GitLab administrator, you can GitLab Duo concepts 315 Amazon Q Developer User Guide also configure Amazon Q to turn off automatic reviews. Automated code reviews identify and fix potential issues as Amazon Q generates and suggests code fixes to your merge request. Additionally, automated code reviews provide quality checks, analyzing for quality issues, logical errors, anti-patterns, code duplication, and more. Amazon Q iterates |
amazonq-developer-ug-103 | amazonq-developer-ug.pdf | 103 | information, see Create test coverage. Code review • /q review – Allows you to initiate a merge request review in GitLab Duo with Amazon Q. An automatic code review is initiated for new merge requests. As a GitLab administrator, you can GitLab Duo concepts 315 Amazon Q Developer User Guide also configure Amazon Q to turn off automatic reviews. Automated code reviews identify and fix potential issues as Amazon Q generates and suggests code fixes to your merge request. Additionally, automated code reviews provide quality checks, analyzing for quality issues, logical errors, anti-patterns, code duplication, and more. Amazon Q iterates on in-line feedback you provide and gives you code analysis with comments, with each comment providing a separate finding. After committing Amazon Q feedback, the merge request description is updated. This quick action is available for all languages. You can configure code review to run automatically on every new merge request within your GitLab instance or group. For more information, see Review a merge request. Chat session in web UI and IDEs • GitLab Duo Chat and Code Suggestions works with Amazon Q to provide support for CI/CD configuration, error explanations, and addressing questions. You can use slash commands in a chat session to invoke the GitLab Duo with Amazon Q chat capabilities. For more information, see Ask GitLab Duo Chat. Getting started with GitLab Duo with Amazon Q GitLab Duo with Amazon Q brings artificial intelligence (AI) capabilities directly into your software development operations and source code management workflows. You can get started with GitLab Duo with Amazon Q using a self-managed GitLab instance and an GitLab Ultimate subscription that's synchronized with GitLab. You need to create an Amazon Q Developer profile, add a connection with an OpenID Connect (OIDC) identity provider, and create an IAM role to access Amazon Q from GitLab. For more information, see Onboarding with AWS identity provider and IAM role creation. To learn how to create the required resources and set up GitLab Duo with Amazon Q, see Set up GitLab Duo with Amazon Q in the GitLab documentation. At any time, you can configure the availability of GitLab Duo with Amazon Q by turning it on or off for your instance, group, or project. For more information, see Turn off GitLab Duo with Amazon Q. Once you set up GitLab Duo with Amazon Q, you can begin using the AI capabilities of Amazon Q in GitLab to transform your code to Java 17, review merge requests for quality and vulnerabilities, and suggest unit tests. You can also use the GitLab Duo Chat feature that supports Amazon Q to address developmental tasks, such as vulnerability explanation, troubleshoot failed pipelines, and code refactoring. Getting started 316 Amazon Q Developer User Guide Before you can invoke code transformation, you must have at least one GitLab Runner available for your project that must be customized. For more information, see Customizing a CI/CD pipeline for code transformation. To learn more about how to invoke quick actions in GitLab issues and merge requests, see GitLab Duo with Amazon Q. Customizing a CI/CD pipeline for code transformation Amazon Q for code transformation performs some of its capabilities using static analysis, and this requires your compile and test scope dependencies to be provided in addition to your project source code. Code transformation for GitLab uses a GitLab CI/CD job to provide access to those dependencies. Before you can invoke code transformation for your project, you need the following: • At least one GitLab Runner. • CI/CD feature must be enabled on the project. • A .gitlab-ci.yml committed on the project’s default branch. To customize a CI/CD pipeline for code transformation 1. If your project doesn't already have a GitLab CI/CD pipeline, create one using the Maven.gitlab-ci.yml template provided by GitLab. For more information, see Create a project pipeline.. 2. Update the .gitlab-ci.yml file with the following job: q-code-transformation: stage: build script: - 'mvn $MAVEN_CLI_OPTS test-compile' - 'mvn $MAVEN_CLI_OPTS dependency:copy-dependencies - DoutputDirectory=dependencies -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true - Dmdep.addParentPoms=true' artifacts: name: q-code-transformation-dependencies paths: - dependencies/* rules: - if: $CI_COMMIT_REF_NAME =~ /^q\/transform-/ && $CI_PIPELINE_SOURCE == 'push' when: always Customizing a CI/CD pipeline 317 Amazon Q Developer User Guide • The first mvn invocation validates that your project compiles before Amazon Q code transformation attempts to process it. The goal may be one of test-compile, test, integration-test, or verify. • The second mvn invocation copies project dependencies to a staging directory to include them as job artifacts. • The artifacts section uploads the copied dependencies so they can be accessed by Amazon Q code transformation. • The rules section configures this job to only run on branch names that start with q/ transform-* when a new commit is pushed. That isn't the case when a merge request is opened. Dynamically selecting a Java version When Amazon Q |
amazonq-developer-ug-104 | amazonq-developer-ug.pdf | 104 | project compiles before Amazon Q code transformation attempts to process it. The goal may be one of test-compile, test, integration-test, or verify. • The second mvn invocation copies project dependencies to a staging directory to include them as job artifacts. • The artifacts section uploads the copied dependencies so they can be accessed by Amazon Q code transformation. • The rules section configures this job to only run on branch names that start with q/ transform-* when a new commit is pushed. That isn't the case when a merge request is opened. Dynamically selecting a Java version When Amazon Q code transformation opens a merge request in GitLab after completing, your project pipeline runs whichever jobs are configured to run for merge requests. Since the updated code targets Java 17, these jobs encounter build errors if the job attempts to build them using Java 8 or Java 11. The following is an advanced .gitlab-ci.yml that uses Docker and dynamically chooses Java 17 when jobs are running on a merge request with a branch name starting with q/transform- *. Once you decide to merge the opened request to your default branch, you need to modify your .gitlab-ci.yml to use Java 17 by default. variables: MAVEN_OPTS: >- -Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true -Dmaven.install.skip=true MAVEN_CLI_OPTS: >- --batch-mode --errors --fail-at-end --show-version --no-transfer-progress -DinstallAtEnd=true Customizing a CI/CD pipeline 318 Amazon Q Developer -DdeployAtEnd=true BUILD_IMAGE: maven:3-openjdk-8 workflow: rules: - if: $CI_COMMIT_REF_NAME =~ /^q\/transform-/ && $CI_PIPELINE_SOURCE == 'merge_request_event' variables: BUILD_IMAGE: maven:3-openjdk-17 User Guide - when: always image: $BUILD_IMAGE cache: paths: - .m2/repository compile: stage: build script: - 'mvn $MAVEN_CLI_OPTS compile' verify: stage: test script: - 'mvn $MAVEN_CLI_OPTS verify' q-code-transformation: stage: build script: - 'mvn $MAVEN_CLI_OPTS test-compile' - 'mvn $MAVEN_CLI_OPTS dependency:copy-dependencies -DoutputDirectory=dependencies -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true -Dmdep.addParentPoms=true' artifacts: name: q-code-transformation-dependencies paths: - dependencies/* rules: - if: $CI_COMMIT_REF_NAME =~ /^q\/transform-/ && $CI_PIPELINE_SOURCE == 'push' when: always Customizing a CI/CD pipeline 319 Amazon Q Developer User Guide Troubleshooting issues for GitLab Duo with Amazon Q Consult the following section to trobuleshoot common onboarding problems when using GitLab Duo with Amazon Q. GitLab instance blocks inbound requests Problem: My GitLab instance blocks inbound requests, and Amazon Q can't call back into my GitLab instance. Solution: Identify what's blocking the inbound request, and make modifications to accept inbound requests from Amazon Q, which could be in the form of one of the following: • A proxy • A firewall layer • Denylist or allowlist at any infrastructure layer You need to reonboard to your GitLab instance to resync. For more information, see Set up GitLab Duo with Amazon Q in the GitLab documentation. Connection between Gitlab and Amazon Q out of sync Problem: I modified GitLab Duo with Amazon Q application and now the connection between GitLab and Amazon Q is out of sync. Solution: When GitLab and Amazon Q are out of sync, it can lead to invalid credentials, inability to refresh credentials, and unauthorized response from GitLab when Amazon Q calls into GitLab. Instance domain name not resolvable Problem: I modified the GitLab instance URL after onboarding, and now the connection between GitLab and Amazon Q are out of sync. Amazon Q ins't able to call the GitLab instance successfully anymore. Solution: You need to ensure the domain name is resolvable. Reonboard to your GitLab instance. For more information, see Set up GitLab Duo with Amazon Q in the GitLab documentation. Incorrect IAM role and identity provider (IdP) Problem: My IAM role doesn't provide the correct permissions to the APIs required by GitLab Duo with Amazon Q. Troubleshooting 320 Amazon Q Developer User Guide Solution: Ensure the identity provider (IdP) and IAM roles are set up correctly. For more information, see Set up GitLab Duo with Amazon Q in the GitLab documentation. Amazon Q Developer profile doesn't exist Problem: I'm trying to onboard to GitLab Duo with Amazon Q, but coming across the following issue: Application could not be craeted by the AI Gateway: Error 400 - {"detail":"An error occured (ValidationException) when calling the CreateOAuthAppConnection operation: ProfileDoesNotExist"} Solution: You need to first create an Amazon Q Developer profile through the Amazon Q Developer console. For more information, see Set up GitLab Duo with Amazon Q in the GitLab documentation. Amazon Q Developer for GitHub (Preview) Note Amazon Q Developer for GitHub is in preview release and is subject to change. Amazon Q Developer for GitHub or GitHub Enterprise Cloud allows you to leverage Amazon Q Developer capabilities for your software development workflows. With specialized development agents, you can implement new ideas, review code for quality issues, address vulnerabilities with unit tests, and modernize legacy Java applications. Once the agent completes a task, you can provide feedback, and the agent iterates on the previous solution. For more information, see Amazon Q Developer agents. You can access the Amazon Q Developer integration through GitHub and |
amazonq-developer-ug-105 | amazonq-developer-ug.pdf | 105 | GitHub (Preview) Note Amazon Q Developer for GitHub is in preview release and is subject to change. Amazon Q Developer for GitHub or GitHub Enterprise Cloud allows you to leverage Amazon Q Developer capabilities for your software development workflows. With specialized development agents, you can implement new ideas, review code for quality issues, address vulnerabilities with unit tests, and modernize legacy Java applications. Once the agent completes a task, you can provide feedback, and the agent iterates on the previous solution. For more information, see Amazon Q Developer agents. You can access the Amazon Q Developer integration through GitHub and authorize it to provide access to your organization's repositories. To get started with Amazon Q Developer for GitHub, see Quickstart: Installing, using features in GitHub, and increasing usage limits. Important To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and Roles in organization in the GitHub documentation. GitHub (Preview) 321 Amazon Q Developer Note User Guide The Amazon Q Developer integration with GitHub processes data in the United States. For more information, see Cross-region processing in Amazon Q Developer. Topics • Installing Amazon Q Developer app and authorizing access • Amazon Q Developer agents • Registering app installation • Using browser extensions in GitHub • Quickstart: Installing, using features in GitHub, and increasing usage limits • Developing features and iterating with Amazon Q Developer in GitHub • Reviewing code with Amazon Q Developer in GitHub • Transforming code with Amazon Q Developer in GitHub • Customizing a workflow for code transformation • Increasing usage limits and configuring details in Amazon Q Developer console • Configuring registered installation details Installing Amazon Q Developer app and authorizing access As a GitHub organization administrator, you can install and configure the Amazon Q Developer app from GitHub for free without the need to set up an AWS account to get started. During the installation process, you choose to provide access to all or selected repositories in your GitHub organization. After installing and authorizating, you have access to free usage for the Amazon Q Developer features in GitHub. You can increase free usage by registering the app installation in the Amazon Q Developer console. For more information, see Quickstart: Installing, using features in GitHub, and increasing usage limits. Important To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, Installing Amazon Q Developer app and authorizing access 322 Amazon Q Developer User Guide see Requirements to install a GitHub App and Roles in organization in the GitHub documentation. Amazon Q Developer agents Amazon Q Developer agents provide support across the software development lifecycle from coding, testing, and deploying to troubleshooting and modernizing applications. • Amazon Q development agent – After creating an issue and adding the feature development label, Amazon Q Developer automatically implements your new features and bug fixes. Amazon Q Developer creates a pull request with the changes and a summary of the changes. For more information, see Developing features and iterating with Amazon Q Developer in GitHub. • Amazon Q code review agent – When a new pull request is created, Amazon Q Developer automatically performs a code review and provides feedback on code quality, potential issues, and security concerns. Amazon Q Developer also generates fixes for the identified issues, which you can review and choose to commit to the pull request. For more information, see Reviewing code with Amazon Q Developer in GitHub. • Amazon Q transform agent – After creating an issue and adding the code transformation label, Amazon Q Developer transforms your code from Java version 8 or 11 to version 17. Amazon Q Developer creates a pull request with the changes and summary of the changes. For more information, see Transforming code with Amazon Q Developer in GitHub. Important The Amazon Q Developer app attempts to automatically create the Amazon Q development agent and the Amazon Q transform agent labels in GitHub repositories you authorize access to. If the labels are not automatically created, or if they're unintentionally deleted, you can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. Amazon Q Developer agents 323 Amazon Q Developer User Guide Registering app installation The Amazon Q Developer integration for GitHub is available for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for feature development and code transformation, as well as limited number |
amazonq-developer-ug-106 | amazonq-developer-ug.pdf | 106 | can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. Amazon Q Developer agents 323 Amazon Q Developer User Guide Registering app installation The Amazon Q Developer integration for GitHub is available for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for feature development and code transformation, as well as limited number of lines for code reviews per month. You can increase free usage by registering your Amazon Q Developer app installation with your AWS account. For more information, see Increasing usage limits and configuring details in Amazon Q Developer console. Important To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and OAuth apps and organizations in the GitHub documentation. Using browser extensions in GitHub You can use the Amazon Q Developer extension in a supported browser to quickly add a label for feature development or code transformation in GitHub issues without having to search through label menus. The Amazon Q Developer extension is available for the following browsers: • Google Chrome • Mozilla Firefox • Microsoft Edge Quickstart: Installing, using features in GitHub, and increasing usage limits Note Amazon Q Developer for GitHub is in preview release and is subject to change. This tutorial provides a walkthrough of the following tasks: Registering app installation 324 Amazon Q Developer User Guide 1. Install the Amazon Q Developer app from the GitHub Marketplace and provide access to your repositories. 2. Get started with Amazon Q Developer in an issue by adding a label for either feature development or code transformation, or by creating a new pull request for code review. 3. (Optional) Register your Amazon Q Developer app installation with your AWS account to increase your usage limits. Step 1: Install Amazon Q Developer in GitHub and authorize access You can use Amazon Q Developer in GitHub free without the need to set up an AWS account to get started. The first step to using Amazon Q Developer in GitHub is to install the app from GitHub . During this process, you can provide Amazon Q Developer access to all your GitHub repositories or selected repositories. Important To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and Roles in organization in the GitHub documentation. To install Amazon Q Developer and authorize access 1. Navigate to the Amazon Q Developer for GitHub app page. 2. If necessary, sign in to your GitHub account using your GitHub credentials. 3. Review the Amazon Q Developer app's overview and features, and then choose Install. 4. Do one of the following to configure access to your GitHub repositories: a. b. To provide access to all current and future repositories, choose All repositories. To provide access to specific repositories, choose Only select repositories, choose the Select repositories dropdown, and then choose a repository you want to allow to access to. 5. Choose Install to complete installing Amazon Q Developer in GitHub and authorizing it to access your repositories. Quickstart 325 Amazon Q Developer User Guide After installing the app in GitHub and authorizing access, you're redirected to the Amazon Q Developer overview page in GitHub. You can navigate to your GitHub repository to begin using the Amazon Q Developer features. Step 2: Using Amazon Q Developer features in GitHub After installing the Amazon Q Developer app in GitHub and authorizing access to your repositories, you can begin using the Amazon Q Developer agents for support across the software development lifecycle from coding, testing, and deploying to troubleshooting and modernizing applications. For more information, see one of the following: Important The Amazon Q Developer app attempts to automatically create the Amazon Q development agent and the Amazon Q transform agent labels in GitHub repositories you authorize access to. If the labels are not automatically created, or if they're unintentionally deleted, you can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. • Developing features and iterating with Amazon Q Developer in GitHub • Reviewing code with Amazon Q Developer in GitHub • Transforming code with Amazon Q Developer in GitHub Step 3: Increase free usage limits and configure details You |
amazonq-developer-ug-107 | amazonq-developer-ug.pdf | 107 | access to. If the labels are not automatically created, or if they're unintentionally deleted, you can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. • Developing features and iterating with Amazon Q Developer in GitHub • Reviewing code with Amazon Q Developer in GitHub • Transforming code with Amazon Q Developer in GitHub Step 3: Increase free usage limits and configure details You can use Amazon Q Developer agents in GitHub for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for feature development and code review, as well as limited number of lines of code transformation per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. Registering also provides with the ability to configure details such as disabling code reviews and adding tags for searching and filtering. For more information, see Increasing usage limits and configuring details in Amazon Q Developer console. Quickstart 326 Amazon Q Developer Important User Guide To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and OAuth apps and organizations in the GitHub documentation. Developing features and iterating with Amazon Q Developer in GitHub Note Amazon Q Developer for GitHub is in preview release and is subject to change. You can use Amazon Q Developer in GitHub to streamline development by automatically implementing new features and bug fixes, taking tasks from idea to a completed pull request. When you add the feature development label to an issue, it uses the issue, including its title and description, as well as repository code as context to generate new code fixes and create a pull request. On the pull request, you can provide feedback and Amazon Q Developer iterates on the suggested code. You can have Amazon Q Developer perform feature development a limited number of times per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. For more information, see Increasing usage limits and configuring details in Amazon Q Developer console. Important The Amazon Q Developer app attempts to automatically create the Amazon Q development agent and the Amazon Q transform agent labels in GitHub repositories you authorize access to. If the labels are not automatically created, or if they're unintentionally deleted, you can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. Developing features and iterating 327 Amazon Q Developer User Guide To use Amazon Q Developer for feature development 1. If necessary, sign in to your GitHub account using your GitHub credentials. 2. Navigate to your GitHub organization, and then navigate to the repository you want to implement new features with Amazon Q Developer. 3. Choose Issues, and then create a new issue or choose an existing issue. For more information, see Create an issue in the GitHub documentation. • For a new issue, in the Add a title text input field, enter a title that provides context to Amazon Q Developer for the feature development (example: "Create an image recognition app"). The issue description should also be included as it also provides context. For an existing issue, you can edit the issue title and description to provide context to Amazon Q Developer for the feature development. For more informaiton, see Editing an issue in the GitHub documentation. 4. When creating an issue or configuring an existing issue, apply the feature development Amazon Q Developer label. Do one of the following to apply the label to the issue: a. b. Choose the Assign to Amazon Q dropdown menu provided as a browser extension, and then choose the Amazon Q development agent label. In the right side menu, choose Labels, and then choose the Amazon Q development agent label. 5. For a new issue, choose Create issue to finish creating the issue with the necessary details for Amazon Q Developer to develop features. If you configure an existing issue, ensure you save the changes. For more informaiton, see Editing an issue in the GitHub documentation. When Amazon Q Developer finishes generating code changes for the feature development, it comments on the issue and opens a pull request. 6. Navigate to the comment left by Amazon |
amazonq-developer-ug-108 | amazonq-developer-ug.pdf | 108 | then choose the Amazon Q development agent label. In the right side menu, choose Labels, and then choose the Amazon Q development agent label. 5. For a new issue, choose Create issue to finish creating the issue with the necessary details for Amazon Q Developer to develop features. If you configure an existing issue, ensure you save the changes. For more informaiton, see Editing an issue in the GitHub documentation. When Amazon Q Developer finishes generating code changes for the feature development, it comments on the issue and opens a pull request. 6. Navigate to the comment left by Amazon Q Developer (example: "I finished generating the proposed code changes and opened a pull request: Resolve Create an image recognition app"), and then choose the pull request link. You can also navigate to the Pull requests tab, and then choose the pull request created by Amazon Q Developer. 7. Choose the Files changed tab to view the code changes. 8. If you're satisfied with the suggested code changes, you can merge the pull request. For more information, see Merge a pull request. Developing features and iterating 328 Amazon Q Developer User Guide You can also review the pull request for the feature development and iterate on the suggested code changes by providing feedback to Amazon Q Developer. To iterate on Amazon Q Developer feature development code 1. Choose the pull request created by Amazon Q Developer, and then choose the Files changed tab to view the code changes. 2. For the line of code you want to leave feedback for and have Amazon Q Developer iterate, choose + to add a comment with feedback, and then choose Start a review. After you submit the review, Amazon Q Developer begins reviewing the code based on your feedback. When Amazon Q Developer is done revising your feedback, it commits the changes to the pull request and updates you with a comment. 3. Choose Finish your review, choose the Request changes radio button, and then choose Submit review to have your feedback reviewed. 4. If you're satisfied with the updated code changes, you can merge the pull request or iterate on the code again with new feedback. For more information, see Merge a pull request. Amazon Q Developer integrates with GitHub Actions workflows to create an intelligent feedback loop system. When a pull request is created, configured workflows, such as unit tests, automatically execute. If the workflow fails, Amazon Q Developer analyzes the output, and based on the results and failure information, it iterates on the code changes. As code changes are pushed and workflows execute, Amazon Q Developer interprets the results and uses this information to refine its approach. That creates a continuous learning loop where each iteration builds upon previous attempts and Amazon Q Developer is able to evolve its solutions. The effectiveness of a feedback loop is dependent on having well-defined tests and workflows that provide meaningful feedback to Amazon Q Developer to interpret and act upon. You can configure workflows using GitHub Actions YAML files in your repository, allowing for customized testing and validation processes that Amazon Q Developer can respond to. For more information, see Understanding GitHub Actionsin the GitHub documentation. Reviewing code with Amazon Q Developer in GitHub Note Amazon Q Developer for GitHub is in preview release and is subject to change. Reviewing code 329 Amazon Q Developer User Guide Amazon Q Developer enables automated code reviews within GitHub. When you create a new pull request, Amazon Q Developer automatically performs a code review and provides feedback on code quality, potential issues, and high-severity findings. Amazon Q Developer also generates fixes for the identified issues, which you can review and choose to commit to the pull request. You can have Amazon Q Developer perform a code review for a limited amount of lines per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. For more information, see Increasing usage limits and configuring details in Amazon Q Developer console. Note If the code review capability was previously disabled, it must be enabled in the Amazon Q Developer console before you can apply the label in GitHub. For more information, see Editing features for Amazon Q Developer in GitHub. To use Amazon Q Developer for code reviews and apply fixes 1. If necessary, sign in to your GitHub account using your GitHub credentials. 2. Navigate to your GitHub organization, and then navigate to the repository you want to perform a code review with Amazon Q Developer. 3. Create a new a pull request for changes made to your source code. For more information, see Creating a pull request in the GitHub documentation. When you create a new pull request, Amazon Q Developer automatically begins a |
amazonq-developer-ug-109 | amazonq-developer-ug.pdf | 109 | in GitHub. For more information, see Editing features for Amazon Q Developer in GitHub. To use Amazon Q Developer for code reviews and apply fixes 1. If necessary, sign in to your GitHub account using your GitHub credentials. 2. Navigate to your GitHub organization, and then navigate to the repository you want to perform a code review with Amazon Q Developer. 3. Create a new a pull request for changes made to your source code. For more information, see Creating a pull request in the GitHub documentation. When you create a new pull request, Amazon Q Developer automatically begins a code review to find potential issues. Once Amazon Q Developer completes the review, it submits each finding as a separate comment, as well as suggested fixes that you can commit to the pull request. 4. Review the proposed code changes by Amazon Q Developer, choose Commit suggestion, and then choose Commit changes to update the pull request. 5. If you're satisfied with the suggested code fixes, you can merge the pull request to apply the code changes suggested by Amazon Q Developer. For more information, see Merging a pull request in the GitHub documentation. Reviewing code 330 Amazon Q Developer User Guide Transforming code with Amazon Q Developer in GitHub Note Amazon Q Developer for GitHub is in preview release and is subject to change. With the code transformation feature, you can update your technology stack, enhance performance, and ensure future compatibility while preserving the core functionality of your existing code. With Amazon Q Developer, you can avoid technical debt and build your applications for long-term sustainability and scalability. When you add the code transformation label to an issue, Amazon Q Developer transforms your code from Java version 8 or 11 to version 17. Amazon Q Developer then creates a pull request with the changes and summary of the changes that you can merge into your mainline. You can have Amazon Q Developer perform a code transformation a limited number of times per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. For more information, see Increasing usage limits and configuring details in Amazon Q Developer console. Prerequisites Before transforming you codebase with Amazon Q Developer, consider the following requirements: • Ensure your GitHub repository has GitHub Actions enabled. For more information, see Understanding GitHub Actions and Enabling a workflowin the GitHub documentation. • Create and configure your workflow file in the .github/workflows/ directory to handle code transformation tasks. For more information, see Customizing a workflow for code transformation. After meeting the prerequisites, you can apply the Amazon Q transform agent label and upgrade your codebase in your GitHub repository. Important The Amazon Q Developer app attempts to automatically create the Amazon Q development agent and the Amazon Q transform agent labels in GitHub repositories you Transforming code 331 Amazon Q Developer User Guide authorize access to. If the labels are not automatically created, or if they're unintentionally deleted, you can manually create them in GitHub. The labels must be named as Amazon Q development agent and Amazon Q transform agent in order for them to be recognized and processed as Amazon Q Developer labels. For more information, see Creating a label in the GitHub documentation. To upgrade your codebase 1. If necessary, sign in to your GitHub account using your GitHub credentials. 2. Navigate to your GitHub organization, and then navigate to the repository you want to transform your codebase. 3. Choose Issues, and then create a new issue. For more information, see Create an issue in the GitHub documentation. 4. In the Add a title text input field, enter a title that provides context to Amazon Q Developer for code transformation (example: "Upgrade codebase"). The issue description should also be included as it also provides context. 5. When creating an issue, apply the code transformation Amazon Q Developer label. Do one of the following to apply the label to the issue: a. b. Choose the Assign to Amazon Q dropdown menu provided as a browser extension, and then choose the Amazon Q transform agent label. In the right side menu, choose Labels, and then choose the Amazon Q transform agent label. 6. Choose Create issue to finish creating the issue with the necessary details for Amazon Q Developer to transform your code. When Amazon Q Developer finishes generating code changes for the feature development, it will comment on the issue and opens a pull request. 7. Navigate to the comment left by Amazon Q Developer (example: "I finished upgrading your code and opened a pull request: Resolve Upgrade codebase."), and then choose the pull request link. You can also navigate to the Pull requests tab, and then choose the pull request created by Amazon Q |
amazonq-developer-ug-110 | amazonq-developer-ug.pdf | 110 | the Amazon Q transform agent label. 6. Choose Create issue to finish creating the issue with the necessary details for Amazon Q Developer to transform your code. When Amazon Q Developer finishes generating code changes for the feature development, it will comment on the issue and opens a pull request. 7. Navigate to the comment left by Amazon Q Developer (example: "I finished upgrading your code and opened a pull request: Resolve Upgrade codebase."), and then choose the pull request link. You can also navigate to the Pull requests tab, and then choose the pull request created by Amazon Q Developer. 8. Choose the Files changed tab to view the changes. Transforming code 332 Amazon Q Developer User Guide 9. If you're satisfied with the suggested code changes, you can merge the pull request. For more information, see Merge a pull request. Amazon Q Developer leaves a comment that provides a transformation summary with details regarding files that it updated. You can find the summary in the build_logs.txt file provided in the comment. If Amazon Q Developer can't perform a complete code transformation, it also provides a summary regarding the errors that prevented the complete transformation. Customizing a workflow for code transformation Note Amazon Q Developer for GitHub is in preview release and is subject to change. When the Amazon Q Developer code transformation agent creates a pull request in GitHub after completing the task, your project pipeline runs the jobs that are configured to run for pull requests. Since the updated code targets Java 17, the jobs encounter build errors if the job attempts to build them using Java 8 or Java 11. Before you apply the Amazon Q transform agent label to a GitHub issue, you need to create and configure a workflow file in the .github/workflows/ directory to handle code transformation tasks. To customize a workflow for code transformation 1. If your repository doesn't already have a workflow, create a GitHub Actions workflow file. For more information, see Quickstart for GitHub actions and Creating an example workflow in the GitHub documentation. 2. Update your workflow file with the following job: q-code-transformation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: java-version: '17' distribution: 'adopt' Customizing a workflow 333 Amazon Q Developer User Guide - name: Build and copy dependencies run: | mvn ${{ env.MAVEN_CLI_OPTS }} verify mvn ${{ env.MAVEN_CLI_OPTS }} dependency:copy-dependencies - DoutputDirectory=dependencies -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true - Dmdep.addParentPoms=true - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: q-code-transformation-dependencies path: dependencies Dynamically selecting a Java version for GitHub workflow The following dynamically code snippet dynamically chooses Java 17 when jobs are running on a pull request created by the Amazon Q code transform agent. When you decide to merge the open pull request to your default branch, you need to modify your workflow file in the .github/ workflows/ directory to use Java 17 by default. name: Q Code Transformation on: push: branches: - 'Q-TRANSFORM-issue-*' env: MAVEN_CLI_OPTS: >- -Djava.version=${{ contains(github.event.head_commit.message, 'Code transformation completed') && '17' || '1.8' }} jobs: q-code-transformation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: java-version: ${{ contains(github.event.head_commit.message, 'Code transformation completed') && '17' || '8' }} Customizing a workflow 334 Amazon Q Developer User Guide distribution: 'adopt' - name: Build and copy dependencies run: | mvn ${{ env.MAVEN_CLI_OPTS }} verify mvn ${{ env.MAVEN_CLI_OPTS }} dependency:copy-dependencies - DoutputDirectory=dependencies -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true - Dmdep.addParentPoms=true - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: q-code-transformation-dependencies path: dependencies Increasing usage limits and configuring details in Amazon Q Developer console Note Amazon Q Developer for GitHub is in preview release and is subject to change. You can use Amazon Q Developer agents in GitHub for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for the feature development and code review capabilities, as well as specified number of lines for code transformation per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. By default, the Code reviews, Feature development, and Code transformation features are enabled in GitHub when you install the app. You can disable any of these features when you register. Registering requires an Amazon Q Developer profile to manage the features from the console. The profile stores your settings and code recommendation customization. Increase usage limits and configuration 335 Amazon Q Developer Important User Guide To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and OAuth apps and organizations in the GitHub documentation. To register your Amazon Q Developer installation 1. Navigate to the Amazon Q Developer console, and in the navigation pane, choose Amazon Q Developer in GitHub. 2. Choose Register installation, and then |
amazonq-developer-ug-111 | amazonq-developer-ug.pdf | 111 | profile to manage the features from the console. The profile stores your settings and code recommendation customization. Increase usage limits and configuration 335 Amazon Q Developer Important User Guide To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see Requirements to install a GitHub App and OAuth apps and organizations in the GitHub documentation. To register your Amazon Q Developer installation 1. Navigate to the Amazon Q Developer console, and in the navigation pane, choose Amazon Q Developer in GitHub. 2. Choose Register installation, and then choose Authorize to be directed to GitHub. If you previously authorized Amazon Q Developer to access your GitHub organization, you'll be redirected back to the Amazon Q Developer console. In this case, skip to step 4. 3. Sign in to your GitHub account using your GitHub credentials. If you have multiple accounts, choose the account where you want to provide access to Amazon Q Developer. 4. Choose Authorize Amazon Q Developer to provide access to your GitHub account. You'll be redirected back to Amazon Q Developer console after the authorization. 5. Enter details for an Amazon Q Developer profile. If you previously created a profile when getting started with Amazon Q Developer, skip to step 6. To learn more about account types for Amazon Q Developer, see Subscribing users to Amazon Q Developer Pro. • Under Amazon Q Developer profile, enter your profile details. i. ii. In the Profile name text input field, enter a name that can be recognized and referenced. Consider including the region so the profile name can be properly identified (example: "QDevProfile_us-east-1"). (Optional) Choose Additional settings, and in the Profile description - optional text input field, enter a description for your profile to provide context and identify your profile. 6. Under Registration details, enter your GitHub details, optionally configure the code reviews feature, and add tags. a. In the Registration name text input filed, enter a name for your app installation. Increase usage limits and configuration 336 Amazon Q Developer User Guide b. c. d. (Optional) In the Organization name - optional text input field, enter a name for the organization associated with the app installation. (Optional) Under Features, configure the Code reviews feature by choosing the toggle to enable or disable the feature. Feature development and Code transformation configuration cannot be modified. The features are enabled by default. (Optional) Under Tags - optional, choose Add new tag to add a tag that can help to search and filter your AWS resources in GitHub. 7. Choose Register to create an Amazon Q Developer profile and register your app installation in GitHub with your AWS account. After you successfully create an Amazon Q Developer profile and register the app installation in GitHub, you can view the registration details. You can still enable or disable features, as well as add tags at a later time. You can also delete a GitHub app installation. For more information Configuring registered installation details. Configuring registered installation details Note Amazon Q Developer for GitHub is in preview release and is subject to change. After you create an Amazon Q Developer profile and register the app installation in GitHub, you can do the following from the Amazon Q Developer console: • Enable or disable the use of code reviews. Feature development and code transformation configuration cannot currently be modified. • Find links to browser extensions that provide a way to add Amazon Q Developer feature labels in the GitHub issues. • Add tags to search and filter your resources or track AWS costs. • Delete a GitHub app installation registration. Configuring 337 Amazon Q Developer User Guide Editing features for Amazon Q Developer in GitHub The features available for Amazon Q Developer in GitHub are enabled by default when you install the app in GitHub and provide authorization to access your organization. You can choose to disable a feature if you no longer want to use the feature in GitHub. To enable or disable a feature for Amazon Q Developer in GitHub 1. Navigate to the Amazon Q Developer console. 2. In the navigation pane, under Amazon Q Developer in GitHub, choose Registered installations. 3. Under the Name column, choose the registration name for the installation you want to enable or disable a feature. 4. Under Features, choose Edit to configure the feature availability. 5. In the modal, choose the toggle for the feature you want to enable or disable, and then choose Save to confirm the changes. After enabling or disabling a feature in the Amazon Q Developer console, the changes are reflected in GitHub. Attempting to assign an issue to a Amazon Q Developer label after disabling the feature will lead to an error. Code reviews will no longer take place |
amazonq-developer-ug-112 | amazonq-developer-ug.pdf | 112 | installations. 3. Under the Name column, choose the registration name for the installation you want to enable or disable a feature. 4. Under Features, choose Edit to configure the feature availability. 5. In the modal, choose the toggle for the feature you want to enable or disable, and then choose Save to confirm the changes. After enabling or disabling a feature in the Amazon Q Developer console, the changes are reflected in GitHub. Attempting to assign an issue to a Amazon Q Developer label after disabling the feature will lead to an error. Code reviews will no longer take place in new pull requests if the feature is disabled. Installing browser extensions You can install the Amazon Q Developer extension in one of the supported browsers. The extension enables you to quickly assign feature development or code transformation tasks to Amazon Q Developer in GitHub issues without having to search through label menus. The Amazon Q Developer extension is available for the following browsers: • Google Chrome • Mozilla Firefox • Microsoft Edge You can also view the supported browsers on the registration installation details page in the Amazon Q Developer console. Configuring 338 Amazon Q Developer User Guide Deleting Amazon Q Developer GitHub app installation registration You can delete a registration for one or more of your GitHub app installation through the Amazon Q Developer console. After permanently deleting your registration, all data associated with the registration is also deleted. The action can't be undone. To delete your GitHub app installation 1. Navigate to the Amazon Q Developer console. 2. In the navigation pane, under Amazon Q Developer in GitHub, choose Registered installations. 3. Do one of the following: • Under the Actions column, choose Delete registration for the installation you want to delete. • Under the Name column, choose the registration name for the installation you want to delete, and the choose Delete. Under the Actions column, choose Delete registration for registered installation you want to delete. 4. 5. In the modal, review the details for deleting registration. In the text input field, enter confirm, and then choose Delete to confirm the changes. Once you delete a GitHub app installation, you can choose to register a new installation. Configuring 339 Amazon Q Developer User Guide Chatting with Amazon Q Developer in chat applications You can chat with Amazon Q Developer in Microsoft Teams and Slack chat applications. In configured channels, Amazon Q can answer questions about best practices for building solutions, troubleshooting issues, and identifying next steps. The following Amazon Q chat features are available in configured chat applications: • Chatting about AWS • Chatting about your resources with Amazon Q Developer • Troubleshooting resource issues • Chatting about your costs • Chatting about your telemetry and operations • Amazon Q network troubleshooting for Reachability Analyzer For more information about the complete set of features available when you use Amazon Q in chat applications, see What is Amazon Q Developer in chat applications? in the Amazon Q Developer in chat applications Administrator Guide. Note When you use Amazon Q Developer in chat applications, access is limited to the Amazon Q Developer Free tier. Enable Amazon Q chat in your channels To add chat capabilities to a Microsoft Teams or Slack channel that is already configured with Amazon Q Developer, complete the following steps. To set up Amazon Q Developer in your chat applications for the first time and allow users to chat with Amazon Q, see Get started with Microsoft Teams and Get started with Slack in the Amazon Q Developer in chat applications Administrator Guide. Before you can ask Amazon Q questions from a Microsoft Teams or Slack channel, you need to add Amazon Q to the channel. First, update your AWS Identity and Access Management (IAM) role settings to include the AmazonQDeveloperAccess managed policy, and then add the policy as a channel guardrail. If you need administrator access, add the AmazonQFullAccess policy instead. Enable Amazon Q chat in your channels 340 Amazon Q Developer User Guide 1. Add the AmazonQDeveloperAccess managed policy to your IAM role: a. b. c. d. e. f. Sign in to the AWS Management Console and open the IAM console. In the navigation pane of the IAM console, choose Roles. Choose the name of the role that you want to modify. In Permissions policies, choose Add permissions and Attach policies. Enter AmazonQDeveloperAccess in the search. Select AmazonQDeveloperAccess. g. Choose Add permissions. 2. Add the AmazonQDeveloperAccess managed policy to your channel guardrails: a. Open the Amazon Q Developer in chat applications console. b. Choose a configured client. c. Select a configured channel. d. Choose Set guardrails. e. f. Enter AmazonQDeveloperAccess in the search. Select AmazonQDeveloperAccess. g. Choose Save. Ask Amazon Q questions in your channel To check that your configuration was successful, ask |
amazonq-developer-ug-113 | amazonq-developer-ug.pdf | 113 | navigation pane of the IAM console, choose Roles. Choose the name of the role that you want to modify. In Permissions policies, choose Add permissions and Attach policies. Enter AmazonQDeveloperAccess in the search. Select AmazonQDeveloperAccess. g. Choose Add permissions. 2. Add the AmazonQDeveloperAccess managed policy to your channel guardrails: a. Open the Amazon Q Developer in chat applications console. b. Choose a configured client. c. Select a configured channel. d. Choose Set guardrails. e. f. Enter AmazonQDeveloperAccess in the search. Select AmazonQDeveloperAccess. g. Choose Save. Ask Amazon Q questions in your channel To check that your configuration was successful, ask Amazon Q a question. Enter @Amazon Q followed by your question. Following are some examples of questions that you can ask Amazon Q from your configured channel: • @Amazon Q how do I troubleshoot lambda concurrency issues? • @Amazon Q what are the best practices for securing S3 buckets? • @Amazon Q what is the maximum zipped file size for a lambda? • @Amazon Q get the configuration for my lambda function name? • @Amazon Q what is the size of the auto scaling group name in us-east-2? • @Amazon Q can you show ec2 instances running in us-east-1? Ask Amazon Q questions in your channel 341 Amazon Q Developer User Guide Customizing suggestions Note Customizations are supported for the following features of Amazon Q Developer: • inline suggestions – see Generating inline suggestions • chat in the IDE – see Chatting about code With customizations, Amazon Q Developer can assist with software development in ways that conform to your team's internal libraries, proprietary algorithmic techniques, and enterprise code style. An Amazon Q customization is a set of elements that enables Amazon Q to provide you with suggestions based on your company's codebase. You connect a data source that contains your code base, and Amazon Q uses your content to provide assistance that caters to the style of your organization's developers. Your customizations are fully isolated from each other within your account. They are also isolated from the data of other customers. Only users specified by a Amazon Q Developer administrator have access to any specific customization. Before a Amazon Q administrator can specify which users can access which customizations, you must authorize that administrator permission to do so. For more information, see Prerequisites for Amazon Q customizations. Topics • Prerequisites for Amazon Q customizations • Creating your customization • Deleting your customization • Optimizing your customization • Logging and troubleshooting • Activating your Amazon Q customizations • Updating your Amazon Q customizations • Adding users and groups to your Amazon Q customizations • Using Amazon Q customizations 342 Amazon Q Developer User Guide Prerequisites for Amazon Q customizations Amazon Q customizations build upon the foundation of Amazon Q Developer Pro, and uses its features. To use Amazon Q customizations you must first follow the Amazon Q Developer Pro setup process under Getting started with Amazon Q Developer. This includes adding any users to your Amazon Q Developer Pro profile that you also wish to grant access to Amazon Q Customizations. Authorizing your administrator When you use Amazon Q Customizations, your Amazon Q administrator must be authorized to access your codebase, which you can store on Amazon S3 or through AWS CodeConnections. However, during the standard setup process for Amazon Q Developer Pro, your AWS Organizations administrator does not provide the Amazon Q administrator with access to those services. This means that to create customizations, administrators need additional permissions. For an example policy that grants the needed permissions, see Allow administrators to create customizations. Note If you are using GitHub as your data source, you can restrict usage to certain repositories. See Create a connection to GitHub in the Developer Tools Console User Guide. Note The encryption key that you set up for Amazon Q Developer Pro is also used for customizations. Preparing your data It's important to create your customization using the best possible source material. When preparing your data source, add code containing patterns that are encouraged on your team. Avoid code containing anti-patterns, bugs, security vulnerabilities, performance issues, and so forth. To prepare your data source, follow these guidelines: Preparing 343 Amazon Q Developer User Guide • Your data source must contain at least 2 MB, and at most 20 GB, of source code files from supported languages. Any file in your data source that's larger than 10 MB will be ignored. • There is no limit on the number of files in your data source, but you must include at least 10 files for each language that you want your customization to support. • File names and individual directory names must not exceed 255 characters. (Cumulatively, they can exceed 255 characters.) Exceeding these limits causes the customization creation to fail. • In the Amazon S3 data |
amazonq-developer-ug-114 | amazonq-developer-ug.pdf | 114 | Your data source must contain at least 2 MB, and at most 20 GB, of source code files from supported languages. Any file in your data source that's larger than 10 MB will be ignored. • There is no limit on the number of files in your data source, but you must include at least 10 files for each language that you want your customization to support. • File names and individual directory names must not exceed 255 characters. (Cumulatively, they can exceed 255 characters.) Exceeding these limits causes the customization creation to fail. • In the Amazon S3 data source, all source code must be placed within a directory and not at the root level. Any files at the root level will be ignored. Note For information on supported languages for customizations and what file types are used to create customizations, see Language support for customizations. You can store information about the creation of your customizations in Amazon CloudWatch Logs. For more information, see Accessing customization-related messages in Amazon CloudWatch Logs. Creating your customization This section explains how to create a customization with Amazon Q. To create your customization, follow this procedure: 1. Subscribe users to Amazon Q Developer Pro. Subscribing users will install the Amazon Q Developer profile, which is necessary to create customizations. For more information about subscribing users, see Subscribing users to Amazon Q Developer Pro. 2. 3. 4. 5. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane on the left, choose Customizations. The customizations page will appear. 6. Choose Create customization. 7. Enter a customization name and (optional) description. Creating 344 Amazon Q Developer Note User Guide Use both names and descriptions that will be informative to your developers. Developers from your organization who are authorized to use Amazon Q Developer Pro will be able to see them in their IDE through the AWS plugin. Connecting to your data source Before you create a customization, you must connect to the data source that contains your codebase. How you do this depends on where your data source is. If your data source is in Github, GitLab, or Bitbucket, then you can connect to it with AWS CodeConnections. Otherwise, place your data in a folder within an Amazon S3 bucket. To learn more about CodeConnections, see What are connections? in the Developer Tools console User Guide. To connect to your data source through CodeConnections 1. Under Connection to source provider, select AWS CodeStar CodeConnections. 2. If you want to use an existing connection, choose Select a connection. Then, under Choose repository selection, do one of the following: • To use all the repositories in the connection to generate the customization, choose Use all repositories in this connection. • To select specific repositories to generate the customization, choose Select specific repositories and then choose Choose repositories. In the the pop-up window, find the repositories you want to use, and then choose Add. Connecting to your data source 345 Amazon Q Developer Note User Guide Although there is no limit to the number of repositories you can include in a customization, you are restricted to 100 when you individually select them. If you want to use more than 100 repositories, choose the Use all repositories option, or place the repositories in Amazon S3 and follow the instructions for connecting your data source through Amazon S3. 3. If you want to create a new connection, choose Create a new connection and follow the remaining steps of this procedure. 4. In the pop-up window that opens, navigate to your data source and follow the instructions in the console. 5. After you create your data source, return to the Create customization page. 6. Under Select a connection, select your connection from the dropdown. To connect to your data source through Amazon S3 1. Under Connection to source provider, select Amazon S3. 2. Choose Browse Amazon S3. 3. Navigate to your codebase and make a note of the URI. The codebase must be in a folder within the Amazon S3 bucket, not the bucket's root. For more information, see Creating, configuring, and working with Amazon S3 buckets and Access control best practices in the Amazon S3 User Guide. 4. Paste the URL into the field labeled Enter Amazon S3 URI. Before you create your customization, you have the option of adding tags to it. Connecting to your data source 346 Amazon Q Developer User Guide To learn more about tags, see the Tagging your AWS resources User Guide. After following the procedures above, choose Create customization. Customizations and your data Amazon Q customizations use your content to present suggestions to you in the style of your organization's developers. However, AWS will not store or use your content in any context that does not |
amazonq-developer-ug-115 | amazonq-developer-ug.pdf | 115 | the Amazon S3 User Guide. 4. Paste the URL into the field labeled Enter Amazon S3 URI. Before you create your customization, you have the option of adding tags to it. Connecting to your data source 346 Amazon Q Developer User Guide To learn more about tags, see the Tagging your AWS resources User Guide. After following the procedures above, choose Create customization. Customizations and your data Amazon Q customizations use your content to present suggestions to you in the style of your organization's developers. However, AWS will not store or use your content in any context that does not directly serve your enterprise. AWS will not use your content to provide code suggestions to other customers. Amazon Q will not reference code reviews for other customers (or for you). For more information, see Amazon Q Developer service improvement. Troubleshooting the creation of your customization • You may receive the error: Total size of the provided repositories exceeds the maximum allowed size of number for a customization. In that case, remove a repository from your data source and try again. • You may receive the error: Insufficient data to create a customization. Add more files from supported languages and retry. In order for code written in a particular language to be used to create a customization, there must be at least 10 files containing code in that language in your data source. Your data source must contain at least 2 MB, while it is recommended to have close to 20MB, and at most 20 GB, of source code files from supported languages. Some files, even if they are in the relevant language, will not count toward the 2 MB. For example, duplicate files and files in an unsupported format will not be counted. If you receive this error, add more files containing the programming language that is the focus of your customization, and try again. Customizations and your data 347 Amazon Q Developer User Guide • You may receive the error: Encountered an issue when retrieving some of the selected repositories from CodeConnections. Check the customization's log deliveries for details. If you receive this error, try creating or updating the customization again with valid repositories that your connection has access to. Deleting your customization This section explains how to delete a customization with Amazon Q. Warning Deleting a customization will delete all versions associated with the resource. To delete your customization, follow this procedure: 1. 2. 3. 4. 5. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane on the left, choose Customizations. The customizations page will appear. If the customization that you want to delete is still active, choose Deactivate. 6. Choose Delete. Note You can also delete a customization from the page that gives the details of that customization. To do that, just choose Delete from the upper right corner of the customization detail page. Optimizing your customization This page explains how to optimize your customization. Deleting 348 Amazon Q Developer User Guide Optimizing your customization This section contains suggestions for optimizing your suggestion . • Consider expanding your data source to include more code repositories. • If you primarily included data from limited programming languages, consider expanding to more languages. • Remove auto-generated files and repositories, or those generated from templates. Including such files is typically not valuable, and tends to just add noise. • It is possible that your codebase does not frequently use internal libraries. If you know this to be true, then the core Amazon Q model may already have been performing as well as possible. Optimizing for the languages you use In order for code in a particular language to be used in a customization, you must include at least 20 data files containing that language, and all of your source files together must come to at least 2 MB. If your developers write code in a language that is not supported by your customization, Amazon Q's recommendations in that language will come from the Amazon Q base model (not your customization). In other words, they will be the same recommendations that you would receive if you did not have a customization. This, in turn, could affect the metrics on your dashboard. For example, the "Lines of code generated by Amazon Q" may be less than what it would have been if the language commonly used by your developers had been included in your customization. Logging and troubleshooting Setting up log delivery Amazon Q can provide you with log files that will help you understand and troubleshoot issues with your customization. You can have your log files sent to a Amazon CloudWatch Logs. group, an Amazon S3 bucket, an Amazon Data Firehose, or any combination. To set up log delivery, select the Log deliveries |
amazonq-developer-ug-116 | amazonq-developer-ug.pdf | 116 | turn, could affect the metrics on your dashboard. For example, the "Lines of code generated by Amazon Q" may be less than what it would have been if the language commonly used by your developers had been included in your customization. Logging and troubleshooting Setting up log delivery Amazon Q can provide you with log files that will help you understand and troubleshoot issues with your customization. You can have your log files sent to a Amazon CloudWatch Logs. group, an Amazon S3 bucket, an Amazon Data Firehose, or any combination. To set up log delivery, select the Log deliveries tab on the console page for your customization. Follow the instructions in the interface to configure your log deliveries. Then choose Create log deliveries. Optimizing 349 Amazon Q Developer User Guide The prefix of logs delivered to an Amazon S3 bucket will be: AWSLogs/account_id/ codeWhispererCustomizationLogs/region/customization_id/year/month/day/hour/ The files will be zipped, with the naming format: account_id_codeWhispererCustomizationLogs_customization_id_date_file_id.log.gz Warning In order to get the most use out of customization logs, it's best to set up log delivery within five minutes of creating the customization. To learn more about the permissions required to delivery logs to multiple resources, see Logging that requires additional permissions [V2] in the Amazon CloudWatch Logs User Guide. Understanding customization-related log messages The following table lists log messages that may help you understand issues with your customization. Log message Log level Starting to ingest number repos Info from source source Downloading data from repo: repo Info name Received amount MB of supported Error data. amount MB required. Add more data and retry. The provided CodeStar Connection Error ARN: Arn is invalid. Access denied when attempting Error to reach the provided CodeStar Connection: Arn Understanding Amazon CloudWatch Logs 350 Amazon Q Developer Log message Log level User Guide Failed to download with AWS Error CodeStar Connection: Arn probably deleted by customer ProviderThrottlingException from Error CodeStar Connection: Arn while cloning repository: repository Processing data from S3: S3 URI Invalid S3 path specified: S3 Directory Info Error Unable to access the provided S3 Error bucket: bucket name The provided S3 bucket: bucket name Error does not exist. The provided S3 key S3 URI does not Error exist. Failed to ingest number of failed Error repos / total number of repos repositories Unable to process repository: repo Warn name, with a size of repo size GB, exceeds the limit of max size GB. Unable to process file: file name, Error with a size of file size, which exceeds the limit of max file size MB Understanding Amazon CloudWatch Logs 351 Amazon Q Developer Log message Log level User Guide Unable to process collection: Error collection name , with total size of total repo size MB, which exceeds the limit of max total repo size MB The following languages will be Info used for customization: list of languages . Languages may be excluded from customization if they are not sufficiently represented in your files. Understanding customization-related error messages in the console The following table will help you understand customization-related messages in the Amazon Q console. Error message Suggested action You have activated the maximum number of customizations. Deactivate an active customization and try again. You have exceeded the maximum number of Remove a group and retry. group permissions limit of limit. You have exceeded the maximum number of Remove a user and retry. user permissions limit of limit. Maximum active jobs reached. Wait until an in-progress job in the same account has finished. Retry the operation. Encountered an unexpected error when processing the request. Retry the operation. If it continues to fail, contact customer support. Understanding console error messages 352 Amazon Q Developer Error message Suggested action User Guide Encountered an issue when retrieving some of the selected repositories from CodeConne Try creating or updating the customiza tion again with valid repositories that your ctions. Check the customization's log deliverie connection has access to. s for details. Access denied when attempting to reach the provided AWS CodeConnections connection. Validate permissions on your connection and on your third-party provider. Then retry the operation. One or more repositories not found while accessing the provided AWS CodeConnections Validate permissions and list of repos from the third-party provider. Then retry the operation. connection. The provided AWS CodeConnections connectio n ARN is invalid. Update the customization with a corrected Connection ARN. The Host associated with the provided AWS CodeConnections connection is unavailable. Try again in 5 minutes. Invalid Amazon S3 path specified. Update the customization with a valid Amazon S3 URI. Unable to access the provided Amazon S3 bucket. Validate permissions for the admin's role. Retry after fixing any permission issues. The provided Amazon S3 bucket does not exist. Update the customization with a valid Amazon S3 URI. The provided Amazon S3 key does not exist. Update the customization with |
amazonq-developer-ug-117 | amazonq-developer-ug.pdf | 117 | retry the operation. connection. The provided AWS CodeConnections connectio n ARN is invalid. Update the customization with a corrected Connection ARN. The Host associated with the provided AWS CodeConnections connection is unavailable. Try again in 5 minutes. Invalid Amazon S3 path specified. Update the customization with a valid Amazon S3 URI. Unable to access the provided Amazon S3 bucket. Validate permissions for the admin's role. Retry after fixing any permission issues. The provided Amazon S3 bucket does not exist. Update the customization with a valid Amazon S3 URI. The provided Amazon S3 key does not exist. Update the customization with a valid Amazon S3 URI. Insufficient data to create a customization. Add more files from supported languages and retry. Add more data to the same data source, and update the customization with the same reference. Understanding console error messages 353 Amazon Q Developer Error message Suggested action User Guide Total size of the provided repositories exceeds the maximum allowed size of size for a customization. Remove some data from the provided data source. Update the customization with the same reference. You have created the maximum number of customizations. Delete an existing customiza tion and try again. Delete the current customization and retry. Customizations exist within the account. You must delete all customizations prior to Delete all customizations associated with the account and retry. deleting the profile. Activating your Amazon Q customizations Activating a version This section describes how to activate and deactivate a version of your customization. You can activate a new version of a customization, even while developers from your organization are using the previous version. After you activate the new version, the developers will seamlessly begin using it, with no adjustments needed on the development side. You can also roll your customization back to a previously active state. However, Amazon Q does not actually re-activate a previously activated version. Instead, it creates a new version by copying a previous version and then activating the copy. For example, suppose that you have three versions: 1, 2, and 3. The active version is 3. You decide to go back to version 1. But "re-activating" version 1 is actually just copying version 1 and creating version 4. That's the version you use: version 4, the new copy of the old version. To activate a version of your customization, follow this procedure: 1. 2. 3. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane on the left, choose Customizations. The customizations page will appear. Activating 354 Amazon Q Developer User Guide 4. Choose the customization you want to activate a version for. The customization details page will appear. 5. Choose the version you want to activate from the Versions table. 6. Choose Activate. To deactivate a customization, choose Deactivate from the dropdown. Updating your Amazon Q customizations A customization is created based on a snapshot of your data source at the time of creation. You might want to update your Amazon Q customization if: • You updated the files in your data source, and you want to re-create your customization with the new files. • You want to switch the data source from AWS CodeConnections to Amazon S3, or the reverse. • You want to change the repositories referenced in a CodeConnections data source. A customization can have multiple versions. Amazon Q administrators have access to a maximum of three versions for each customization: • the latest version • the currently active version • the most recently active version that is not currently active Creating a new version To create a new version of your customization, follow this procedure: 1. 2. 3. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane on the left, choose Customizations. The customizations page will appear. Updating 355 Amazon Q Developer User Guide 4. Choose the customization for which you want to create a new version. The customization details page will appear. 5. Do one of the following: • Select Create new version from the Actions dropdown. • Choose the Sources tab, and then choose Update. The Update customization page appears. Select Create new version from the Actions dropdown. (Optional) Change the data source. 6. 7. 8. (Optional) If you selected the CodeConnections data source, change the repositories associated with the connection. 9. Choose Create. If you receive error messages, see Troubleshooting the creation of your customization. Adding users and groups to your Amazon Q customizations This section contains information about how to add users and groups to customizations. Note You must activate a customization before you can add users to it. Adding users and groups 356 Amazon Q Developer Note User Guide You can only add a user or group to a customization if you have already added |
amazonq-developer-ug-118 | amazonq-developer-ug.pdf | 118 | (Optional) Change the data source. 6. 7. 8. (Optional) If you selected the CodeConnections data source, change the repositories associated with the connection. 9. Choose Create. If you receive error messages, see Troubleshooting the creation of your customization. Adding users and groups to your Amazon Q customizations This section contains information about how to add users and groups to customizations. Note You must activate a customization before you can add users to it. Adding users and groups 356 Amazon Q Developer Note User Guide You can only add a user or group to a customization if you have already added the user or group to your Amazon Q Developer Pro profile. For more information, see Amazon Q Developer Pro tier. 1. 2. 3. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation panel, choose Customizations. 4. Choose the name of the customization to which you want to add users or groups. 5. In the bottom half of the window, if necessary, select the Users and groups tab. and then the Users or Groups sub-tab. 6. Select the users or groups that require access to your customization. 7. Choose Add users or Add groups. Using Amazon Q customizations This section contains information about how to use customizations as a developer. Amazon Q only supports customizations in VS Code and JetBrains IDEs. Note Customizations are supported for the following features of Amazon Q Developer: • inline suggestions – see Generating inline suggestions • chat in the IDE – see Chatting about code Visual Studio Code To use customizations with Visual Studio Code: 1. Authenticate to Amazon Q Developer Pro with IAM Identity Center using the steps in Installing the Amazon Q Developer extension or plugin in your IDE. Using 357 Amazon Q Developer User Guide 2. In the Developer Tools pane, under Amazon Q, choose Select Customization. 3. At the top of the window, from the dropdown menu, select the appropriate customization. JetBrains To use customizations in JetBrains IDEs: 1. Authenticate to Amazon Q Developer Pro with IAM Identity Center using the steps in Installing the Amazon Q Developer extension or plugin in your IDE. 2. 3. In the Developer Tools pane, under Amazon Q, choose Select Customization. In the pop-up window, select the appropriate customization. 4. Choose Connect. Eclipse To use customizations in Eclipse IDEs: 1. Authenticate to Amazon Q Developer Pro with IAM Identity Center using the steps in Installing the Amazon Q Developer extension or plugin in your IDE. 2. In your Eclipse IDE, choose the Amazon Q icon in the top right corner of the IDE. 3. With the Amazon Q chat tab open, choose the ellipsis icon in the top right corner of the tab. The Amazon Q task bar opens. The following image shows the Amazon Q task bar in an Eclipse IDE. Using 358 Amazon Q Developer User Guide 4. Choose Select Customization. 5. In the pop-up window, select the appropriate customization. 6. Choose Select. Using 359 Amazon Q Developer User Guide Security in Amazon Q Developer Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to Amazon Q, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors including the sensitivity of your data, your company’s requirements, and applicable laws and regulations This documentation helps you understand how to apply the shared responsibility model when using Amazon Q Developer. It shows you how to configure Amazon Q to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Amazon Q resources. Topics • Data protection in Amazon Q Developer • Identity and access management for Amazon Q Developer • Compliance validation for Amazon Q Developer • Resilience in Amazon Q Developer • Infrastructure security in Amazon Q Developer • Configuring a firewall, proxy server, or data perimeter for Amazon Q Developer • Amazon Q Developer and interface endpoints (AWS PrivateLink) 360 Amazon Q Developer User Guide Data protection in Amazon Q Developer The |
amazonq-developer-ug-119 | amazonq-developer-ug.pdf | 119 | Q to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your Amazon Q resources. Topics • Data protection in Amazon Q Developer • Identity and access management for Amazon Q Developer • Compliance validation for Amazon Q Developer • Resilience in Amazon Q Developer • Infrastructure security in Amazon Q Developer • Configuring a firewall, proxy server, or data perimeter for Amazon Q Developer • Amazon Q Developer and interface endpoints (AWS PrivateLink) 360 Amazon Q Developer User Guide Data protection in Amazon Q Developer The AWS shared responsibility model applies to data protection in Amazon Q Developer. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS Identity and Access Management (IAM). That way each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We recommend TLS 1.2 or later. • Set up API and user activity logging with AWS CloudTrail. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-2 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-2. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Amazon Q or other AWS services using the AWS Management Console, API, AWS Command Line Interface (AWS CLI), or AWS SDKs. Any data that you enter into tags or free- form text fields used for names may be used for billing or diagnostic logs. For more information about how Amazon Q Developer uses content, see Amazon Q Developer service improvement. Amazon Q stores your questions, its responses, and additional context, such as console metadata and code in your IDE, to generate responses to your questions. Your code is also stored for features like code transformation and software development in the IDE. For information about how data is encrypted, see Data encryption in Amazon Q Developer. For information about how AWS may use Data protection 361 Amazon Q Developer User Guide some questions that you ask Amazon Q and its responses to improve our services, see Amazon Q Developer service improvement. At the Amazon Q Developer Pro tier, your data is stored in the AWS Region where your Amazon Q Developer profile was created. At the Amazon Q Developer Free tier, your data is stored in a Region in the US. Data processed during diagnosing console error sessions is stored in the US West (Oregon) Region. All other data is stored in the US East (N. Virginia) Region. With cross-region inferencing, your requests to Amazon Q Developer may be processed in a different Region within the geography where your data is stored. For more information, see Cross- region inference. Note When you create an investigation with Amazon Q Developer operational investigations, your data may be stored and processed in other Regions. For more information, see the Security in operational investigations in the Amazon CloudWatch User Guide. Topics • Data encryption in Amazon Q Developer • Amazon Q Developer service improvement • Opt out of data sharing in the IDE • Cross-region processing in Amazon Q Developer Data encryption in Amazon Q Developer This topic provides information specific to Amazon Q Developer about encryption in transit and encryption at rest. Encryption in transit All communication between customers and Amazon Q and between Amazon Q and its downstream dependencies is protected using TLS 1.2 or higher connections. Encryption at rest Amazon Q stores data at rest using Amazon DynamoDB and Amazon Simple Storage Service (Amazon S3). The data at rest is encrypted using AWS encryption solutions by default. Amazon Q Data encryption 362 Amazon Q Developer User Guide encrypts your |
amazonq-developer-ug-120 | amazonq-developer-ug.pdf | 120 | IDE • Cross-region processing in Amazon Q Developer Data encryption in Amazon Q Developer This topic provides information specific to Amazon Q Developer about encryption in transit and encryption at rest. Encryption in transit All communication between customers and Amazon Q and between Amazon Q and its downstream dependencies is protected using TLS 1.2 or higher connections. Encryption at rest Amazon Q stores data at rest using Amazon DynamoDB and Amazon Simple Storage Service (Amazon S3). The data at rest is encrypted using AWS encryption solutions by default. Amazon Q Data encryption 362 Amazon Q Developer User Guide encrypts your data using AWS owned encryption keys from AWS Key Management Service (AWS KMS). You don’t have to take any action to protect the AWS managed keys that encrypt your data. For more information, see AWS owned keys in the AWS Key Management Service Developer Guide. For subscribers to Amazon Q Developer Pro, administrators can set up encryption with customer managed KMS keys for data at rest for the following features: • Chat in the AWS console • Diagnosing AWS console errors • Customizations • Agents in the IDE You can only encrypt data with a customer managed key for the listed features of Amazon Q in the AWS console and the IDE. Your conversations with Amazon Q on the AWS website, AWS Documentation pages, and in chat applications are only encrypted with AWS-owned keys. Customer managed keys are KMS keys in your AWS account that you create, own, and manage to directly control access to your data by controlling access to the KMS key. Only symmetric keys are supported. For information on creating your own KMS key, see Creating keys in the AWS Key Management Service Developer Guide. When you use a customer managed key, Amazon Q Developer makes use of KMS grants, allowing authorized users, roles, or applications to use a KMS key. When an Amazon Q Developer administrator chooses to use a customer managed key for encryption during configuration, a grant is created for them. This grant is what allows the end user to use the encryption key for data encryption at rest. For more information on grants, see Grants in AWS KMS. If you change the KMS key used to encrypt chats with Amazon Q in the AWS console, you must start a new conversation to begin using the new key to encrypt your data. Your conversation history that was encrypted with the previous key won’t be retained in future chats, and only future chats will be encrypted with the updated key. If you want to maintain your conversation history from a previous encryption method, you can revert to the key you were using during that conversation. If you change the KMS key used to encrypt diagnosing console error sessions, you must start a new diagnose session to being using the new key to encrypt your data. Using customer managed KMS keys After creating a customer managed KMS key, an Amazon Q Developer administrator must provide the key in the Amazon Q Developer console to use it to encrypt data. For information on adding Data encryption 363 Amazon Q Developer User Guide the key in the Amazon Q Developer console, see Managing the encryption method in Amazon Q Developer. To set up a customer managed key to encrypt data in Amazon Q Developer, administrators need permissions to use AWS KMS. The required KMS permissions are included in the example IAM policy, Allow administrators to use the Amazon Q Developer console. To use features that are encrypted with a customer managed key, users need permissions to allow Amazon Q to access the customer managed key. For a policy that grants the needed permissions, see Allow Amazon Q access to customer managed keys. If you see an error related to KMS grants while using Amazon Q Developer, you likely need to update your permissions to allow Amazon Q to create grants. To automatically configure the needed permissions, go to the Amazon Q Developer console and choose Update permissions in the banner at the top of the page. Amazon Q Developer service improvement To help Amazon Q Developer provide the most relevant information, we may use certain content from Amazon Q, such as questions that you ask Amazon Q and its responses, for service improvement. This page explains what content we use and how to opt out. Amazon Q Developer Free tier content used for service improvement We may use certain content from Amazon Q Developer Free tier for service improvement. Amazon Q may use this content, for example, to provide better responses to common questions, fix Amazon Q operational issues, for de-bugging, or for model training. Content that AWS may use for service improvement includes, for example, your questions to Amazon Q and the responses and code that Amazon |
amazonq-developer-ug-121 | amazonq-developer-ug.pdf | 121 | Q, such as questions that you ask Amazon Q and its responses, for service improvement. This page explains what content we use and how to opt out. Amazon Q Developer Free tier content used for service improvement We may use certain content from Amazon Q Developer Free tier for service improvement. Amazon Q may use this content, for example, to provide better responses to common questions, fix Amazon Q operational issues, for de-bugging, or for model training. Content that AWS may use for service improvement includes, for example, your questions to Amazon Q and the responses and code that Amazon Q generates. We do not use content from Amazon Q Developer Pro or Amazon Q Business for service improvement. How to opt out The way you opt out of Amazon Q Developer Free Tier using content for service improvement depends on the environment where you use Amazon Q. Service improvement 364 Amazon Q Developer User Guide For the AWS Management Console, AWS Console Mobile Application, AWS websites, and in chat applications, configure an AI services opt-out policy in AWS Organizations. For more information, see AI services opt-out policies in the AWS Organizations User Guide. In the IDE, for Amazon Q Developer Free Tier, adjust your settings in the IDE. For more information, see Opt out of data sharing in the IDE. Opt out of data sharing in the IDE This page explains how to opt out of sharing your data in the IDE where you use Amazon Q, including third-party IDEs and AWS coding environments. For information on how Amazon Q uses this data, see Amazon Q Developer service improvement. Opting out of sharing your client-side telemetry Your client-side telemetry quantifies your usage of the service. For example, AWS may track whether you accept or reject a recommendation. Your client-side telemetry does not contain actual code. To learn more about the telemetry data collected by Amazon Q in the IDE, see the commonDefinitions.json document in the aws-toolkit-common Github repository. For detailed information about the telemetry data collected by each IDE where you use Amazon Q, reference the resource documents in the following GitHub repositories: • Amazon Q extension for VS Code • Amazon Q plugin for JetBrains • Amazon Q plugin for Eclipse • AWS Visual Studio Toolkit with Amazon Q Note Don’t add personally identifiable information (PII) or other confidential or sensitive information in free text fields in the IDE. Choose your IDE for instructions on opting out of sharing your client-side telemetry. Opt out of data sharing in the IDE 365 Amazon Q Developer Visual Studio Code User Guide To opt out of sharing your telemetry data in VS Code, use this procedure: 1. Open Settings in VS Code. 2. If you are using VS Code workspaces, switch to the Workspace sub-tab. In VS Code, workspace settings override user settings. 3. In the Settings search bar, enter Amazon Q: Telemetry. 4. Deselect the box. Note This is a decision for each developer to make inside their own IDE. If you are using Amazon Q as part of an enterprise, your administrator will not be able to change this setting for you. JetBrains To opt out of sharing your telemetry data in JetBrains, use this procedure: 1. 2. In your JetBrains IDE, open Preferences (on a Mac, this will be under Settings). In the left navigation bar, choose Tools, and then choose AWS. 3. Deselect Send usage metrics to AWS. Opt out of data sharing in the IDE 366 Amazon Q Developer Note User Guide This is a decision for each developer to make inside their own IDE. If you are using Amazon Q as part of an enterprise, your administrator will not be able to change this setting for you. Eclipse To opt out of sharing your telemetry data in Eclipse IDEs, use this procedure: 1. Open Settings in your Eclipse IDE. 2. Choose Amazon Q from the left navigation bar. 3. Deselect the box next to Send usage metrics to AWS. 4. Choose Apply to save your changes. Note This is a decision for each developer to make inside their own IDE. If you are using Amazon Q as part of an enterprise, your administrator will not be able to change this setting for you. Visual Studio To opt out of sharing your telemetry data in the AWS Toolkit for Visual Studio, use this procedure: 1. Under Tools, choose Options. 2. In the Options pane, choose AWS Toolkit, and then choose General. 3. Deselect Allow AWS Toolkit to collect usage information. Opt out of data sharing in the IDE 367 Amazon Q Developer Note User Guide This is a decision for each developer to make inside their own IDE. If you are using Amazon Q as part of an enterprise, your administrator will not be able to |
amazonq-developer-ug-122 | amazonq-developer-ug.pdf | 122 | be able to change this setting for you. Visual Studio To opt out of sharing your telemetry data in the AWS Toolkit for Visual Studio, use this procedure: 1. Under Tools, choose Options. 2. In the Options pane, choose AWS Toolkit, and then choose General. 3. Deselect Allow AWS Toolkit to collect usage information. Opt out of data sharing in the IDE 367 Amazon Q Developer Note User Guide This is a decision for each developer to make inside their own IDE. If you are using Amazon Q as part of an enterprise, your administrator will not be able to change this setting for you. AWS Cloud9 1. From inside your AWS Cloud9 IDE, choose the AWS Cloud9 logo at the top of the window, then choose Preferences. 2. On the Preferences tab choose AWS Toolkit. 3. Next to AWS: client-side telemetry, toggle the switch to the off position. Note This setting affects whether or not you share your AWS Cloud9 client-side telemetry in general, not just for Amazon Q. Lambda When you use Amazon Q with Lambda, Amazon Q does not share your client-side telemetry with AWS. SageMaker AI Studio 1. 2. 3. From the top of the SageMaker AI Studio window choose Settings. From the Settings dropdown, choose Advanced Settings Editor. In the Amazon Q dropdown, select or deselect the box next to Share usage data with Amazon Q. JupyterLab 1. 2. From the top of the JupyterLab window choose Settings. From the Settings dropdown, choose Advanced Settings Editor. Opt out of data sharing in the IDE 368 Amazon Q Developer User Guide 3. In the Amazon Q dropdown, select or deselect the box next to Share usage data with Amazon Q. AWS Glue Studio Notebook 1. 2. From the bottom of the AWS Glue Studio Notebook window choose Amazon Q. From the pop-up menu, toggle the switch next to Share telemetry with AWS. Note Pausing the sharing of client-side telemetry will be valid only for the duration of the current AWS Glue Studio Notebook. Command line In the command line tool, under Preferences, toggle Telemetry. Opting out of sharing your content For information on content AWS uses, see Amazon Q Developer service improvement. Visual Studio Code At the Amazon Q Developer Pro Tier, Amazon Q does not collect your content. At the Amazon Q Developer Free Tier, to opt out of sharing your content in VS Code, use the following procedure. 1. Open Settings in VS Code. 2. If you are using VS Code workspaces, switch to the Workspace sub-tab. In VS Code, workspace settings override user settings. 3. In the Settings search bar, enter Amazon Q: Share Content. 4. Deselect the box. JetBrains At the Amazon Q Developer Pro Tier, Amazon Q does not collect your content. Opt out of data sharing in the IDE 369 Amazon Q Developer User Guide At the Amazon Q Developer Free Tier, to opt out of sharing Amazon Q data in JetBrains, use the following procedure. 1. Make sure you are using the latest version of JetBrains. 2. 3. In your JetBrains IDE, open Preferences (on a Mac, this will be under Settings). In the left navigation bar, choose Tools --> AWS --> Amazon Q. 4. Under Data sharing, deselect Share Amazon Q content with AWS. Eclipse At the Amazon Q Developer Pro tier, Amazon Q does not collect your content. At the Amazon Q Developer Free tier, to opt out of sharing Amazon Q data in Eclipse IDEs, use the following procedure. 1. Make sure you are using the latest version of your Eclipse IDE. 2. 3. In your Eclipse IDE, open Settings. In the left navigation bar, choose Amazon Q. Opt out of data sharing in the IDE 370 Amazon Q Developer User Guide 4. Deselect the box next to Share Amazon Q content with AWS. 5. Choose Apply to save your changes. Visual Studio At the Amazon Q Developer Pro Tier, Amazon Q does not collect your content. At the Amazon Q Developer Free Tier, to opt out of sharing your content in Visual Studio, use the following procedure. Bring up the Amazon Q options menu one of two ways: • Choose the AWS Toolkit icon from the edge of the window, then choose Options... • Go to Tools -> Options -> AWS Toolkit -> Amazon Q Toggle Share Amazon Q Content with AWS to True or False. AWS Cloud9 When you use Amazon Q with AWS Cloud9, Amazon Q does not share your content with AWS. Note The AWS Cloud9 settings do contain a toggle switch for sharing Amazon Q content with AWS, but that switch is non-functional. Lambda When you use Amazon Q with Lambda, Amazon Q does not share your content with AWS. Note The Lambda settings do contain a toggle switch for sharing |
amazonq-developer-ug-123 | amazonq-developer-ug.pdf | 123 | the edge of the window, then choose Options... • Go to Tools -> Options -> AWS Toolkit -> Amazon Q Toggle Share Amazon Q Content with AWS to True or False. AWS Cloud9 When you use Amazon Q with AWS Cloud9, Amazon Q does not share your content with AWS. Note The AWS Cloud9 settings do contain a toggle switch for sharing Amazon Q content with AWS, but that switch is non-functional. Lambda When you use Amazon Q with Lambda, Amazon Q does not share your content with AWS. Note The Lambda settings do contain a toggle switch for sharing Amazon Q content with AWS, but that switch is non-functional. SageMaker AI Studio When you use Amazon Q with SageMaker AI Studio, Amazon Q does not share your content with AWS. Opt out of data sharing in the IDE 371 Amazon Q Developer JupyterLab User Guide 1. 2. 3. From the top of the JupyterLab window choose Settings. From the Settings dropdown, choose Advanced Settings Editor. In the Amazon Q dropdown, select or deselect the box next to Share content with Amazon Q. AWS Glue Studio Notebook When you use Amazon Q with AWS Glue Studio Notebook, Amazon Q does not share your content with AWS. Command line In the command line tool, under Preferences, toggle Share Amazon Q content with AWS. Cross-region processing in Amazon Q Developer The following sections describe how cross-region inference and cross-region calls are used to provide the Amazon Q Developer service. Cross-region inference Amazon Q Developer is powered by Amazon Bedrock, and uses cross-region inference to distribute traffic across different AWS Regions to enhance large language model (LLM) inference performance and reliability. With cross-region inference, you get: • Increased throughput and resilience during high demand periods • Improved performance • Access to newly launched Amazon Q Developer capabilities and features that rely on the most powerful LLMs hosted on Amazon Bedrock Cross-region inference requests are kept within the AWS Regions that are part of the geography where the data originally resides. For example, a request made from a Amazon Q Developer profile created in the US is kept within the AWS Regions in the US. Some Amazon Q Developer features and integrations may perform inference in Regions other than where your Q Developer profile was created. For more information, see Supported regions for Amazon Q Developer cross-region inference. Cross-region processing 372 Amazon Q Developer User Guide Although cross-region inferencing doesn’t change where your data is stored, your requests and output results may move outside of the Region where the data originally resides. All data is encrypted while transmitted across Amazon's secure network. There's no additional cost for using cross-region inference. Cross region inference doesn’t affect where your data is stored. For information on where data is stored when you use Amazon Q Developer, see Data protection in Amazon Q Developer. Supported regions for Amazon Q Developer cross-region inference The following table describes what Regions your requests may be routed to depending on the geography where the request originated. Supported Amazon Q Developer geography Inference regions United States US East (N. Virginia) (us-east-1) US West (Oregon) (us-west-2) US East (Ohio) (us-east-2) Europe Europe (Frankfurt) (eu-central-1) Europe (Ireland) (eu-west-1) Europe (Paris) (eu-west-3) Europe (Stockholm) (eu-north-1) Asia Pacific* Asia Pacific (Mumbai) (ap-south-1) Asia Pacific (Seoul) (ap-northeast-2) Asia Pacific (Singapore) (ap-southeast-1) Asia Pacific (Sydney) (ap-southeast-2) Asia Pacific (Tokyo) (ap-northeast-1) *Cross-region inferencing in the Asia Pacific Regions is only supported when you use Amazon Q generative SQL in the Asia Pacific (Seoul) Region. Cross-region processing 373 Amazon Q Developer Note User Guide The following services perform inferencing in the US East (N. Virginia) Region (us-east-1), regardless of where you create a Q Developer profile: • Code suggestions in AWS Lambda • Code suggestions in Amazon EMR • Code suggestions in Amazon SageMaker AI Studio • Code suggestions in AWS Glue • Amazon Q CLI in AWS CloudShell • Amazon ECS task editor • Amazon Q in Amazon SageMaker Unified Studio • Amazon Q in Amazon OpenSearch Service The following features process data in your console Region only: • Amazon Q generative SQL in Amazon Redshift When you create an investigation with Amazon Q Developer operational investigations, your data may be stored and processed in other Regions. For more information, see the Security in operational investigations in the Amazon CloudWatch User Guide. For a complete list of Regions where you can use Amazon Q Developer, see Supported Regions for Amazon Q Developer. Cross-region calls Certain requests that you make to Amazon Q Developer may require cross-region calls. Cross- region calls are API calls made by Amazon Q from one AWS Region to another AWS Region. Amazon Q makes cross-region calls when your request requires it to retrieve information from a Region different from your current Region. For example, when you |
amazonq-developer-ug-124 | amazonq-developer-ug.pdf | 124 | be stored and processed in other Regions. For more information, see the Security in operational investigations in the Amazon CloudWatch User Guide. For a complete list of Regions where you can use Amazon Q Developer, see Supported Regions for Amazon Q Developer. Cross-region calls Certain requests that you make to Amazon Q Developer may require cross-region calls. Cross- region calls are API calls made by Amazon Q from one AWS Region to another AWS Region. Amazon Q makes cross-region calls when your request requires it to retrieve information from a Region different from your current Region. For example, when you ask Amazon Q questions about your AWS resources that are located in different Regions, it will make a cross-region call to access your resources and retrieve the relevant data to respond to your question. In addition, if a response from Amazon Q requires information from a global AWS service endpoint, Amazon Q may make Cross-region processing 374 Amazon Q Developer User Guide calls outside of the Region where your data is stored. For more information on global services, see Global services in the AWS Fault Isolation Boundaries AWS Whitepaper. If you’d like to disable cross-region calls made by Amazon Q Developer, you can create a policy that prevents Amazon Q from making API calls on your behalf. By doing so, you won’t have access to features that require Amazon Q to make API calls on your behalf, even if Amazon Q is making calls within your current Region. For an IAM policy that prevents Amazon Q from making API calls on your behalf, including cross-region calls, see Deny Amazon Q permission to perform actions on your behalf. Identity and access management for Amazon Q Developer AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use Amazon Q Developer resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How Amazon Q Developer works with IAM • Manage access to Amazon Q Developer with policies • Manage access to Amazon Q Developer for third-party integration • Amazon Q Developer permissions reference • AWS managed policies for Amazon Q Developer • Using service-linked roles for Amazon Q Developer and User Subscriptions Audience How you use IAM differs, depending on the work you do in Amazon Q. Service user – If you use the Amazon Q service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more Amazon Q features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. Identity and access management 375 Amazon Q Developer User Guide Service administrator – If you’re in charge of Amazon Q resources at your company, you probably have full access to Amazon Q. It’s your job to determine which Amazon Q features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand the basic concepts of IAM. To learn more about how your company can use IAM with Amazon Q, see How Amazon Q works with IAM. IAM administrator – If you’re an IAM administrator, you might want to learn details about how you can write policies to manage access to Amazon Q. If you’re an IAM administrator, consider learning the details about how you can write policies to manage IAM user access to services. For information that’s specific to Amazon Q, see AWS Regions managed policies for Amazon Q. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company’s single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. Regardless of the authentication method that you use, you |
amazonq-developer-ug-125 | amazonq-developer-ug.pdf | 125 | company’s single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. Regardless of the authentication method that you use, you might also be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and Using multi-factor authentication (MFA) in AWS in the IAM User Guide. AWS account root user When you first create an AWS account, you begin with a single sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create Authenticating with identities 376 Amazon Q Developer User Guide the account. We strongly recommend that you don’t use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long-term credentials in the IAM User Guide. An IAM group is an identity that specifies a collection of IAM users. You can’t sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. For more information, see When to create an IAM user (instead of a role) in the IAM User Guide. Authenticating with identities 377 Amazon Q Developer IAM roles User Guide An IAM role is an identity within your AWS account that has specific permissions. An IAM role is similar to an IAM user but is not associated with a specific person. You can temporarily assume an IAM role in the AWS Management Console by switching roles. You can assume a role by calling an AWS Command Line Interface (AWS CLI) or AWS API operation or by using a custom URL. For more information about methods for using roles, see Using IAM roles in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, |
amazonq-developer-ug-126 | amazonq-developer-ug.pdf | 126 | a role by calling an AWS Command Line Interface (AWS CLI) or AWS API operation or by using a custom URL. For more information about methods for using roles, see Using IAM roles in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Creating a role for a third-party Identity Provider in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). For more information about the difference between roles and resource-based policies for cross-account access, see How IAM roles differ from resource-based policies in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. A service might do this using the calling principal’s permissions, using a service role, or using a service-linked role. • Principal permissions – When you use an IAM user or role to perform actions in AWS, you are considered a principal. Policies grant permissions to a principal. When you use some services, you might perform an action that then triggers another action in a different service. In this case, you must have permissions to perform both actions. • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Creating a role to delegate permissions to an AWS service in the IAM User Guide. Authenticating with identities 378 Amazon Q Developer User Guide • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an Amazon EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the Amazon EC2 instance. To assign an IAM role to an Amazon EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the Amazon EC2 instance to get temporary credentials. For more information, see Using an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. For more information about whether to use IAM roles, see When to create an IAM role (instead of a user) in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. Every IAM entity (user or role) starts with no permissions. By default, users can do nothing, not even change their own password. To give a user permission to do something, an administrator must attach a permissions policy to a user. Or the administrator can add the |
amazonq-developer-ug-127 | amazonq-developer-ug.pdf | 127 | in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. Every IAM entity (user or role) starts with no permissions. By default, users can do nothing, not even change their own password. To give a user permission to do something, an administrator must attach a permissions policy to a user. Or the administrator can add the user to a group that has the intended permissions. When an administrator gives permissions to a group, all users in that group are granted those permissions. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Managing access using policies 379 Amazon Q Developer Identity-based policies User Guide Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, role, or group. These policies control what actions users and roles can perform, on which resources, and under what conditions. For more information about how to create an identity-based policy, see Creating IAM policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. For more information about how to choose between a managed policy or an inline policy, see Choosing between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource such as an Amazon S3 bucket. Service administrators can use these policies to define what actions a specified principal (account member, user, or role) can perform on that resource and under what conditions. Resource-based policies are inline policies. There are no managed resource-based policies. Access control lists (ACLs) Access control lists (ACLs) are a type of policy that controls which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. For more information about ACLs, see Access Control List (ACL) overview in the Amazon S3 User Guide. Other policy types AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity’s identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions Managing access using policies 380 Amazon Q Developer User Guide boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply SCPs to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see How SCPs work in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session’s permissions are the intersection of the user or role’s identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Multiple policy types When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a |
amazonq-developer-ug-128 | amazonq-developer-ug.pdf | 128 | policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session’s permissions are the intersection of the user or role’s identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Multiple policy types When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How Amazon Q Developer works with IAM Before you use IAM to manage access to Amazon Q Developer, learn what IAM features are available to use with Amazon Q Developer. IAM features you can use with Amazon Q Developer IAM feature Amazon Q support Identity-based policies Resource-based policies Policy actions Policy resources Yes No Yes No How Amazon Q works with IAM 381 Amazon Q Developer IAM feature Policy condition keys ACLs ABAC (tags in policies) Temporary credentials Principal permissions Service roles Service-linked roles Amazon Q support User Guide No No No Yes Yes No Yes To get a high-level view of how Amazon Q and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for Amazon Q Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for Amazon Q To view examples of Amazon Q Developer identity-based policies, see Identity-based policy examples for Amazon Q Developer. How Amazon Q works with IAM 382 Amazon Q Developer User Guide Resource-based policies within Amazon Q Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for Amazon Q Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of Amazon Q actions, see Manage access to Amazon Q Developer with policies. Policy actions in Amazon Q use the following prefix before the action: How Amazon Q works with IAM 383 Amazon Q Developer q User Guide To specify |
amazonq-developer-ug-129 | amazonq-developer-ug.pdf | 129 | the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of Amazon Q actions, see Manage access to Amazon Q Developer with policies. Policy actions in Amazon Q use the following prefix before the action: How Amazon Q works with IAM 383 Amazon Q Developer q User Guide To specify multiple actions in a single statement, separate the actions with commas. "Action": [ "q:action1", "q:action2" ] You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word Get, include the following action: "Action": "q:Get*" To view examples of Amazon Q Developer identity-based policies, see Identity-based policy examples for Amazon Q Developer. Policy resources for Amazon Q Supports policy resources: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To view examples of Amazon Q Developer identity-based policies, see Identity-based policy examples for Amazon Q Developer. How Amazon Q works with IAM 384 Amazon Q Developer User Guide Policy condition keys for Amazon Q Supports service-specific policy condition keys: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To view examples of Amazon Q Developer identity-based policies, see Identity-based policy examples for Amazon Q Developer. ACLs in Amazon Q Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with Amazon Q Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then How Amazon Q works with IAM 385 Amazon Q Developer User Guide you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with Amazon Q Supports temporary |
amazonq-developer-ug-130 | amazonq-developer-ug.pdf | 130 | tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with Amazon Q Supports temporary credentials: Yes Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Cross-service principal permissions for Amazon Q Supports forward access sessions (FAS): Yes How Amazon Q works with IAM 386 Amazon Q Developer User Guide When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for Amazon Q Supports service roles: No A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break Amazon Q functionality. Edit service roles only when Amazon Q provides guidance to do so. Service-linked roles for Amazon Q Supports service-linked roles: Yes A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing Amazon Q service-linked roles, see Using service-linked roles for Amazon Q Developer and User Subscriptions. How Amazon Q works with IAM 387 Amazon Q Developer User Guide Manage access to Amazon Q Developer with policies Note The information on this page pertains to accessing Amazon Q Developer. For information about managing access to Amazon Q Business, see Identity-based policy examples for Amazon Q Business in the Amazon Q Business User Guide. The policies and examples in this topic are specific to Amazon Q in the AWS Management Console, AWS Console Mobile Application, AWS website, AWS Documentation, and in chat applications. Other services integrated with Amazon Q might require different policies or settings. End users of Amazon Q in third-party IDEs are not required to use IAM policies. For more information, see the documentation for the service that contains an Amazon Q feature or integration. By default, users and roles don't have permission to use Amazon Q. IAM administrators can manage access to Amazon Q Developer and its features by granting permissions to IAM identities. The quickest way for an administrator to grant access to users is through an AWS managed policy. The AmazonQFullAccess policy can be attached to IAM identities to grant full access to Amazon Q Developer and its features. For more information about this policy, see AWS managed policies for Amazon Q Developer. To manage specific actions that IAM identities can perform with Amazon Q Developer, administrators can create custom policies that define what permissions a user, group, or role |
amazonq-developer-ug-131 | amazonq-developer-ug.pdf | 131 | to use Amazon Q. IAM administrators can manage access to Amazon Q Developer and its features by granting permissions to IAM identities. The quickest way for an administrator to grant access to users is through an AWS managed policy. The AmazonQFullAccess policy can be attached to IAM identities to grant full access to Amazon Q Developer and its features. For more information about this policy, see AWS managed policies for Amazon Q Developer. To manage specific actions that IAM identities can perform with Amazon Q Developer, administrators can create custom policies that define what permissions a user, group, or role has. You can also use service control policies (SCPs) to control what Amazon Q features are available in your organization. For a list of all Amazon Q permissions you can control with policies, see the see the Amazon Q Developer permissions reference. Topics • Policy best practices • Assign permissions • Manage access with service control policies (SCPs) • Identity-based policy examples for Amazon Q Developer Manage access to Amazon Q 388 Amazon Q Developer Policy best practices User Guide Identity-based policies determine whether someone can create, access, or delete Amazon Q Developer resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Manage access to Amazon Q 389 Amazon Q Developer Assign permissions To provide access, add permissions to your users, groups, or roles: • Users and groups in AWS IAM Identity Center: User Guide Create a permission set. Follow the instructions in Create a permission set in the AWS IAM Identity Center User Guide. • Users managed in IAM through an identity provider: Create a role for identity federation. Follow the instructions in Create a role for a third-party identity provider (federation) in the IAM User Guide. • IAM users: • Create a role that your user can assume. Follow the instructions in Create a role for an IAM user in the IAM User Guide. • (Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions in Adding permissions to a user (console) in the IAM User Guide. Manage access with service control policies (SCPs) Service control policies (SCPs) are a type of organization policy that you can use to manage permissions in your organization. You can control what Amazon Q Developer features are available in your organization by creating an SCP that specifies permissions for some or all Amazon Q actions. For more information |
amazonq-developer-ug-132 | amazonq-developer-ug.pdf | 132 | role for an IAM user in the IAM User Guide. • (Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions in Adding permissions to a user (console) in the IAM User Guide. Manage access with service control policies (SCPs) Service control policies (SCPs) are a type of organization policy that you can use to manage permissions in your organization. You can control what Amazon Q Developer features are available in your organization by creating an SCP that specifies permissions for some or all Amazon Q actions. For more information about using SCPs to control access in your organization, see Creating, updating, and deleting service control policies and Attaching and detaching service control policies in the AWS Organizations User Guide. Example SCP: Deny access to Amazon Q outside EU Regions The following SCP denies access to any use of Amazon Q Developer outside of the Europe (Frankfurt) Region (eu-central-1). Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. Manage access to Amazon Q 390 Amazon Q Developer User Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "DenyAmazonQDeveloperOutsideEU", "Effect": "Deny", "Action": [ "codewhisperer:GenerateRecommendations", "q:SendMessage", "q:GenerateCodeFromCommands", "sqlworkbench:GetQSqlRecommendations" ], "Resource": "*", "Condition": { "StringNotEquals": {"aws:RequestedRegion": [ "eu-central-1"] } } } ] } Example SCP: Deny access to Amazon Q The following SCP denies access to Amazon Q Developer. Note Denying access to Amazon Q will not disable the Amazon Q icon or chat panel in the AWS console, AWS website, AWS documentation pages, or AWS Console Mobile Application. { "Version": "2012-10-17", "Statement": [ { "Sid": "DenyAmazonQFullAccess", "Effect": "Deny", "Action": [ "q:*" ], "Resource": "*" } Manage access to Amazon Q 391 Amazon Q Developer ] } User Guide Identity-based policy examples for Amazon Q Developer The following example IAM policies control permissions for various Amazon Q Developer actions. Use them to allow or deny Amazon Q Developer access for your users, roles, or groups. Note The following example policies grant permissions for features of Amazon Q Developer, but users might need additional permissions to access Amazon Q with an Amazon Q Developer Pro subscription. For more information, see Allow users to access Amazon Q with an Amazon Q Developer Pro subscription. You can use these policies as written, or you can add permissions for the individual Amazon Q features you want to use. For more information about configuring IAM permissions with Amazon Q, see Manage access to Amazon Q Developer with policies. For a list of all Amazon Q permissions you can control with policies, see the Amazon Q Developer permissions reference. Topics • Administrator permissions • User permissions Administrator permissions The following policies allow Amazon Q Developer administrators to perform administrative tasks in the Amazon Q subscription management console and Amazon Q Developer Pro console. For policies that enable the use of Amazon Q Developer features, see User permissions. Allow administrators to use the Amazon Q console The following example policy grants permissions for a user to perform actions in the Amazon Q console. The Amazon Q console is where you configure Amazon Q's integration with AWS IAM Manage access to Amazon Q 392 Amazon Q Developer User Guide Identity Center and AWS Organizations. Most other Amazon Q Developer-related tasks must be completed in the Amazon Q Developer console. For more information, see Allow administrators to use the Amazon Q Developer console. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. { "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "organizations:ListAWSServiceAccessForOrganization", "organizations:DisableAWSServiceAccess", "organizations:EnableAWSServiceAccess", "organizations:DescribeOrganization" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "sso:ListApplications", "sso:ListInstances", "sso:DescribeRegisteredRegions", "sso:GetSharedSsoConfiguration", "sso:DescribeInstance", "sso:CreateInstance", "sso:CreateApplication", "sso:PutApplicationAuthenticationMethod", "sso:PutApplicationAssignmentConfiguration", "sso:PutApplicationGrant", "sso:PutApplicationAccessScope", "sso:DescribeApplication", "sso:DeleteApplication", "sso:GetSSOStatus", Manage access to Amazon Q 393 Amazon Q Developer User Guide "sso:CreateApplicationAssignment", "sso:DeleteApplicationAssignment", "sso:UpdateApplication" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "sso-directory:DescribeUsers", "sso-directory:DescribeGroups", "sso-directory:SearchGroups", "sso-directory:SearchUsers", "sso-directory:DescribeGroup", "sso-directory:DescribeUser", "sso-directory:DescribeDirectory" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "signin:ListTrustedIdentityPropagationApplicationsForConsole", "signin:CreateTrustedIdentityPropagationApplicationForConsole" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "codewhisperer:ListProfiles", "codewhisperer:CreateProfile", "codewhisperer:DeleteProfile" ], "Resource":[ "*" ] }, Manage access to Amazon Q 394 Amazon Q Developer { "Effect":"Allow", "Action":[ "user-subscriptions:ListClaims", "user-subscriptions:ListUserSubscriptions", "user-subscriptions:CreateClaim", "user-subscriptions:DeleteClaim", "user-subscriptions:UpdateClaim" User Guide ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "q:CreateAssignment", "q:DeleteAssignment" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "iam:CreateServiceLinkedRole" ], "Resource":[ "arn:aws:iam::*:role/aws-service-role/user-subscriptions.amazonaws.com/ AWSServiceRoleForUserSubscriptions" ] } ] } Allow administrators to use the Amazon Q Developer console The following example policy grants permissions for a user to access the Amazon Q Developer console. In the Amazon Q Developer console, administrators perform most Amazon Q Developer-related configuration tasks, including tasks related to subscriptions, code references, customizations, and chat plugins. This policy also includes permissions to create and |
amazonq-developer-ug-133 | amazonq-developer-ug.pdf | 133 | Q 394 Amazon Q Developer { "Effect":"Allow", "Action":[ "user-subscriptions:ListClaims", "user-subscriptions:ListUserSubscriptions", "user-subscriptions:CreateClaim", "user-subscriptions:DeleteClaim", "user-subscriptions:UpdateClaim" User Guide ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "q:CreateAssignment", "q:DeleteAssignment" ], "Resource":[ "*" ] }, { "Effect":"Allow", "Action":[ "iam:CreateServiceLinkedRole" ], "Resource":[ "arn:aws:iam::*:role/aws-service-role/user-subscriptions.amazonaws.com/ AWSServiceRoleForUserSubscriptions" ] } ] } Allow administrators to use the Amazon Q Developer console The following example policy grants permissions for a user to access the Amazon Q Developer console. In the Amazon Q Developer console, administrators perform most Amazon Q Developer-related configuration tasks, including tasks related to subscriptions, code references, customizations, and chat plugins. This policy also includes permissions to create and configure customer managed KMS keys. Manage access to Amazon Q 395 Amazon Q Developer User Guide There are a few Amazon Q Developer Pro tasks that administrators must complete through the Amazon Q console (instead of the Amazon Q Developer console). For more information, see Allow administrators to use the Amazon Q console. Note To create customizations or plugins, your Amazon Q Developer Pro administrator will require additional permissions. • For permissions needed for customizations, see Prerequisites for customizations. • For permissions needed for plugins, see Allow administrators to configure plugins. You will need one of two policies to use the Amazon Q Developer console. The policy you need depends on if you're setting up Amazon Q Developer for the first time or if you're configuring a legacy Amazon CodeWhisperer profile. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. For new administrators of Amazon Q Developer, use the following policy: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sso:ListInstances", "sso:CreateInstance", "sso:CreateApplication", "sso:PutApplicationAuthenticationMethod", "sso:PutApplicationGrant", "sso:PutApplicationAssignmentConfiguration", "sso:ListApplications", "sso:GetSharedSsoConfiguration", "sso:DescribeInstance", "sso:PutApplicationAccessScope", Manage access to Amazon Q 396 Amazon Q Developer User Guide "sso:DescribeApplication", "sso:DeleteApplication", "sso:CreateApplicationAssignment", "sso:DeleteApplicationAssignment", "sso:UpdateApplication", "sso:DescribeRegisteredRegions", "sso:GetSSOStatus" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "iam:ListRoles" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "sso-directory:GetUserPoolInfo", "sso-directory:DescribeUsers", "sso-directory:DescribeGroups", "sso-directory:SearchGroups", "sso-directory:SearchUsers", "sso-directory:DescribeDirectory" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "signin:ListTrustedIdentityPropagationApplicationsForConsole", "signin:CreateTrustedIdentityPropagationApplicationForConsole" ], "Resource": [ "*" ] Manage access to Amazon Q 397 User Guide Amazon Q Developer }, { "Effect": "Allow", "Action": [ "user-subscriptions:ListClaims", "user-subscriptions:ListApplicationClaims", "user-subscriptions:ListUserSubscriptions", "user-subscriptions:CreateClaim", "user-subscriptions:DeleteClaim", "user-subscriptions:UpdateClaim" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "organizations:DescribeAccount", "organizations:DescribeOrganization", "organizations:ListAWSServiceAccessForOrganization", "organizations:DisableAWSServiceAccess", "organizations:EnableAWSServiceAccess" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "kms:ListAliases", "kms:CreateGrant", "kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey*", "kms:RetireGrant", "kms:DescribeKey" ], "Resource": [ "*" ] }, { Manage access to Amazon Q 398 Amazon Q Developer "Effect": "Allow", "Action": [ "codeguru-security:UpdateAccountConfiguration" User Guide ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "iam:CreateServiceLinkedRole" ], "Resource": [ "arn:aws:iam::*:role/aws-service-role/q.amazonaws.com/ AWSServiceRoleForAmazonQDeveloper" ] }, { "Effect": "Allow", "Action": [ "codewhisperer:UpdateProfile", "codewhisperer:ListProfiles", "codewhisperer:TagResource", "codewhisperer:UnTagResource", "codewhisperer:ListTagsForResource", "codewhisperer:CreateProfile" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "q:ListDashboardMetrics", "q:CreateAssignment", "q:DeleteAssignment" ], "Resource": [ "*" ] }, { Manage access to Amazon Q 399 Amazon Q Developer User Guide "Effect": "Allow", "Action": [ "cloudwatch:GetMetricData", "cloudwatch:ListMetrics" ], "Resource": [ "*" ] } ] } For legacy Amazon CodeWhisperer profiles, the following policy will enable an IAM principal to administer a CodeWhisperer application. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "sso-directory:SearchUsers", "sso-directory:SearchGroups", "sso-directory:GetUserPoolInfo", "sso-directory:DescribeDirectory", "sso-directory:ListMembersInGroup" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "iam:ListRoles" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ Manage access to Amazon Q 400 Amazon Q Developer User Guide "pricing:GetProducts" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "sso:AssociateProfile", "sso:DisassociateProfile", "sso:GetProfile", "sso:ListProfiles", "sso:ListApplicationInstances", "sso:GetApplicationInstance", "sso:CreateManagedApplicationInstance", "sso:GetManagedApplicationInstance", "sso:ListProfileAssociations", "sso:GetSharedSsoConfiguration", "sso:ListDirectoryAssociations", "sso:DescribeRegisteredRegions", "sso:GetSsoConfiguration", "sso:GetSSOStatus" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "identitystore:ListUsers", "identitystore:ListGroups" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "organizations:DescribeAccount", "organizations:DescribeOrganization" ], Manage access to Amazon Q 401 User Guide Amazon Q Developer "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "kms:ListAliases", "kms:CreateGrant", "kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey*", "kms:RetireGrant", "kms:DescribeKey" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codeguru-security:UpdateAccountConfiguration" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "iam:CreateServiceLinkedRole" ], "Resource": [ "arn:aws:iam::*:role/aws-service-role/q.amazonaws.com/ AWSServiceRoleForAmazonQDeveloper" ] }, { "Effect": "Allow", "Action": [ "codewhisperer:UpdateProfile", "codewhisperer:ListProfiles", "codewhisperer:TagResource", Manage access to Amazon Q 402 Amazon Q Developer User Guide "codewhisperer:UnTagResource", "codewhisperer:ListTagsForResource", "codewhisperer:CreateProfile" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "q:ListDashboardMetrics", "cloudwatch:GetMetricData", "cloudwatch:ListMetrics" ], "Resource": [ "*" ] } ] } Allow administrators to create customizations The following policy grants administrators permission to create and manage customizations in Amazon Q Developer. To configure customizations in the Amazon Q Developer Pro console, your Amazon Q Developer administrator will require access to the Amazon Q Developer Pro console. For more information, see Allow administrators to use the Amazon Q Developer console. Note The codewhisperer prefix is a legacy |
amazonq-developer-ug-134 | amazonq-developer-ug.pdf | 134 | access to Amazon Q 402 Amazon Q Developer User Guide "codewhisperer:UnTagResource", "codewhisperer:ListTagsForResource", "codewhisperer:CreateProfile" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "q:ListDashboardMetrics", "cloudwatch:GetMetricData", "cloudwatch:ListMetrics" ], "Resource": [ "*" ] } ] } Allow administrators to create customizations The following policy grants administrators permission to create and manage customizations in Amazon Q Developer. To configure customizations in the Amazon Q Developer Pro console, your Amazon Q Developer administrator will require access to the Amazon Q Developer Pro console. For more information, see Allow administrators to use the Amazon Q Developer console. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. In the following example, replace account number with your AWS account number. { "Version": "2012-10-17", "Statement": [ Manage access to Amazon Q 403 Amazon Q Developer { "Effect": "Allow", "Action": [ "sso-directory:DescribeUsers" User Guide ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "kms:CreateGrant" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codewhisperer:CreateCustomization", "codewhisperer:DeleteCustomization", "codewhisperer:ListCustomizations", "codewhisperer:ListCustomizationVersions", "codewhisperer:UpdateCustomization", "codewhisperer:GetCustomization", "codewhisperer:ListCustomizationPermissions", "codewhisperer:AssociateCustomizationPermission", "codewhisperer:DisassociateCustomizationPermission" ], "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "codeconnections:ListConnections", "codeconnections:ListOwners", "codeconnections:ListRepositories", "codeconnections:GetConnection" ], "Resource": [ Manage access to Amazon Q 404 User Guide Amazon Q Developer "*" ] }, { "Effect": "Allow", "Action": "codeconnections:UseConnection", "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "codeconnections:ProviderAction": [ "GitPull", "ListRepositories", "ListOwners" ] } } }, { "Effect": "Allow", "Action": [ "s3:GetObject*", "s3:GetBucket*", "s3:ListBucket*" ], "Resource": [ "*" ] } ] } Allow administrators to configure plugins The following example policy grants administrators permissions to view and configure third party plugins in the Amazon Q Developer console. Note In order to access the Amazon Q Developer console, administrators also need the permissions defined in Allow administrators to use the Amazon Q Developer console. Manage access to Amazon Q 405 Amazon Q Developer User Guide { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "q:CreatePlugin", "q:GetPlugin", "q:DeletePlugin", "q:ListPlugins", "q:ListPluginProviders", "q:UpdatePlugin", "q:CreateAuthGrant", "q:CreateOAuthAppConnection", "q:SendEvent", "q:UpdateAuthGrant", "q:UpdateOAuthAppConnection", "q:UpdatePlugin", "iam:CreateRole", "secretsmanager:CreateSecret" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": [ "q.amazonaws.com" ] } } } ] } Manage access to Amazon Q 406 Amazon Q Developer User Guide Allow administrators to configure plugins from one provider The following example policy grants an administrator permission to configure plugins from one provider, specified by the plugin ARN with the name of the plugin provider and a wildcard character (*). To use this policy, replace the following in the ARN in the Resource field: • AWS-region – The AWS Region where the plugin will be created. • AWS-account-ID – The AWS account ID of the account where your plugin is configured. • plugin-provider – The name of the plugin provider that you want to allow configuration for, like CloudZero, Datadog, or Wiz. The plugin provider field is case sensitive. Note In order to access the Amazon Q Developer console, administrators also need the permissions defined in Allow administrators to use the Amazon Q Developer console. { "Version": "2012-10-17", "Statement": [ { "Sid": "Allow permissions to create a plugin from one provider", "Effect": "Allow", "Action": [ "q:CreatePlugin", "q:GetPlugin", "q:DeletePlugin" ], "Resource": "arn:aws:qdeveloper:AWS-region:AWS-account-ID:plugin/plugin- provider/*" } ] } Allow migration of more than one network or more than one subnet { "Version": "2012-10-17", "Statement": [{ Manage access to Amazon Q 407 Amazon Q Developer User Guide "Sid": "MGNNetworkMigrationAnalyzerEC2ResourceSgTag", "Effect": "Allow", "Action": [ "ec2:CreateSecurityGroup" ], "Resource": [ "arn:aws:ec2:region:account-id:vpc/*" ], "Condition": { "StringEquals": { "aws:ResourceTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigrationAnalyzerEC2RequestSgTag", "Effect": "Allow", "Action": [ "ec2:CreateSecurityGroup" ], "Resource": [ "arn:aws:ec2:region:account-id:security-group/*", "arn:aws:ec2:region:account-id:security-group-rule/*" ], "Condition": { "StringEquals": { "aws:RequestTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigrationAnalyzerEC2SecurityGroupTags", "Effect": "Allow", "Action": [ "ec2:CreateTags" ], "Resource": [ "arn:aws:ec2:region:account-id:security-group/*", "arn:aws:ec2:region:account-id:security-group-rule/*", "arn:aws:ec2:region:account-id:network-interface/*", "arn:aws:ec2:region:account-id:network-insights-path/*", "arn:aws:ec2:region:account-id:network-insights-analysis/*" ], Manage access to Amazon Q 408 Amazon Q Developer "Condition": { User Guide "StringEquals": { "aws:RequestTag/CreatedBy": "AWSApplicationMigrationService", "ec2:CreateAction": [ "CreateSecurityGroup", "CreateNetworkInterface", "CreateNetworkInsightsPath", "StartNetworkInsightsAnalysis" ] } } }, { "Sid": "MGNNetworkMigrationAnalyzerENIResourceTag", "Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface" ], "Resource": [ "arn:aws:ec2:region:account-id:subnet/*" ], "Condition": { "StringEquals": { "aws:ResourceTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigrationAnalyzerENISG", "Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface" ], "Resource": [ "arn:aws:ec2:region:account-id:security-group/*" ] }, { "Sid": "MGNNetworkMigrationAnalyzerEC2ResourceTag", "Effect": "Allow", "Action": [ "ec2:CreateNetworkInsightsPath" ], "Resource": [ Manage access to Amazon Q 409 Amazon Q Developer User Guide "*" ], "Condition": { "StringEquals": { "aws:ResourceTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigAnalyzerEC2RequestTag", "Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface", "ec2:CreateNetworkInsightsPath", "ec2:StartNetworkInsightsAnalysis" ], "Resource": [ "*" ], "Condition": { "StringEquals": { "aws:RequestTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigrationAnalyzeNetwork", "Effect": "Allow", "Action": [ "ec2:StartNetworkInsightsAnalysis" ], "Resource": [ "*" ] } ] } User permissions The following policies allow users to access features of Amazon Q Developer on AWS apps and websites. Manage access to Amazon Q 410 Amazon Q Developer User Guide For policies |
amazonq-developer-ug-135 | amazonq-developer-ug.pdf | 135 | "Action": [ "ec2:CreateNetworkInsightsPath" ], "Resource": [ Manage access to Amazon Q 409 Amazon Q Developer User Guide "*" ], "Condition": { "StringEquals": { "aws:ResourceTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigAnalyzerEC2RequestTag", "Effect": "Allow", "Action": [ "ec2:CreateNetworkInterface", "ec2:CreateNetworkInsightsPath", "ec2:StartNetworkInsightsAnalysis" ], "Resource": [ "*" ], "Condition": { "StringEquals": { "aws:RequestTag/CreatedBy": "AWSApplicationMigrationService" } } }, { "Sid": "MGNNetworkMigrationAnalyzeNetwork", "Effect": "Allow", "Action": [ "ec2:StartNetworkInsightsAnalysis" ], "Resource": [ "*" ] } ] } User permissions The following policies allow users to access features of Amazon Q Developer on AWS apps and websites. Manage access to Amazon Q 410 Amazon Q Developer User Guide For policies that enable administrative access to Amazon Q Developer, see Administrator permissions. Allow users to access Amazon Q with an Amazon Q Developer Pro subscription The following example policy grants permission to use Amazon Q with an Amazon Q Developer Pro subscription. Without these permissions, users can only access the Free tier of Amazon Q. To chat with Amazon Q or use other Amazon Q features, users need additional permissions, such as those granted by the example policies in this section. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowGetIdentity", "Effect": "Allow", "Action": [ "q:GetIdentityMetaData" ], "Resource": "*" }, { "Sid": "AllowSetTrustedIdentity", "Effect": "Allow", "Action": [ "sts:SetContext" ], "Resource": "arn:aws:sts::*:self" } ] } Allow Amazon Q access to customer managed keys The following example policy grants users permissions to access features encrypted with a customer managed key by allowing Amazon Q access to the key. This policy is required to use Amazon Q if an administrator has set up a customer managed key for encryption. { "Version": "2012-10-17", "Statement": [ { Manage access to Amazon Q 411 Amazon Q Developer User Guide "Sid": "QKMSDecryptGenerateDataKeyPermissions", "Effect": "Allow", "Action": [ "kms:Decrypt", "kms:GenerateDataKey", "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptFrom", "kms:ReEncryptTo" ], "Resource": [ "arn:aws:kms:{{region}}:{{account_id}}:key/[[key_id]]" ], "Condition": { "StringLike": { "kms:ViaService": [ "q.{{region}}.amazonaws.com" ] } } } ] } Allow users to chat with Amazon Q The following example policy grants permissions to chat with Amazon Q in the console. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQConversationAccess", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations" ], "Resource": "*" } ] } Manage access to Amazon Q 412 Amazon Q Developer User Guide Allow users to use Amazon Q CLI with AWS CloudShell The following example policy grants permissions to use Amazon Q CLI with AWS CloudShell. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "codewhisperer:GenerateRecommendations", "codewhisperer:ListCustomizations", ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage" ], "Resource": "*" } ] } Allow users to run transformations on the command line The following example policy grants permissions to transform code with the Amazon Q command line tool for transformations. { "Version": "2012-10-17", "Statement": [ Manage access to Amazon Q 413 User Guide Amazon Q Developer { "Effect": "Allow", "Action": [ "qdeveloper:StartAgentSession", "qdeveloper:ImportArtifact", "qdeveloper:ExportArtifact", "qdeveloper:TransformCode" ], "Resource": "*" } ] } Allow users to diagnose console errors with Amazon Q The following example policy grants permissions to diagnose console errors with Amazon Q. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQTroubleshooting", "Effect": "Allow", "Action": [ "q:StartTroubleshootingAnalysis", "q:GetTroubleshootingResults", "q:StartTroubleshootingResolutionExplanation", "q:UpdateTroubleshootingCommandResult", "q:PassRequest", "cloudformation:GetResource" ], "Resource": "*" } ] } Allow users to generate code from CLI commands with Amazon Q The following example policy grants permissions to generate code from recorded CLI commands with Amazon Q, which enables the use of the Console-to-Code feature. { Manage access to Amazon Q 414 Amazon Q Developer "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQConsoleToCode", "Effect": "Allow", "Action": "q:GenerateCodeFromCommands", "Resource": "*" } ] } User Guide Allow users to chat about resources with Amazon Q The following example policy grants permission to chat with Amazon Q about resources, and allows Amazon Q to retrieve resource information on your behalf. Amazon Q only has permission to access resources that your IAM identity has permissions for. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQPassRequest", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest" ], "Resource": "*" }, { "Sid": "AllowCloudControlReadAccess", "Effect": "Allow", "Action": [ "cloudformation:GetResource", "cloudformation:ListResources" ], "Resource": "*" } ] } Manage access to Amazon Q 415 Amazon Q Developer User Guide Allow Amazon Q to perform actions on your behalf in chat The following example policy grants permission to chat with Amazon Q, and allows Amazon Q to perform actions on your behalf. Amazon Q only has permission to perform actions that your IAM identity has permission to perform. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQPassRequest", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest" ], "Resource": "*" } ] } Deny Amazon Q permission to perform specific actions on your behalf The following example policy grants permission to chat with Amazon Q, |
amazonq-developer-ug-136 | amazonq-developer-ug.pdf | 136 | Q 415 Amazon Q Developer User Guide Allow Amazon Q to perform actions on your behalf in chat The following example policy grants permission to chat with Amazon Q, and allows Amazon Q to perform actions on your behalf. Amazon Q only has permission to perform actions that your IAM identity has permission to perform. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQPassRequest", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest" ], "Resource": "*" } ] } Deny Amazon Q permission to perform specific actions on your behalf The following example policy grants permission to chat with Amazon Q, and allows Amazon Q to perform any action on your behalf that your IAM identity has permission to perform, except for Amazon EC2 actions. This policy uses the aws:CalledVia global condition key to specify that Amazon EC2 actions are only denied when Amazon Q calls them. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest" Manage access to Amazon Q 416 User Guide Amazon Q Developer ], "Resource": "*" }, { "Effect": "Deny", "Action": [ "ec2:*" ], "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "aws:CalledVia": ["q.amazonaws.com"] } } } ] } Allow Amazon Q permission to perform specific actions on your behalf The following example policy grants permission to chat with Amazon Q, and allows Amazon Q to perform any action on your behalf that your IAM identity has permission to perform, with the exception of Amazon EC2 actions. This policy grants your IAM identity permission to perform any Amazon EC2 action, but only allows Amazon Q to perform the ec2:describeInstances action. This policy uses the aws:CalledVia global condition key to specify that Amazon Q is only allowed to call ec2:describeInstances, and not any other Amazon EC2 actions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest" ], "Resource": "*" }, { "Effect": "Allow", Manage access to Amazon Q 417 User Guide Amazon Q Developer "Action": [ "ec2:*" ], "Resource": "*", "Condition": { "ForAnyValue:StringNotEquals": { "aws:CalledVia": ["q.amazonaws.com"] } } }, { "Effect": "Allow", "Action": [ "ec2:describeInstances" ], "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "aws:CalledVia": ["q.amazonaws.com"] } } } ] } Allow Amazon Q permission to perform actions on your behalf in specific regions The following example policy grants permission to chat with Amazon Q, and allows Amazon Q to make calls to only the us-east-1 and us-west-2 Regions when performing actions on your behalf. Amazon Q can't make calls to any other Region. For more information on how to specify what Regions you can make calls to, see aws:RequestedRegion in the AWS Identity and Access Management User Guide. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", Manage access to Amazon Q 418 User Guide Amazon Q Developer "q:PassRequest" ], "Resource": "*", "Condition": { "StringEquals": { "aws:RequestedRegion": [ "us-east-1", "us-west-2" ] } } } ] } Deny Amazon Q permission to perform actions on your behalf The following example policy prevents Amazon Q from performing actions on your behalf. { "Version": "2012-10-17", "Statement": [ { "Sid": "DenyAmazonQPassRequest", "Effect": "Deny", "Action": [ "q:PassRequest" ], "Resource": "*" } ] } Allow users to chat with plugins from one provider The following example policy grants permission to chat with any plugin from a given provider that an administrator configures, specified by the plugin ARN with the name of the plugin provider and a wildcard character (*). If the plugin is deleted and re-configured, a user with these permissions will retain access to the newly configured plugin. To use this policy, replace the following in the ARN in the Resource field: • AWS-region – The AWS Region where the plugin was created. Manage access to Amazon Q 419 Amazon Q Developer User Guide • AWS-account-ID – The AWS account ID of the account where your plugin is configured. • plugin-provider – The name of the plugin provider that you want to allow access to, like CloudZero, Datadog, or Wiz. The plugin provider field is case sensitive. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQConversationAccess", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations" ], "Resource": "*" }, { "Sid": "AllowAmazonQPluginAccess", "Effect": "Allow", "Action": [ "q:UsePlugin" ], "Resource": "arn:aws:qdeveloper:AWS-region:AWS-account-ID:plugin/plugin- provider/*" } ] } Allow users to chat with a specific plugin The following example policy grants permission to chat with a specific plugin, specified by the plugin ARN. If the plugin is deleted and re-configured, a user will not have access to the new plugin unless the plugin ARN is updated in this policy. To use this policy, replace the following in the ARN in the Resource field: • AWS-region – The AWS Region where the plugin was created. • AWS-account-ID – The AWS account ID of the account where your plugin is configured. Manage access to Amazon Q 420 |
amazonq-developer-ug-137 | amazonq-developer-ug.pdf | 137 | } ] } Allow users to chat with a specific plugin The following example policy grants permission to chat with a specific plugin, specified by the plugin ARN. If the plugin is deleted and re-configured, a user will not have access to the new plugin unless the plugin ARN is updated in this policy. To use this policy, replace the following in the ARN in the Resource field: • AWS-region – The AWS Region where the plugin was created. • AWS-account-ID – The AWS account ID of the account where your plugin is configured. Manage access to Amazon Q 420 Amazon Q Developer User Guide • plugin-provider – The name of the plugin provider that you want to allow access to, like CloudZero, Datadog, or Wiz. The plugin provider field is case sensitive. • plugin-ARN – The ARN of the plugin you want to allow access to. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQConversationAccess", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations" ], "Resource": "*" }, { "Sid": "AllowAmazonQPluginAccess", "Effect": "Allow", "Action": [ "q:UsePlugin" ], "Resource": "arn:aws:qdeveloper:AWS-region:AWS-account-ID:plugin/plugin- provider/plugin-ARN" } ] } Deny access to Amazon Q The following example policy denies all permissions to use Amazon Q. Note When you deny access to Amazon Q, the Amazon Q icon and chat panel will still appear in the AWS console, AWS website, AWS documentation pages, or AWS Console Mobile Application. Manage access to Amazon Q 421 Amazon Q Developer User Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "DenyAmazonQFullAccess", "Effect": "Deny", "Action": [ "q:*" ], "Resource": "*" } ] } Allow users to view their permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", Manage access to Amazon Q 422 Amazon Q Developer User Guide "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Manage access to Amazon Q Developer for third-party integration For third-party integrations, you must use the AWS Key Management Service (KMS) to manage access to Amazon Q Developer instead of IAM policies that are neither identity-based or resource- based. Allow administrators to use customer managed keys to update role policies The following example key policy grants permission to use customer managed keys (CMK) when creating your key policy on a configured role in the KMS Console. When configuring the CMK, you must provide the IAM role ARN, an identifier, used by your integration to call Amazon Q. If you already onboarded an integration such as a GitLab instance, you must reonboard the instance for all resources to be encrypted with CMK. The kms:ViaService condition key limits the use of a KMS key to requests from specified AWS services. Additionally, it’s used to deny permission to use a KMS key when the request comes from particular services. With the condition key, you can limit who can use CMK for encrypting or decrypting content. For more information, see kms:ViaService in the AWS Key Management Service Developer Guide. With KMS encryption context, you have an optional set of key-value pairs that can be included in cryptographic operations with symmetric encryption KMS keys to enhance authorization and auditability. The encryption context can be used to verify the integrity and authenticity of encrypted data, control access to symmetric encryption KMS keys in key policies and IAM policies, and identify and categorize cryptographic operations in AWS CloudTrail logs. For more information, see Encryption context in the AWS Key Management Service Developer Guide. { "Version": "2012-10-17", Manage access to Amazon Q Developer for integration 423 User Guide Amazon Q Developer "Statement": [ { "Sid": "Sid0", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::{{awsAccountId}}:role/{{rolename}}" }, "Action": [ "kms:GenerateDataKeyWithoutPlaintext", "kms:ReEncryptFrom", "kms:ReEncryptTo", "kms:Decrypt" ], "Resource": "*", "Condition": { "StringEquals": { "kms:ViaService": "q.{{region}}.amazonaws.com", "kms:EncryptionContext:aws-crypto-ec:aws:qdeveloper:accountId": "{{accountId}}" } } } ] } Amazon Q Developer permissions reference Amazon Q Developer uses two types of APIs to provide the service: • User and administrator permissions, which can be used in policies to control usage of Amazon Q • Other APIs used to provide the service, which can’t be used in policies to control usage of Amazon Q This section provides information about the APIs used by Amazon Q Developer, and what they do. Topics • Amazon Q Developer permissions • Amazon Q User Subscriptions permissions • Other Amazon Q Developer APIs Amazon Q permissions reference 424 Amazon Q Developer User Guide Amazon Q Developer permissions You can use the following permissions as a reference when you are setting up Authenticating |
amazonq-developer-ug-138 | amazonq-developer-ug.pdf | 138 | • User and administrator permissions, which can be used in policies to control usage of Amazon Q • Other APIs used to provide the service, which can’t be used in policies to control usage of Amazon Q This section provides information about the APIs used by Amazon Q Developer, and what they do. Topics • Amazon Q Developer permissions • Amazon Q User Subscriptions permissions • Other Amazon Q Developer APIs Amazon Q permissions reference 424 Amazon Q Developer User Guide Amazon Q Developer permissions You can use the following permissions as a reference when you are setting up Authenticating with identities in Amazon Q and writing permissions policies that you can attach to an IAM identity (identity-based policies). The following table shows the Amazon Q Developer permissions that you can allow or deny access to in policies. Important To chat with Amazon Q, an IAM identity needs permissions for the following actions: • StartConversation • SendMessage • GetConversation (console only) • ListConversations (console only) If one of these actions isn't explicitly allowed by an attached policy, an IAM permissions error is returned when you try to chat with Amazon Q. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. Using q:PassRequest q:PassRequest is an Amazon Q permission that allows Amazon Q to call AWS APIs on your behalf. When you add the q:PassRequest permission to an IAM identity, Amazon Q gains permission to call any API that the IAM identity has permission to call. For example, if an IAM role has the s3:ListAllMyBuckets permission and the q:PassRequest permission, Amazon Q is able to call the ListAllMyBuckets API when a user assuming that IAM role asks Amazon Q to list their Amazon S3 buckets. Amazon Q permissions reference 425 Amazon Q Developer User Guide You can create IAM policies that restrict the scope of the q:PassRequest permission. For example, you can prevent Amazon Q from performing a specific action, or only permit Amazon Q to perform a subset of actions for a service. You can also specify what regions Amazon Q can make calls to when performing actions on your behalf. For examples of IAM policies that control the use of q:PassRequest, see the following identity- based policy examples: • Allow Amazon Q to perform actions on your behalf in chat • Deny Amazon Q permission to perform specific actions on your behalf • Allow Amazon Q permission to perform specific actions on your behalf • Allow Amazon Q permission to perform actions on your behalf in specific regions • Deny Amazon Q permission to perform actions on your behalf Amazon Q User Subscriptions permissions Amazon Q Developer administrators must have the following permissions to create and manage subscriptions for users and groups in their organization. The following terminology is useful in understanding what subscriptions permissions do: User An individual user, represented within AWS IAM Identity Center by a unique user ID. Group A collection of users, represented within AWS IAM Identity Center by a unique group ID. Subscription A subscription is tied to a single Identity Center user, and entitles them to use Amazon Q features. A subscription does not authorize a user to use Amazon Q features. For example, if Adam is subscribed to Amazon Q Developer Pro, they are entitled to used Amazon Q Developer features, but they don't have access to those features until their administrator grants them the needed permissions. Amazon Q permissions reference 426 Amazon Q Developer User Guide Other Amazon Q Developer APIs The following table shows the APIs that are used by features of Amazon Q in the IDE. These APIs aren’t used to control access to features of Amazon Q, but they will appear in AWS CloudTrail logs in management accounts when users access the associated feature. Note The codewhisperer prefix is a legacy name from a service that merged with Amazon Q Developer. For more information, see Amazon Q Developer rename - Summary of changes. AWS managed policies for Amazon Q Developer An AWS managed policy is a standalone policy that is created and administered by AWS. AWS managed policies are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles. The quickest way for an administrator to grant access to users is through an AWS managed policy. The following AWS managed policies for Amazon Q Developer can be attached to IAM identities: • AmazonQFullAccess provides full access to enable interactions with Amazon Q Developer, including administrator access. • AmazonQDeveloperAccess provides full access to enable interactions with Amazon Q Developer, without administrator access. Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use |
amazonq-developer-ug-139 | amazonq-developer-ug.pdf | 139 | are designed to provide permissions for many common use cases so that you can start assigning permissions to users, groups, and roles. The quickest way for an administrator to grant access to users is through an AWS managed policy. The following AWS managed policies for Amazon Q Developer can be attached to IAM identities: • AmazonQFullAccess provides full access to enable interactions with Amazon Q Developer, including administrator access. • AmazonQDeveloperAccess provides full access to enable interactions with Amazon Q Developer, without administrator access. Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they’re available for all AWS customers to use. We recommend that you reduce permissions further by defining customer managed policies that are specific to your use cases. You cannot change the permissions defined in AWS managed policies. If AWS updates the permissions defined in an AWS managed policy, the update affects all principal identities (users, groups, and roles) that the policy is attached to. AWS is most likely to update an AWS managed policy when a new AWS service is launched or new API operations become available for existing services. For more information, see AWS managed policies in the IAM User Guide. AWS managed policies for Amazon Q 427 Amazon Q Developer AmazonQFullAccess User Guide The AmazonQFullAccess managed policy provides administrator access to allow users in your organization to access Amazon Q Developer. It also provides full access to enable interactions with Amazon Q Developer, including logging in with IAM Identity Center to access Amazon Q through an Amazon Q Developer Pro subscription. Note To enable full access to complete administrative tasks in the Amazon Q subscription management console and Amazon Q Developer Pro console, additional permissions are needed. For more information, see Administrator permissions. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQFullAccess", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest", "q:StartTroubleshootingAnalysis", "q:GetTroubleshootingResults", "q:StartTroubleshootingResolutionExplanation", "q:UpdateTroubleshootingCommandResult", "q:GetIdentityMetadata", "q:CreateAssignment", "q:DeleteAssignment", "q:GenerateCodeFromCommands", "q:CreatePlugin", "q:GetPlugin", "q:DeletePlugin", "q:ListPlugins", "q:ListPluginProviders", "q:UsePlugin", "q:TagResource", "q:UntagResource", AWS managed policies for Amazon Q 428 Amazon Q Developer User Guide "q:ListTagsForResource", "q:UpdatePlugin", "q:CreateAuthGrant", "q:CreateOAuthAppConnection", "q:SendEvent", "q:UpdateAuthGrant", "q:UpdateOAuthAppConnection", "q:UpdatePlugin" ], "Resource": "*" }, { "Sid": "AllowCloudControlReadAccess", "Effect": "Allow", "Action": [ "cloudformation:GetResource", "cloudformation:ListResources" ], "Resource": "*" }, { "Sid": "AllowSetTrustedIdentity", "Effect": "Allow", "Action": [ "sts:SetContext" ], "Resource": "arn:aws:sts::*:self" }, { "Effect": "Allow", "Action": [ "iam:PassRole" ], "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": [ "q.amazonaws.com" ] } } } ] AWS managed policies for Amazon Q 429 Amazon Q Developer } AmazonQDeveloperAccess User Guide The AmazonQDeveloperAccess managed policy provides full access to enable interactions with Amazon Q Developer, without administrator access. It includes access to log in with IAM Identity Center to access Amazon Q through an Amazon Q Developer Pro subscription. To use some features of Amazon Q, you might need additional permissions. See the topic for the feature you want to use for information on permissions. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowAmazonQDeveloperAccess", "Effect": "Allow", "Action": [ "q:StartConversation", "q:SendMessage", "q:GetConversation", "q:ListConversations", "q:PassRequest", "q:StartTroubleshootingAnalysis", "q:StartTroubleshootingResolutionExplanation", "q:GetTroubleshootingResults", "q:UpdateTroubleshootingCommandResult", "q:GetIdentityMetaData", "q:GenerateCodeFromCommands", "q:UsePlugin" ], "Resource": "*" }, { "Sid": "AllowCloudControlReadAccess", "Effect": "Allow", "Action": [ "cloudformation:GetResource", "cloudformation:ListResources" ], "Resource": "*" }, AWS managed policies for Amazon Q 430 Amazon Q Developer { "Sid": "AllowSetTrustedIdentity", "Effect": "Allow", "Action": [ "sts:SetContext" ], "Resource": "arn:aws:sts::*:self" } ] } User Guide AWSServiceRoleForAmazonQDeveloperPolicy This AWS managed policy grants permissions commonly needed to use Amazon Q Developer. The policy is added to the AWSServiceRoleForAmazonQDeveloper service linked role that is created when you onboard to Amazon Q. You can't attach AWSServiceRoleForAmazonQDeveloperPolicy to your IAM entities. This policy is attached to a service-linked role that allows Amazon Q to perform actions on your behalf. For more information, see Using service-linked roles for Amazon Q Developer and User Subscriptions. This policy grants administrator permissions that allows metrics to be published for Billing / Usage. Permissions details This policy includes the following permissions. • cloudwatch – Allows principals to publish usage metrics to CloudWatch for Billing / Usage. This is required so that you can track your usage of Amazon Q in CloudWatch. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:PutMetricData" AWS managed policies for Amazon Q 431 User Guide Amazon Q Developer ], "Resource": "*", "Condition": { "StringEquals": { "cloudwatch:namespace": [ "AWS/Q" ] } } } ] } To view this policy in the context of other AWS managed policies, see AmazonQDeveloperPolicy. AWSServiceRoleForUserSubscriptions This AWS managed policy grants permissions commonly needed to use Amazon Q Developer. The policy is added to the AWSServiceRoleForUserSubscriptions service-linked role that is created when you create Amazon Q subscriptions. You can't attach AWSServiceRoleForUserSubscriptions to your IAM entities. This policy is attached to a service-linked role that allows Amazon Q to perform actions on your behalf. For more information, see Using service-linked roles for Amazon Q Developer and User Subscriptions. This policy provides access |
amazonq-developer-ug-140 | amazonq-developer-ug.pdf | 140 | { "cloudwatch:namespace": [ "AWS/Q" ] } } } ] } To view this policy in the context of other AWS managed policies, see AmazonQDeveloperPolicy. AWSServiceRoleForUserSubscriptions This AWS managed policy grants permissions commonly needed to use Amazon Q Developer. The policy is added to the AWSServiceRoleForUserSubscriptions service-linked role that is created when you create Amazon Q subscriptions. You can't attach AWSServiceRoleForUserSubscriptions to your IAM entities. This policy is attached to a service-linked role that allows Amazon Q to perform actions on your behalf. For more information, see Using service-linked roles for Amazon Q Developer and User Subscriptions. This policy provides access for Amazon Q Subscriptions to your Identity Center resources to automatically update your subscriptions. Permissions details This policy includes the following permissions. • identitystore – Allows principals to track Identity Center directory changes so that subscriptions can be automatically updated. organizations – Allows principals to track AWS Organizations changes so that subscriptions can be automatically updated. sso – Allows principals to track Identity Center instance changes so that subscriptions can be automatically updated. AWS managed policies for Amazon Q 432 Amazon Q Developer User Guide { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "identitystore:DescribeGroup", "identitystore:DescribeUser", "identitystore:IsMemberInGroups", "identitystore:ListGroupMemberships", "organizations:DescribeOrganization", "sso:DescribeApplication", "sso:DescribeInstance", "sso:ListInstances", "sso:ListApplicationAssignments", "sso:UpdateApplication" ], "Resource": "*" } ] } To view this policy in the context of other AWS managed policies, see AWSServiceRoleForUserSubscriptions. GitLabDuoWithAmazonQPermissionsPolicy This policy grants permission to connect with Amazon Q and utilize the features in the GitLab Duo with Amazon Q integration. The policy is added to the IAM role created from the Amazon Q Developer console to access Amazon Q. You need to manually provide the IAM role to GitLab as an Amazon Resource Name (ARN). The policy allows the following: • GitLab Duo usage permissions - Allows basic operations such as sending events and messages, creating and updating auth grants, generating code recommendations, listing plugins, and verifying OAuth app connections. • GitLab Duo management permissions - Enables the creation and deletion of OAuth app connections, providing control over the integration setup. • GitLab Duo plugin permissions - Grants specific permissions to create, delete, and retrieve plugins related to the GitLab Duo integration with Amazon Q. AWS managed policies for Amazon Q 433 Amazon Q Developer User Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "GitLabDuoUsagePermissions", "Effect": "Allow", "Action": [ "q:SendEvent", "q:CreateAuthGrant", "q:UpdateAuthGrant", "q:GenerateCodeRecommendations", "q:SendMessage", "q:ListPlugins", "q:VerifyOAuthAppConnection" ], "Resource": "*" }, { "Sid": "GitLabDuoManagementPermissions", "Effect": "Allow", "Action": [ "q:CreateOAuthAppConnection", "q:DeleteOAuthAppConnection", "q:UpdateOAuthAppConnection" ], "Resource": "*" }, { "Sid": "GitLabDuoPluginPermissions", "Effect": "Allow", "Action": [ "q:CreatePlugin", "q:DeletePlugin", "q:GetPlugin" ], "Resource": "arn:aws:qdeveloper:*:*:plugin/GitLabDuoWithAmazonQ/*" } ] } AWS managed policies for Amazon Q 434 Amazon Q Developer Policy updates User Guide View details about updates to AWS managed policies for Amazon Q Developer since this service began tracking these changes. For automatic alerts about changes to this page, subscribe to the RSS feed on the Document history for Amazon Q Developer User Guide page. Change Description AmazonQFu llAccess - Updated policy Additional permission has been added to update feature enablement controls for third-party integration plugin. Date May 2, 2025 AmazonQFu llAccess - Additional permissions have been added to allow access and enable interactions with Amazon Q Developer for third-party April 30, 2025 Updated policy plugins. GitLabDuo WithAmazo nQPermiss ionsPolicy - Updated policy GitLabDuo WithAmazo nQPermiss ionsPolicy - New policy AWSServic eRoleForU serSubscriptions - Updated policy AmazonQDe veloperAccess - Updated policy Additional permission has been added to allow udpates to a third-party OAuth application with Amazon Q Developer. April 30, 2025 Allows GitLab to connect with Amazon Q Developer to use GitLab Duo with Amazon Q integration features. April 17, 2025 Allows Amazon Q to discover the email verification status of end users. February 17, 2025 Additional permissions have been added to enable the use of Amazon Q Developer plugins. November 13, 2024 AWS managed policies for Amazon Q 435 Amazon Q Developer Change Description User Guide Date AmazonQFu llAccess - Additional permissions have been added to configure and use Amazon Q Developer plugins and to create and manage tags November 13, 2024 Updated policy for Amazon Q Developer resources. AmazonQDe veloperAccess - Updated policy AmazonQFu llAccess - Updated policy AmazonQFu llAccess - Updated policy Additional permissions have been added to enable code generation from CLI commands with Amazon Q. October 28, 2024 Additional permissions have been added to enable code generation from CLI commands with Amazon Q. October 28, 2024 Additional permissions have been added to enable Amazon Q to access downstream resources. July 9, 2024 AmazonQDe veloperAccess - Provides full access to enable interactions with Amazon Q Developer, without administrator access. July 9, 2024 New policy AmazonQFu llAccess - Updated policy Additional permissions have been added to enable subscript ions checks for Amazon Q Developer. April 30, 2024 AWSServic eRoleForU Allows Amazon Q Subscriptions to automatically update subscriptions from |
amazonq-developer-ug-141 | amazonq-developer-ug.pdf | 141 | enable code generation from CLI commands with Amazon Q. October 28, 2024 Additional permissions have been added to enable code generation from CLI commands with Amazon Q. October 28, 2024 Additional permissions have been added to enable Amazon Q to access downstream resources. July 9, 2024 AmazonQDe veloperAccess - Provides full access to enable interactions with Amazon Q Developer, without administrator access. July 9, 2024 New policy AmazonQFu llAccess - Updated policy Additional permissions have been added to enable subscript ions checks for Amazon Q Developer. April 30, 2024 AWSServic eRoleForU Allows Amazon Q Subscriptions to automatically update subscriptions from changes in AWS IAM Identity Center, AWS April 30, 2024 serSubscriptions - New policy IAM Identity Center directory and AWS Organizations on your behalf. Allows Amazon Q to call Amazon CloudWatch and Amazon CodeGuru on your behalf. April 30, 2024 AWSServic eRoleForA mazonQDev eloperPolicy - New policy AWS managed policies for Amazon Q 436 Amazon Q Developer Change Description User Guide Date AmazonQFu llAccess - New Provides full access to enable interactions with Amazon Q Developer. November 28, 2023 policy Amazon Q Developer started tracking changes Amazon Q Developer started tracking changes to AWS managed policies. November 28, 2023 Using service-linked roles for Amazon Q Developer and User Subscriptions Amazon Q Developer uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to Amazon Q Developer. Service-linked roles are predefined by Amazon Q Developer and include all the permissions that the service requires to call other AWS services on your behalf. Topics • Using service-linked roles for Amazon Q Developer • Using service-linked-roles for User Subscriptions Using service-linked roles for Amazon Q Developer Amazon Q Developer uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to Amazon Q Developer. Service-linked roles are predefined by Amazon Q Developer and include all the permissions that the service requires to call other AWS services on your behalf. A service-linked role makes setting up Amazon Q Developer easier because you don’t have to manually add the necessary permissions. Amazon Q Developer defines the permissions of its service-linked roles, and unless defined otherwise, only Amazon Q Developer can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity. Using service-linked roles 437 Amazon Q Developer User Guide You can delete a service-linked role only after first deleting their related resources. This protects your Amazon Q Developer resources because you can't inadvertently remove permission to access the resources. For information about other services that support service-linked roles, see AWS services that work with IAM and look for the services that have Yes in the Service-linked roles column. Choose a Yes with a link to view the service-linked role documentation for that service. Learn about AWS managed policies for Amazon Q Developer. Service-linked role permissions for Amazon Q Developer Amazon Q Developer uses the service-linked role named AWSServiceRoleForAmazonQDeveloper – This role grants permissions to Amazon Q to access data in your account to calculate billing, provides access to create and access security reports in Amazon CodeGuru, and emit data to CloudWatch. The AWSServiceRoleForAmazonQDeveloper service-linked role trusts the following services to assume the role: • q.amazonaws.com The role permissions policy named AWSServiceRoleForAmazonQDeveloperPolicy allows Amazon Q Developer to complete the following actions on the specified resources: • Action: cloudwatch:PutMetricData on AWS/Q CloudWatch namespace You must configure permissions to allow your users, groups, or roles to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide. Creating a service-linked role for Amazon Q Developer You don't need to manually create a service-linked role. When you create a profile for Amazon Q in the AWS Management Console, Amazon Q Developer creates the service-linked role for you. If you delete this service-linked role, and then need to create it again, you can use the same process to recreate the role in your account. When you update the settings, Amazon Q creates the service- linked role for you again. You can also use the IAM console or AWS CLI to create a service-linked role with the q.amazonaws.com service name. For more information, see Creating a service-linked role in the Using service-linked roles 438 Amazon Q Developer User Guide IAM User Guide. If you delete this service-linked role, you can use this same process to create the role again. Editing a service-linked role for Amazon Q Developer Amazon Q Developer does not allow you to edit the AWSServiceRoleForAmazonQDeveloper service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, |
amazonq-developer-ug-142 | amazonq-developer-ug.pdf | 142 | also use the IAM console or AWS CLI to create a service-linked role with the q.amazonaws.com service name. For more information, see Creating a service-linked role in the Using service-linked roles 438 Amazon Q Developer User Guide IAM User Guide. If you delete this service-linked role, you can use this same process to create the role again. Editing a service-linked role for Amazon Q Developer Amazon Q Developer does not allow you to edit the AWSServiceRoleForAmazonQDeveloper service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see Editing a service-linked role in the IAM User Guide. Deleting a service-linked role for Amazon Q Developer If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it. Note If the Amazon Q Developer service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again. To manually delete the service-linked role using IAM Use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForAmazonQDeveloper service-linked role. For more information, see Deleting a service-linked role in the IAM User Guide. Supported Regions for Amazon Q Developer service-linked roles Amazon Q Developer does not support using service-linked roles in every Region where the service is available. You can use the AWSServiceRoleForAmazonQDeveloper role in the following Regions. For more information, see AWS Regions and endpoints. Region name Region identity Support in Amazon Q Developer US East (N. Virginia) us-east-1 Yes Using service-linked roles 439 Region identity Support in Amazon Q Developer User Guide Amazon Q Developer Region name US East (Ohio) US West (N. California) US West (Oregon) Africa (Cape Town) Asia Pacific (Hong Kong) us-east-2 us-west-1 us-west-2 af-south-1 ap-east-1 Asia Pacific (Jakarta) ap-southeast-3 Asia Pacific (Mumbai) Asia Pacific (Osaka) Asia Pacific (Seoul) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Milan) Europe (Paris) Europe (Stockholm) Middle East (Bahrain) ap-south-1 ap-northeast-3 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-northeast-1 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-south-1 eu-west-3 eu-north-1 me-south-1 No No No No No No No No No No No No No No No No No No No No Using service-linked roles 440 Amazon Q Developer Region name Region identity Support in Amazon Q Developer User Guide Middle East (UAE) South America (São Paulo) me-central-1 sa-east-1 AWS GovCloud (US-East) us-gov-east-1 AWS GovCloud (US-West) us-gov-west-1 No No No No Using service-linked-roles for User Subscriptions User Subscriptions uses AWS Identity and Access Management (IAM) service-linked roles. A service- linked role is a unique type of IAM role that is linked directly to User Subscriptions. Service-linked roles are predefined by User Subscriptions and include all the permissions that the service requires to call other AWS services on your behalf. A service-linked role makes setting up User Subscriptions easier because you don’t have to manually add the necessary permissions. User Subscriptions defines the permissions of its service- linked roles, and unless defined otherwise, only User Subscriptions can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity. You can delete a service-linked role only after first deleting their related resources. This protects your User Subscriptions because you can't inadvertently remove permissions required by the resources. For information about other services that support service-linked roles, see AWS services that work with IAM and look for the services that have Yes in the Service-linked roles column. Choose a Yes with a link to view the service-linked role documentation for that service. Service-linked role permissions for User Subscriptions User Subscriptions uses the service-linked role named AWSServiceRoleForUserSubscriptions. This role provides access for User Subscriptions to your IAM Identity Center resources in order to automatically update your subscriptions. The AWSServiceRoleForUserSubscriptions service-linked role trusts the following services to assume the role: Using service-linked roles 441 Amazon Q Developer User Guide • user-subscriptions.amazonaws.com The role permissions policy named AWSServiceRoleForUserSubscriptions allows User Subscriptions to complete the following actions on the specified resources: • Action: identitystore:DescribeGroup on * Action: identitystore:DescribeUser on * Action: identitystore:IsMemberInGroups on * Action: identitystore:ListGroupMemberships on * Action: organizations:DescribeOrganization on * Action: sso:DescribeApplication on * Action: sso:DescribeInstance on * Action: sso:ListInstances on * Action: sso-directory:DescribeUser on * You must configure permissions to allow your users, groups, or roles to create, edit, or delete a service-linked role. For more information, see Service-linked role |
amazonq-developer-ug-143 | amazonq-developer-ug.pdf | 143 | role trusts the following services to assume the role: Using service-linked roles 441 Amazon Q Developer User Guide • user-subscriptions.amazonaws.com The role permissions policy named AWSServiceRoleForUserSubscriptions allows User Subscriptions to complete the following actions on the specified resources: • Action: identitystore:DescribeGroup on * Action: identitystore:DescribeUser on * Action: identitystore:IsMemberInGroups on * Action: identitystore:ListGroupMemberships on * Action: organizations:DescribeOrganization on * Action: sso:DescribeApplication on * Action: sso:DescribeInstance on * Action: sso:ListInstances on * Action: sso-directory:DescribeUser on * You must configure permissions to allow your users, groups, or roles to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide. Creating a service-linked role for User Subscriptions You don't need to manually create a service-linked role. When you create a User Subscription in the AWS Management Console, User Subscriptions creates the service-linked role for you. If you delete this service-linked role, and then need to create it again, you can use the same process to recreate the role in your account. When you update the settings, User Subscriptions creates the service-linked role for you again. You can also use the IAM console or AWS CLI to create a service-linked role with the q.amazonaws.com service name. For more information, see Creating a service-linked role in the IAM User Guide. If you delete this service-linked role, you can use this same process to create the role again. Using service-linked roles 442 Amazon Q Developer User Guide Editing a service-linked role for User Subscriptions User Subscriptions does not allow you to edit the AWSServiceRoleForUserSubscriptions service- linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see Editing a service-linked role in the IAM User Guide. Deleting a service-linked role for User Subscriptions If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don’t have an unused entity that is not actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it. Note If the User Subscriptions service is using the role when you try to delete the resources, then the deletion might fail. If that happens, wait for a few minutes and try the operation again. To manually delete the service-linked role using IAM Use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForUserSubscriptions service-linked role. For more information, see Deleting a service-linked role in the IAM User Guide. Supported Regions for User Subscriptions service-linked roles Amazon Q Developer Subscriptions supports using service-linked roles in all of the Regions where the service is available. For more information, see AWS Regions and endpoints. Amazon Q Developer Subscriptions does not support using service-linked roles in every Region where the service is available. You can use the AWSServiceRoleForUserSubscriptions role in the following Regions. Region name Region identity Support in User Subscriptions US East (N. Virginia) us-east-1 Yes Using service-linked roles 443 Amazon Q Developer Region name US West (Oregon) US East (N. Virginia) US East (Ohio) US East (Ohio) US West (N. California) Asia Pacific (Mumbai) Asia Pacific (Osaka) Asia Pacific (Seoul) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Canada (Central) Europe (Frankfurt) Europe (Ireland) Europe (London) Europe (Paris) Europe (Stockholm) South America (São Paulo) Region identity Support in User Subscriptions User Guide us-west-2 us-east-1 us-east-2 us-east-2 us-west-1 ap-south-1 ap-northeast-3 ap-northeast-2 ap-southeast-1 ap-southeast-2 ap-northeast-1 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 eu-north-1 sa-east-1 Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Using service-linked roles 444 Amazon Q Developer User Guide Compliance validation for Amazon Q Developer To learn whether an AWS service is within the scope of specific compliance programs, see AWS services in Scope by Compliance Program and choose the compliance program that you are interested in. For general information, see AWS Compliance Programs. You can download third-party audit reports using AWS Artifact. For more information, see Downloading Reports in AWS Artifact. Your compliance responsibility when using AWS services is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. AWS provides the following resources to help with compliance: • Security Compliance & Governance – These solution implementation guides discuss architectural considerations and provide steps for deploying security and compliance features. • HIPAA Eligible Services Reference – Lists HIPAA eligible services. Not all AWS services are HIPAA eligible. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • AWS Customer Compliance Guides – Understand the shared responsibility model through the lens of compliance. The guides summarize |
amazonq-developer-ug-144 | amazonq-developer-ug.pdf | 144 | by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations. AWS provides the following resources to help with compliance: • Security Compliance & Governance – These solution implementation guides discuss architectural considerations and provide steps for deploying security and compliance features. • HIPAA Eligible Services Reference – Lists HIPAA eligible services. Not all AWS services are HIPAA eligible. • AWS Compliance Resources – This collection of workbooks and guides might apply to your industry and location. • AWS Customer Compliance Guides – Understand the shared responsibility model through the lens of compliance. The guides summarize the best practices for securing AWS services and map the guidance to security controls across multiple frameworks (including National Institute of Standards and Technology (NIST), Payment Card Industry Security Standards Council (PCI), and International Organization for Standardization (ISO)). • Evaluating Resources with Rules in the AWS Config Developer Guide – The AWS Config service assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations. • AWS Security Hub – This AWS service provides a comprehensive view of your security state within AWS. Security Hub uses security controls to evaluate your AWS resources and to check your compliance against security industry standards and best practices. For a list of supported services and controls, see Security Hub controls reference. • Amazon GuardDuty – This AWS service detects potential threats to your AWS accounts, workloads, containers, and data by monitoring your environment for suspicious and malicious activities. GuardDuty can help you address various compliance requirements, like PCI DSS, by meeting intrusion detection requirements mandated by certain compliance frameworks. Compliance validation 445 Amazon Q Developer User Guide • AWS Audit Manager – This AWS service helps you continuously audit your AWS usage to simplify how you manage risk and compliance with regulations and industry standards. Resilience in Amazon Q Developer The AWS global infrastructure is built around AWS Regions and Availability Zones. AWS Regions provide multiple physically separated and isolated Availability Zones, which are connected with low-latency, high-throughput, and highly redundant networking. With Availability Zones, you can design and operate applications and databases that automatically fail over between zones without interruption. Availability Zones are more highly available, fault tolerant, and scalable than traditional single or multiple data center infrastructures. For more information about AWS Regions and Availability Zones, see AWS Global Infrastructure. Infrastructure security in Amazon Q Developer As a managed service, Amazon Q is protected by AWS global network security. For information about AWS security services and how AWS protects infrastructure, see AWS Cloud Security. To design your AWS environment using the best practices for infrastructure security, see Infrastructure Protection in Security Pillar AWS Well‐Architected Framework. You use AWS published API calls to access Amazon Q Developer through the network. Clients must support the following: • Transport Layer Security (TLS). We require TLS 1.2 and recommend TLS 1.3. • Cipher suites with perfect forward secrecy (PFS) such as DHE (Ephemeral Diffie-Hellman) or ECDHE (Elliptic Curve Ephemeral Diffie-Hellman). Most modern systems such as Java 7 and later support these modes. Additionally, requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal. Or you can use the AWS Security Token Service (AWS STS) to generate temporary security credentials to sign requests. Resilience 446 Amazon Q Developer User Guide Configuring a firewall, proxy server, or data perimeter for Amazon Q Developer If you're using a firewall, proxy server, or data perimeter, make sure to allowlist traffic to the following URLs and Amazon Resource Names (ARNs) so that Amazon Q works as expected. General URLs to allowlist URL Purpose identity-center-directory-id-or- Authentication alias .awsapps.com oidc.region.amazonaws.com Authentication *.sso.region.amazonaws.com Authentication *.sso-portal. region.amazonaws.com Authentication *.aws.dev *.awsstatic.com *.console.aws.a2z.com *.sso.amazonaws.com Authentication Authentication Authentication Authentication https://codewhisperer.us-ea Amazon Q Developer features st-1.amazonaws.com https://q.us-east-1.amazona Amazon Q Developer features ws.com https://idetoolkits-hostedf Amazon Q Developer in the IDE, configuration iles.amazonaws.com/* https://idetoolkits.amazonw Amazon Q Developer in the IDE, endpoints ebservices.com/* Firewalls, proxies, and data perimeters 447 Amazon Q Developer URL Purpose User Guide https://aws-toolkit-language- servers.amazonaws.com/* Amazon Q Developer in the IDE, language processing https://aws-language-servers.us- east-1.amazonaws.com Amazon Q Developer in the IDE, language processing https://client-telemetry.us- Amazon Q Developer in the IDE, telemetry east-1.amazonaws.com cognito-identity.us-east-1. Amazon Q Developer in the IDE, telemetry amazonaws.com Amazon S3 bucket URLs and ARNs to allowlist For some features, Amazon Q uploads artifacts to AWS service-owned Amazon S3 buckets. If you are using data perimeters to control access to Amazon S3 in your environment, you might need to explicitly allow access to these buckets to use the corresponding Amazon Q features. The following table lists the URL and ARN of each of the Amazon S3 buckets that Amazon Q requires access to, and the features that use each bucket. You can use the bucket URL or bucket ARN to allowlist |
amazonq-developer-ug-145 | amazonq-developer-ug.pdf | 145 | Amazon Q Developer in the IDE, telemetry amazonaws.com Amazon S3 bucket URLs and ARNs to allowlist For some features, Amazon Q uploads artifacts to AWS service-owned Amazon S3 buckets. If you are using data perimeters to control access to Amazon S3 in your environment, you might need to explicitly allow access to these buckets to use the corresponding Amazon Q features. The following table lists the URL and ARN of each of the Amazon S3 buckets that Amazon Q requires access to, and the features that use each bucket. You can use the bucket URL or bucket ARN to allowlist these buckets, depending on how you control access to Amazon S3. Amazon S3 bucket URL and ARN Purpose https://amazonq-code-scan-u s-east-1-29121b44f7b.s3.ama An Amazon S3 bucket used to upload artifacts for Amazon Q code reviews zonaws.com/ arn:aws:s3:::amazonq-code-scan- us-east-1-29121b44f7b https://amazonq-code-transf ormation-us-east-1-c6160f04 An Amazon S3 bucket used to upload artifacts for the Amazon Q Developer Agent for code 7e0.s3.amazonaws.com/ transformation Amazon S3 bucket URLs and ARNs to allowlist 448 Amazon Q Developer User Guide Amazon S3 bucket URL and ARN Purpose arn:aws:s3:::amazonq-code-t ransformation-us-east-1-c61 60f047e0 https://amazonq-feature-dev elopment-us-east-1-a5b98005 An Amazon S3 bucket used to upload artifacts for the Amazon Q Developer Agent for 4c6.s3.amazonaws.com/ software development arn:aws:s3:::amazonq-featur e-development-us-east-1-a5b 980054c6 https://amazonq-test-generation- us-east-1-74b667808f2.s3.us-eas An Amazon S3 bucket used to upload artifacts for the Amazon Q Developer Agent for unit t-1.amazonaws.com/ test generation arn:aws:s3:::amazonq-test-g eneration-us-east-1-74b667808f2 Amazon Q Developer and interface endpoints (AWS PrivateLink) Note Amazon Q Developer supports interface endpoints for features available in your IDE. Chatting with Amazon Q on AWS apps and websites is not supported for VPC endpoints. Neither is the Amazon Q Developer transformation web experience. You can establish a private connection between your VPC and Amazon Q Developer by creating an interface VPC endpoint. Interface endpoints are powered by AWS PrivateLink, a technology that enables you to privately access Amazon Q APIs without an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. Instances in your VPC don't need public IP addresses to communicate with Amazon Q APIs. Traffic between your VPC and Amazon Q does not leave the Amazon network. VPC endpoints (AWS PrivateLink) 449 Amazon Q Developer User Guide Each interface endpoint is represented by one or more Elastic Network Interfaces in your subnets. For more information, see Interface VPC endpoints (AWS PrivateLink ) in the Amazon VPC User Guide. Considerations for Amazon Q VPC endpoints Before you set up an interface VPC endpoint for Amazon Q, ensure that you review Interface endpoint properties and limitations in the Amazon VPC User Guide. Amazon Q supports making calls to all of its API actions from your VPC, in the context of services that are configured to work with Amazon Q. Prerequisites Before you begin any of the procedures below, ensure that you have the following: • An AWS account with appropriate permissions to create and configure resources. • A VPC already created in your AWS account. • Familiarity with AWS services, especially Amazon VPC and Amazon Q. Creating an interface VPC endpoint for Amazon Q You can create a VPC endpoint for the Amazon Q service using either the Amazon VPC console or the AWS Command Line Interface (AWS CLI). For more information, see Creating an interface endpoint in the Amazon VPC User Guide. Create the following VPC endpoints for Amazon Q using the following service names: • com.amazonaws.region.q • com.amazonaws.region.codewhisperer If you enable private DNS for the endpoint, you can make API requests to Amazon Q using its default DNS name for the Region, for example, q.us-east-1.amazonaws.com. For more information, see Accessing a service through an interface endpoint in the Amazon VPC User Guide. Considerations for Amazon Q VPC endpoints 450 Amazon Q Developer Note User Guide Currently, you can only create an interface endpoint for Amazon Q Developer in the US East (N. Virginia) Region and Europe (Frankfurt) Region. Using an on-premises computer to connect to a Amazon Q endpoint This section describes the process of using an on-premises computer to connect to Amazon Q through a AWS PrivateLink endpoint in your AWS VPC. 1. Create a VPN connection between your on-premises device and your VPC. 2. Create an interface VPC endpoint for Amazon Q. 3. Set up an inbound Amazon Route 53 endpoint. This will enable you to use the DNS name of your Amazon Q endpoint from your on-premesis device. Using an in-console coding environment to connect to a Amazon Q endpoint This section describes the process of using an in-console coding environment to connect to a Amazon Q endpoint. In this context, an in-console IDE is an IDE that you access inside the AWS console, and authenticate to with IAM. Examples include SageMaker AI Studio and AWS Glue Studio. 1. Create an interface VPC endpoint for Amazon Q. 2. Set up Amazon Q with the in-console |
amazonq-developer-ug-146 | amazonq-developer-ug.pdf | 146 | inbound Amazon Route 53 endpoint. This will enable you to use the DNS name of your Amazon Q endpoint from your on-premesis device. Using an in-console coding environment to connect to a Amazon Q endpoint This section describes the process of using an in-console coding environment to connect to a Amazon Q endpoint. In this context, an in-console IDE is an IDE that you access inside the AWS console, and authenticate to with IAM. Examples include SageMaker AI Studio and AWS Glue Studio. 1. Create an interface VPC endpoint for Amazon Q. 2. Set up Amazon Q with the in-console coding environment • SageMaker AI Studio • AWS Glue Studio 3. Configure the coding environment to use the Amazon Q endpoint. • SageMaker AI Studio • AWS Glue Studio Using an on-premises computer to connect to a Amazon Q endpoint 451 Amazon Q Developer User Guide Connecting to Amazon Q through AWS PrivateLink from a third-Party IDE on an Amazon EC2 instance This section will walk you through the process of installing a third-party Integrated Development Environment (IDE) like Visual Studio Code or JetBrains on an Amazon EC2 instance, and configuring it to connect to Amazon Q using AWS PrivateLink. 1. Create an interface VPC endpoint for Amazon Q. 2. Launch an Amazon EC2 instance in your desired subnet within your VPC. You can choose an Amazon Machine Image (AMI) that is compatible with your third-party IDE. For example, you can select an Amazon Linux 2 AMI. 3. Connect to the Amazon EC2 instance. 4. 5. Install and Configure the IDE (Visual Studio Code or JetBrains). Install the Amazon Q extension or plugin. 6. Configure the IDE to connect via AWS PrivateLink. • Network connections in Visual Studio Code • JetBrains remote development Connecting to Amazon Q through AWS PrivateLink from a third-Party IDE on an Amazon EC2 instance 452 Amazon Q Developer User Guide Monitoring and tracking the use of Amazon Q Developer Monitoring is an important part of maintaining the reliability, availability, and performance of Amazon Q Developer and your other AWS solutions. AWS provides the following monitoring tools and features to monitor and record Amazon Q Developer activity: • AWS CloudTrail captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon Simple Storage Service (Amazon S3) bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred. For more information, see Logging Amazon Q Developer API calls using AWS CloudTrail. • Amazon CloudWatch monitors your AWS resources and the applications you run on AWS in real time. You can collect and track metrics, create customized dashboards, and set alarms that notify you or take actions when a specified metric reaches a threshold that you specify. For example, you can have CloudWatch track the number of times that Amazon Q has been invoked on your account, or the number of daily active users. For more information, see Monitoring Amazon Q Developer with Amazon CloudWatch. Amazon Q Developer also includes the following features to help you track and record user activity in Amazon Q: • A dashboard shows you aggregate user activity metrics of Amazon Q Developer Pro subscribers. For more information, see Viewing Amazon Q Developer user activity on the dashboard. • User activity reports show you what individual users are up to in Amazon Q. For more information, see Viewing the activity of specific users in Amazon Q Developer. • Prompt logs provide you with a record of all the prompts that users enter into the Amazon Q chat in their integrated development environment (IDE). For more information, see Logging users' prompts in Amazon Q Developer. Logging Amazon Q Developer API calls using AWS CloudTrail Amazon Q Developer Pro is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Amazon Q. CloudTrail captures all API calls for Amazon Q as events. The calls captured include calls from the Amazon Q console and code calls to the Amazon Q API operations. If you create a trail, you can enable continuous delivery of CloudTrail With AWS CloudTrail 453 Amazon Q Developer User Guide events to an Amazon S3 bucket, including events for Amazon Q. If you don’t configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Amazon Q, the IP address from which the request was made, who made the request, when it was made, and additional details. For more information about CloudTrail, see the AWS CloudTrail User Guide. Amazon Q Developer |
amazonq-developer-ug-147 | amazonq-developer-ug.pdf | 147 | trail, you can enable continuous delivery of CloudTrail With AWS CloudTrail 453 Amazon Q Developer User Guide events to an Amazon S3 bucket, including events for Amazon Q. If you don’t configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail, you can determine the request that was made to Amazon Q, the IP address from which the request was made, who made the request, when it was made, and additional details. For more information about CloudTrail, see the AWS CloudTrail User Guide. Amazon Q Developer information in CloudTrail CloudTrail is enabled on your AWS account when you create the account. When activity occurs in Amazon Q Developer, that activity is recorded in a CloudTrail event along with other AWS service events in Event history. You can view, search, and download recent events in your AWS account. For more information, see Viewing Events with CloudTrail Event History in the AWS CloudTrail User Guide. For an ongoing record of events in your AWS account, including events for Amazon Q, create a trail. A trail enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following topics in the AWS CloudTrail User Guide: • Overview for creating a trail • CloudTrail supported services and integrations • Configuring Amazon SNS notifications for CloudTrail • Receiving CloudTrail log files from multiple Regions • Receiving CloudTrail log files from multiple accounts All Amazon Q Developer actions are logged by CloudTrail and generate entries in the CloudTrail log files. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials • Whether the request was made with temporary security credentials for a role or federated user Amazon Q Developer information in CloudTrail 454 Amazon Q Developer User Guide • Whether the request was made by another AWS service For more information, see CloudTrail userIdentity element in the AWS CloudTrail User Guide. Understanding Amazon Q Developer log file entries A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren’t an ordered stack trace of the public API calls, so they don’t appear in any specific order. Amazon Q Developer also makes API calls with a dryRun parameter to verify that you have the necessary permissions for the action, without actually making the request. Calls to Amazon Q Developer APIs with the dryRun parameter are captured as events and recorded in a CloudTrail log with "dryRun" : true in the requestParameters field. The following example shows a CloudTrail log entry that demonstrates the SendMessage action. { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROAXD12ABCDEF3G4HI5J:aws-user", "arn": "arn:aws:sts::123456789012:assumed-role/PowerUser/aws-user", "accountId": "123456789012", "accessKeyId": "ASIAAB12CDEFG34HIJK", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AROAXD12ABCDEF3G4HI5J", "arn": "arn:aws:iam::123456789012:role/PowerUser", "accountId": "123456789012", "userName": "PowerUser" }, "webIdFederationData": {}, "attributes": { "creationDate": "2023-11-28T10:00:00Z", "mfaAuthenticated": "false" } } }, Understanding Amazon Q Developer log file entries 455 Amazon Q Developer User Guide "eventTime": "2023-11-28T10:00:00Z", "eventSource": "q.amazonaws.com", "eventName": "SendMessage", "awsRegion": "us-east-1", "sourceIPAddress": "123.456.789.012", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0", "requestParameters": { "Origin": "https://conversational-experience- worker.widget.console.aws.amazon.com", "conversationId": "a298ec0d-0a49-4d2e-92bd-7d6e629b4619", "source": "CONSOLE", "conversationToken": "***", "utterance": "***" }, "responseElements": { "result": { "content": { "text": { "body": "***", "references": [] } }, "format": "PLAINTEXT", "intents": {}, "type": "TEXT" }, "Access-Control-Expose-Headers": "x-amzn-RequestId,x-amzn-ErrorType,x-amzn- ErrorMessage,Date", "metadata": { "conversationExpirationTime": "2024-02-25T19:31:38Z", "conversationId": "a298ec0d-0a49-4d2e-92bd-7d6e629b4619", "conversationToken": "***", "utteranceId": "3b87b46f-04a9-41ef-b8fe-8abf52d2c053" }, "resultCode": "LLM" }, "requestID": "19b3c30e-906e-4b7f-b5c3-509f67248655", "eventID": "a552c487-7d97-403a-8ec4-d49539c7a03d", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "123456789012", "eventCategory": "Management" Understanding Amazon Q Developer log file entries 456 Amazon Q Developer } User Guide The following example shows a CloudTrail log entry that demonstrates the PassRequest action. { "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Mary", "accountId": "555555555555", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Mary", "accountId": "555555555555", "userName": "Mary" }, "attributes": { "creationDate": "2024-04-10T20:03:01Z", "mfaAuthenticated": "false" }, "invokedBy": "q.amazonaws.com" }, "eventTime": "2024-04-10T20:04:42Z", "eventSource": "q.amazonaws.com", "eventName": "PassRequest", "awsRegion": "us-east-1", "sourceIPAddress": "q.amazonaws.com", "userAgent": "q.amazonaws.com", "requestParameters": null, "responseElements": null, "requestID": "2d528c76-329e-410b-9516-EXAMPLE565dc", "eventID": "ba0801a1-87ec-4d26-be87-EXAMPLE75bbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": |
amazonq-developer-ug-148 | amazonq-developer-ug.pdf | 148 | "managementEvent": true, "recipientAccountId": "123456789012", "eventCategory": "Management" Understanding Amazon Q Developer log file entries 456 Amazon Q Developer } User Guide The following example shows a CloudTrail log entry that demonstrates the PassRequest action. { "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Mary", "accountId": "555555555555", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Mary", "accountId": "555555555555", "userName": "Mary" }, "attributes": { "creationDate": "2024-04-10T20:03:01Z", "mfaAuthenticated": "false" }, "invokedBy": "q.amazonaws.com" }, "eventTime": "2024-04-10T20:04:42Z", "eventSource": "q.amazonaws.com", "eventName": "PassRequest", "awsRegion": "us-east-1", "sourceIPAddress": "q.amazonaws.com", "userAgent": "q.amazonaws.com", "requestParameters": null, "responseElements": null, "requestID": "2d528c76-329e-410b-9516-EXAMPLE565dc", "eventID": "ba0801a1-87ec-4d26-be87-EXAMPLE75bbb", "readOnly": false, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "555555555555", "eventCategory": "Management" } Understanding Amazon Q Developer log file entries 457 Amazon Q Developer User Guide The following example shows a CloudTrail log entry that demonstrates Amazon Q calling the s3:ListBuckets action on your behalf. { "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Paulo", "accountId": "555555555555", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AIDA6ON6E4XEGIEXAMPLE", "arn": "arn:aws:iam::555555555555:user/Paulo", "accountId": "555555555555", "userName": "Paulo" }, "attributes": { "creationDate": "2024-04-10T14:06:08Z", "mfaAuthenticated": "false" } }, "invokedBy": "q.amazonaws.com" }, "eventTime": "2024-04-10T14:07:55Z", "eventSource": "s3.amazonaws.com", "eventName": "ListBuckets", "awsRegion": "us-east-1", "sourceIPAddress": "q.amazonaws.com", "userAgent": "q.amazonaws.com", "requestParameters": { "Host": "s3.amazonaws.com" }, "responseElements": null, "additionalEventData": { "SignatureVersion": "SigV4", "CipherSuite": "ECDHE-RSA-AES128-GCM-SHA256", "bytesTransferredIn": 0, "AuthenticationMethod": "AuthHeader", "x-amz-id-2": "ExampleRequestId123456789", "bytesTransferredOut": 4054 Understanding Amazon Q Developer log file entries 458 Amazon Q Developer }, "requestID": "ecd94349-b36f-44bf-b6f5-EXAMPLE9c463", "eventID": "2939ba50-1d26-4a5a-83bd-EXAMPLE85850", User Guide "readOnly": true, "eventType": "AwsApiCall", "managementEvent": true, "recipientAccountId": "555555555555", "vpcEndpointId": "vpce-EXAMPLE1234", "eventCategory": "Management" } Monitoring Amazon Q Developer with Amazon CloudWatch Note The metrics discussed here only pertain to using Amazon Q in your IDE. You can monitor Amazon Q Developer using CloudWatch, which collects raw data and processes it into readable, near real-time metrics. These statistics are kept for 15 months, so that you can access historical information and gain a better perspective on how Amazon Q is performing. You can also set alarms that watch for certain thresholds, and send notifications or take actions when those thresholds are met. For more information, see the Amazon CloudWatch User Guide. The Amazon Q Developer service reports the following metrics in the AWS/Q namespace. Dimension s Metric Count Invocations UserCount DailyActiveUserTrend SubscriptionCount Subscript ionUserCo unt With CloudWatch Use case or explanation You want to determine how many invocations have been counted over time. You want to determine the number of active users per day. You want to determine the number of users with paying subscriptions. 459 UniqueUse rCount Programmi ngLanguag e, Suggestio nState, Completio nType Programmi ngLanguag e, Suggestio nState, Completio nType Programmi ngLanguag e Programmi ngLanguag e Programmi ngLanguag e Amazon Q Developer Dimension s Metric MonthlyActiveUniqueUsers GeneratedLineCount Use case or explanation User Guide You want to determine the number of users who are active in a given month. You want to determine the number of lines generated by Amazon Q Developer. SuggestionReferenceCount You want to determine the number of recommendation triggers with references that have taken place. CodeScanCount You want to determine the number of code scans that have taken place. TotalCharacterCount CodeWhispererCharacterCount The number of characters in your file, including all suggestions from Amazon Q Developer. The number of characters generated by Amazon Q Developer. To aggregate Invocations, use the Sum statistic. To aggregate DailyActiveUserTrend, use the Sum statistic, and use "1 Day" as the period. With CloudWatch 460 Amazon Q Developer User Guide To aggregate SubscriptionCount, use the Sum statistic. To aggregate MonthlyActiveUniqueUsers use the Sum statistic, and use "30 Days" as the period. Identifying actions by specific users with Amazon CloudWatch Logs It's possible to get user-level metrics on your Amazon Q Developer usage. To figure out which user has taken a particular action, look for the events called SendTelemetryEvent, and examine the JSON object of type SendTelemetryEventRequest that they contain. Within that object, the schema appears as follows. Tip You can also output individual users' activity in Amazon Q Developer to a report in CSV format. For more information, see Viewing the activity of specific users in Amazon Q Developer. http://json-schema.org/draft-07/schema#", "definitions": { "ProgrammingLanguage": { "type": "object", "properties": { "languageName": { "type": "string", "enum": [ "python", "javascript", "java", "csharp", "typescript", "c", "cpp", "go", "kotlin", "php", "ruby", "rust", "scala", "shell", "sql", "json", Identifying actions by specific users 461 Amazon Q Developer User Guide "yaml", "vue", "tf", "tsx", "jsx", "plaintext" ], "description": "Programming Languages supported by Q" } } }, "Dimension": { "type": "object", "properties": { "name": { "type": "string", "description": "must match ^[-a-zA-Z0-9._]*$ and be between 1 and 255 characters" }, "value": { "type": "string", "description": "must match ^[-a-zA-Z0-9._]*$ and be between 1 and 1024 characters" } } } }, "telemetryEvents": { "UserTriggerDecisionEvent": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "UUID for the session" }, "requestId": { "type": "string", "description": "UUID for the request" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: |
amazonq-developer-ug-149 | amazonq-developer-ug.pdf | 149 | Q Developer User Guide "yaml", "vue", "tf", "tsx", "jsx", "plaintext" ], "description": "Programming Languages supported by Q" } } }, "Dimension": { "type": "object", "properties": { "name": { "type": "string", "description": "must match ^[-a-zA-Z0-9._]*$ and be between 1 and 255 characters" }, "value": { "type": "string", "description": "must match ^[-a-zA-Z0-9._]*$ and be between 1 and 1024 characters" } } } }, "telemetryEvents": { "UserTriggerDecisionEvent": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "UUID for the session" }, "requestId": { "type": "string", "description": "UUID for the request" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, Identifying actions by specific users 462 Amazon Q Developer User Guide "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "completionType": { "type": "string", "enum": [ "BLOCK", "LINE" ] }, "suggestionState": { "type": "string", "enum": [ "ACCEPT", "REJECT", "DISCARD", "EMPTY" ] }, "recommendationLatencyMilliseconds": { "type": "number" }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" }, "triggerToResponseLatencyMilliseconds": { "type": "number" }, "suggestionReferenceCount": { "type": "integer" }, "generatedLine": { "type": "integer" }, "numberOfRecommendations": { "type": "integer" } }, "required": [ "sessionId", "requestId", "programmingLanguage", "completionType", Identifying actions by specific users 463 Amazon Q Developer User Guide "suggestionState", "recommendationLatencyMilliseconds", "timestamp" ] }, "CodeCoverageEvent": { "type": "object", "properties": { "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "acceptedCharacterCount": { "type": "integer" }, "totalCharacterCount": { "type": "integer" }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" }, "unmodifiedAcceptedCharacterCount": { "type": "integer" } }, "required": [ "programmingLanguage", "acceptedCharacterCount", "totalCharacterCount", "timestamp" ] }, "UserModificationEvent": { "type": "object", "properties": { "sessionId": { "type": "string", "description": "UUID for the session" }, Identifying actions by specific users 464 Amazon Q Developer User Guide "requestId": { "type": "string", "description": "UUID for the request" }, "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "modificationPercentage": { "type": "number", "description": "This is the percentage of AI generated code which has been modified by the user" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" } }, "required": [ "sessionId", "requestId", "programmingLanguage", "modificationPercentage", "timestamp" ] }, "CodeScanEvent": { "type": "object", "properties": { "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "codeScanJobId": { "type": "string" }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" }, "codeAnalysisScope": { Identifying actions by specific users 465 Amazon Q Developer User Guide "type": "string", "enum": [ "FILE", "PROJECT" ] } }, "required": [ "programmingLanguage", "codeScanJobId", "timestamp" ] }, "CodeScanRemediationsEvent": { "type": "object", "properties": { "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "CodeScanRemediationsEventType": { "type": "string", "enum": [ "CODESCAN_ISSUE_HOVER", "CODESCAN_ISSUE_APPLY_FIX", "CODESCAN_ISSUE_VIEW_DETAILS" ] }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" }, "detectorId": { "type": "string" }, "findingId": { "type": "string" }, "ruleId": { "type": "string" }, "component": { "type": "string" }, "reason": { Identifying actions by specific users 466 Amazon Q Developer User Guide "type": "string" }, "result": { "type": "string" }, "includesFix": { "type": "boolean" } } }, "MetricData": { "type": "object", "properties": { "metricName": { "type": "string", "description": "must match pattern ^[-a-zA-Z0-9._]*$ and be between 1 and 1024 characters" }, "metricValue": { "type": "number" }, "timestamp": { "type": "string", "description": "datetime, example: Jul 23, 2024, 12:11:02 AM" }, "product": { "type": "string", "description": "must match pattern ^[-a-zA-Z0-9._]*$ and be between 1 and 128 characters" }, "dimensions": { "type": "array", "items": { "$ref": "#/definitions/Dimension" }, "description": "maximum size of 30" } }, "required": [ "metricName", "metricValue", "timestamp", "product" ] Identifying actions by specific users 467 Amazon Q Developer }, "ChatAddMessageEvent": { "type": "object", "properties": { "conversationId": { "type": "string", User Guide "description": "ID which represents a multi-turn conversation, length between 1 and 128" }, "messageId": { "type": "string", "description": "Unique identifier for the chat message" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, "userIntent": { "type": "string", "enum": [ "SUGGEST_ALTERNATE_IMPLEMENTATION", "APPLY_COMMON_BEST_PRACTICES", "IMPROVE_CODE", "SHOW_EXAMPLES", "CITE_SOURCES", "EXPLAIN_LINE_BY_LINE", "EXPLAIN_CODE_SELECTION", "GENERATE_CLOUDFORMATION_TEMPLATE" ] }, "hasCodeSnippet": { "type": "boolean" }, "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "activeEditorTotalCharacters": { "type": "integer" }, "timeToFirstChunkMilliseconds": { "type": "number" }, "timeBetweenChunks": { Identifying actions by specific users 468 Amazon Q Developer User Guide "type": "array", "items": { "type": "number" }, "description": "maximum size of 100" }, "fullResponselatency": { "type": "number" }, "requestLength": { "type": "integer" }, "responseLength": { "type": "integer" }, "numberOfCodeBlocks": { "type": "integer" }, "hasProjectLevelContext": { "type": "boolean" } }, "required": [ "conversationId", "messageId" ] }, "ChatInteractWithMessageEvent": { "type": "object", "properties": { "conversationId": { "type": "string", "description": "ID which represents a multi-turn conversation, length between 1 and 128" }, "messageId": { "type": "string", "description": "Unique identifier for the chat message" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, Identifying actions by specific users 469 Amazon Q Developer User |
amazonq-developer-ug-150 | amazonq-developer-ug.pdf | 150 | "type": "number" }, "description": "maximum size of 100" }, "fullResponselatency": { "type": "number" }, "requestLength": { "type": "integer" }, "responseLength": { "type": "integer" }, "numberOfCodeBlocks": { "type": "integer" }, "hasProjectLevelContext": { "type": "boolean" } }, "required": [ "conversationId", "messageId" ] }, "ChatInteractWithMessageEvent": { "type": "object", "properties": { "conversationId": { "type": "string", "description": "ID which represents a multi-turn conversation, length between 1 and 128" }, "messageId": { "type": "string", "description": "Unique identifier for the chat message" }, "customizationArn": { "type": "string", "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, Identifying actions by specific users 469 Amazon Q Developer User Guide "interactionType": { "type": "string", "enum": [ "INSERT_AT_CURSOR", "COPY_SNIPPET", "COPY", "CLICK_LINK", "CLICK_BODY_LINK", "CLICK_FOLLOW_UP", "HOVER_REFERENCE", "UPVOTE", "DOWNVOTE" ], "description": "Chat Message Interaction Type" }, "interactionTarget": { "type": "string", "description": "Target of message interaction" }, "acceptedCharacterCount": { "type": "integer" }, "acceptedLineCount": { "type": "integer" }, "acceptedSnippetHasReference": { "type": "boolean" }, "hasProjectLevelContext": { "type": "boolean" } }, "required": [ "conversationId", "messageId" ] }, "ChatUserModificationEvent": { "type": "object", "properties": { "conversationId": { "type": "string", "description": "ID which represents a multi-turn conversation, length between 1 and 128" Identifying actions by specific users 470 Amazon Q Developer }, "customizationArn": { "type": "string", User Guide "description": "ARN of the customization matching pattern: ^arn: [-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}$" }, "messageId": { "type": "string", "description": "Unique identifier for the chat message" }, "programmingLanguage": { "$ref": "#/definitions/ProgrammingLanguage" }, "modificationPercentage": { "type": "number", "description": "This is the percentage of AI generated code which has been modified by the user" }, "hasProjectLevelContext": { "type": "boolean" } }, "required": [ "conversationId", "messageId", "modificationPercentage" ] }, "SuggestionState": { "type": "string", "enum": [ "ACCEPT", "REJECT", "DISCARD", "EMPTY" ] }, "TerminalUserInteractionEvent": { "type": "object", "properties": { "terminalUserInteractionEventType": { "type": "string", "enum": [ "CODEWHISPERER_TERMINAL_TRANSLATION_ACTION", Identifying actions by specific users 471 Amazon Q Developer User Guide "CODEWHISPERER_TERMINAL_COMPLETION_INSERTED" ], "description": "Terminal User Interaction Event Type" }, "terminal": { "type": "string" }, "terminalVersion": { "type": "string" }, "shell": { "type": "string" }, "shellVersion": { "type": "string" }, "duration": { "type": "integer" }, "timeToSuggestion": { "type": "integer" }, "isCompletionAccepted": { "type": "boolean" }, "cliToolCommand": { "type": "string" } } }, "FeatureDevEvent": { "type": "object", "properties": { "conversationId": { "type": "string", "description": "ID which represents a multi-turn conversation, length between 1 and 128" } }, "required": [ "conversationId" ] } }, Identifying actions by specific users 472 Amazon Q Developer User Guide "SendTelemetryEventRequest": { "type": "object", "properties": { "clientToken": { "type": "string", "description": "The client's authentication token" }, "telemetryEvent": { "properties": { "oneOf": [ { "_comment": "This event is emitted when a user accepts or rejects an inline code suggestion", "$ref": "#/definitions/userTriggerDecisionEvent" }, { "_comment": "This event is emitted every five minutes. It details how much code is written by inline code suggestion and in total during that period", "$ref": "#/definitions/codeCoverageEvent" }, { "_comment": "This event is emitted when a code snippet from inline code suggestion has been edited by a user. It details the percentage of that code snippet modified by the user", "$ref": "#/definitions/userModificationEvent" }, { "_comment": "This field is emitted when a security scan is requested by a user", "$ref": "#/definitions/codeScanEvent" }, { "_comment": "This field is emitted when a security scan recommended remediation is accepted by a user", "$ref": "#/definitions/codeScanRemediationsEvent" }, { "_comment": "This event is deprecated but may still occur in telemetry. Do not use this.", "$ref": "#/definitions/metricData" }, { Identifying actions by specific users 473 Amazon Q Developer User Guide "_comment": "This event is emitted when Q adds an AI generated message to the chat window", "$ref": "#/definitions/chatAddMessageEvent" }, { "_comment": "This event is emitted when a user interacts with a chat message", "$ref": "#/definitions/chatInteractWithMessageEvent" }, { "_comment": "This event is emitted when a user modifies a code snippet sourced from chat. It gives a percentage of the code snippet which has been modified", "$ref": "#/definitions/chatUserModificationEvent" }, { "_comment": "This event is emitted when a user interacts with a terminal suggestion", "$ref": "#/definitions/terminalUserInteractionEvent" }, { "_comment": "This event is emitted when a user first prompts the /dev feature.", "$ref": "#/definitions/featureDevEvent" } ] } }, "optOutPreference": { "type": "string", "enum": [ "OPTIN", "OPTOUT" ], "description": "OPTOUT and telemetry is only provided to the account of purchasing enterprise, OPTIN and telemetry may also be used for product improvement" }, "userContext": { "type": "object", "properties": { "ideCategory": { "type": "string", "enum": [ "JETBRAINS", Identifying actions by specific users 474 Amazon Q Developer User Guide "VSCODE", "CLI", "JUPYTER_MD", "JUPYTER_SM" ] }, "operatingSystem": { "type": "string", "description": "The operating system being used" }, "product": { "type": "string", "description": "The name of the product being used" }, "clientId": { "type": "string", "description": "A UUID representing the individual client being used" }, "ideVersion": { "type": "string", "description": "The version of the Q plugin" } }, "required": [ "ideCategory", "operatingSystem", "product", "clientId", "ideVersion" ] }, "profileArn": { "type": "string", "description": "The arn of the Q Profile used |
amazonq-developer-ug-151 | amazonq-developer-ug.pdf | 151 | "type": "object", "properties": { "ideCategory": { "type": "string", "enum": [ "JETBRAINS", Identifying actions by specific users 474 Amazon Q Developer User Guide "VSCODE", "CLI", "JUPYTER_MD", "JUPYTER_SM" ] }, "operatingSystem": { "type": "string", "description": "The operating system being used" }, "product": { "type": "string", "description": "The name of the product being used" }, "clientId": { "type": "string", "description": "A UUID representing the individual client being used" }, "ideVersion": { "type": "string", "description": "The version of the Q plugin" } }, "required": [ "ideCategory", "operatingSystem", "product", "clientId", "ideVersion" ] }, "profileArn": { "type": "string", "description": "The arn of the Q Profile used to configure individual user accounts." Observe that a SendTelemetryEvent may contain one of a number of telemetry events. Each of these describes a specific interaction between the development environment. A more detailed description of each event appears below. Identifying actions by specific users 475 Amazon Q Developer UserTriggerDecisionEvent User Guide This event is triggered when a user interacts with a suggestion made by Amazon Q. It captures whether the suggestion was accepted, rejected, or modified, along with relevant metadata. • completionType: Whether the completion was a block or a line. • suggestionState: Whether the user accepted, rejected, or discarded the suggestion. CodeScanEvent This event is logged when a code scan is performed. It helps track the scope and result of the scan, providing insights into security and code quality checks. • codeScanJobId: The unique identifier for the code scan job. • codeAnalysisScope: Whether the scan was performed at the file level or the project level. • programmingLanguage: The language being scanned. CodeScanRemediationsEvent This event captures user interactions with Amazon Q’s remediation suggestions, such as applying fixes or viewing issue details. • CodeScanRemediationsEventType: The type of remediation action taken (e.g., viewing details or applying a fix). • includesFix: A boolean indicating whether the code issue includes a suggested fix. ChatAddMessageEvent This event is triggered when a new message is added to an ongoing chat conversation. It captures the user’s intent and any code snippets involved. • conversationId: The unique identifier for the conversation. • messageId: The unique identifier for the chat message. • userIntent: The user’s intent, such as improving code or explaining code. • programmingLanguage: The language related to the chat message. Identifying actions by specific users 476 Amazon Q Developer User Guide ChatInteractWithMessageEvent This event captures when users interact with chat messages, such as copying code snippets, clicking links, or hovering over references. • interactionType: The type of interaction (for example, copy, hover, click). • interactionTarget: The target of the interaction (for example, a code snippet or a link). • acceptedCharacterCount: The number of characters from the message that were accepted. • acceptedSnippetHasReference: A boolean indicating if the accepted snippet included a reference. TerminalUserInteractionEvent This event logs user interactions with terminal commands or completions in the terminal environment. • terminalUserInteractionEventType: The type of interaction (for example, terminal translation or code completion). • isCompletionAccepted: A boolean indicating whether the completion was accepted by the user. • duration: The time taken for the interaction. Accessing customization-related messages in Amazon CloudWatch Logs You can store information about the creation of your customization in Amazon CloudWatch Logs. You can authorize your Amazon Q Developer administrator to view those logs with the following permission set. To learn more about the permissions required to delivery logs to multiple resources, see Logging that requires additional permissions [V2] in the Amazon CloudWatch Logs User Guide. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLogDeliveryActions", Accessing customization-related logs 477 Amazon Q Developer User Guide "Effect": "Allow", "Action": [ "logs:PutDeliverySource", "logs:GetDeliverySource", "logs:DeleteDeliverySource", "logs:DescribeDeliverySources", "logs:PutDeliveryDestination", "logs:GetDeliveryDestination", "logs:DeleteDeliveryDestination", "logs:DescribeDeliveryDestinations", "logs:CreateDelivery", "logs:GetDelivery", "logs:DeleteDelivery", "logs:DescribeDeliveries", "firehose:ListDeliveryStreams", "firehose:DescribeDeliveryStream", "s3:ListAllMyBuckets", "s3:ListBucket", "s3:GetBucketLocation" ], "Resource": [ "arn:aws:logs:us-east-1:account number:log-group:*", "arn:aws:firehose:us-east-1:account number:deliverystream/*", "arn:aws:s3:::*" ] } ] } Viewing Amazon Q Developer user activity on the dashboard Available only for Amazon Q Developer administrators, the Amazon Q Developer dashboard summarizes useful data about how your Pro tier subscribers use the service. Viewing usage metrics (dashboard) 478 Amazon Q Developer User Guide Amazon Q generates and displays new metrics on an hourly basis for the most part. The only section that is not updated hourly is the Active users widget, which is updated daily according to the coordinated universal time (UTC) clock. The dashboard shows metrics collected from users who are subscribed in: • the AWS account that you're currently signed into and • member accounts, if you're signed in to a management account for which organization-wide visibility of subscriptions has been enabled. Viewing usage metrics (dashboard) 479 Amazon Q Developer Note User Guide The Active users widget only displays information from the account that you're currently signed into. To view and filter the dashboard 1. 2. 3. 4. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane, choose Dashboard. (Optional) Filter |
amazonq-developer-ug-152 | amazonq-developer-ug.pdf | 152 | clock. The dashboard shows metrics collected from users who are subscribed in: • the AWS account that you're currently signed into and • member accounts, if you're signed in to a management account for which organization-wide visibility of subscriptions has been enabled. Viewing usage metrics (dashboard) 479 Amazon Q Developer Note User Guide The Active users widget only displays information from the account that you're currently signed into. To view and filter the dashboard 1. 2. 3. 4. Sign in to the AWS Management Console. Switch to the Amazon Q Developer console. From the navigation pane, choose Dashboard. (Optional) Filter the information by date range, programming language, customization, or integrated development environment (IDE) vendor. Notes: • If the Dashboard link is not available in the navigation pane, see Troubleshooting the dashboard. • If you’d like to send user metrics to a daily report with a per-user breakdown of their Amazon Q Developer usage, see Viewing the activity of specific users in Amazon Q Developer. • For information about specific metrics, see Descriptions of Amazon Q Developer dashboard usage metrics or choose the help link ( at the top-right of the dashboard page. ) Descriptions of Amazon Q Developer dashboard usage metrics The following table describes the metrics shown in the Amazon Q Developer dashboard. For more information about the dashboard, see Viewing Amazon Q Developer user activity on the dashboard. Metric name Description Total subscriptions Shows the total subscriptions in the current AWS account, as well as subscriptions in Dashboard metrics 480 Amazon Q Developer Metric name Active subscriptions Pending subscriptions User Guide Description member accounts, if you're signed in to a management account for which organizat ion-wide visibility of subscriptions has been enabled. Shows the total active subscriptions in the current AWS account, as well as subscriptions in member accounts, if you're signed in to a management account for which organizat ion-wide visibility of subscriptions has been enabled. Active subscriptions are those belonging to users who have started using Amazon Q in their integrated development environme nt (IDE). You are being charged for these subscriptions. For more information about active subscriptions, see Amazon Q Developer subscription statuses. Shows the total pending subscriptions in the current AWS account, as well as subscriptions in member accounts, if you're signed in to a management account for which organizat ion-wide visibility of subscriptions has been enabled. Pending subscriptions are those belonging to users who have not yet started using Amazon Q in their IDE. You are not being charged for these subscriptions. For more information about pending subscriptions, see Amazon Q Developer subscription statuses. Dashboard metrics 481 Amazon Q Developer Metric name Accepted lines of code Active users Inline suggestions Inline chat Chat in the IDE – Total messages sent User Guide Description Shows a pie chart that indicates the lines of code accepted by users, broken down by Amazon Q feature (/dev, /doc, /test, and so on). Shows a line graph that indicates the number of subscribers who were actively using Amazon Q in the IDE during a specified date range. Shows the total number of suggestions and accepted suggestions for the inline suggestio ns feature. The percentage of accepted suggestions is calculated by taking the number of suggestions accepted by users, and dividing it by the total suggestions generated by Amazon Q. The total suggestions count includes suggestions that were accepted and actively rejected; it does not include suggestio ns that were dismissed because the user continued to type or started performing other operations in their IDE. Shows the total number of suggestions and number of accepted suggestions for the inline chat feature. The percentage of accepted suggestions is calculated by taking the number of suggestions accepted by users, and dividing it by the total suggestions generated by Amazon Q. Shows the total number of responses from Amazon Q in the Amazon Q chat window of the user's IDE. Dashboard metrics 482 Amazon Q Developer Metric name Description User Guide Feature development (/dev) – Acceptance rate Shows the acceptance rate for the Feature development (/dev) feature. The acceptanc Document generation (/doc) Unit test generation (/test) Code reviews (/review) e rate is calculated by taking the number of lines of code accepted by users, and dividing it by the total lines of code suggested by Amazon Q. Shows the total number of documenta tion files (such as READMEs and supporting files) created and updated by the Document generation (/doc) feature. The acceptance rates equal the number of file updates or creations accepted by users, divided by the total number of files updates or creations suggested by Amazon Q. Shows the total number of unit tests generated by the Unit test generation (/test) feature and the number of unit tests accepted by users. The acceptance rate is calculated by taking the number of |
amazonq-developer-ug-153 | amazonq-developer-ug.pdf | 153 | by users, and dividing it by the total lines of code suggested by Amazon Q. Shows the total number of documenta tion files (such as READMEs and supporting files) created and updated by the Document generation (/doc) feature. The acceptance rates equal the number of file updates or creations accepted by users, divided by the total number of files updates or creations suggested by Amazon Q. Shows the total number of unit tests generated by the Unit test generation (/test) feature and the number of unit tests accepted by users. The acceptance rate is calculated by taking the number of unit tests accepted by users, and dividing it by the total number of unit tests generated by Amazon Q. Shows the total number of code reviews and findings reports generated by the Code reviews (/review) feature. The Total code reviews (manual only) and Findings report (manual only) refer to the code reviews and finding reports that are not auto-generated. Dashboard metrics 483 Amazon Q Developer Metric name Code fixes Code transformation (/transform) User Guide Description Shows the total number of code fixes generated by Amazon Q. The acceptance rate is calculated by taking the number of code fixes accepted by users, and dividing it by the total number of code fixes suggested by Amazon Q. Shows the total number code transformations performed by the Transformation (/transfo rm) feature, and the number of lines of code processed. Disabling the Amazon Q Developer dashboard You might want to disable the Amazon Q Developer dashboard if you have concerns about data privacy, page load times, or other potential issues. When you disable the dashboard, the dashboard page (and any links to it) will no longer be available in the Amazon Q Developer console. For more information about the dashboard, see Viewing usage metrics (dashboard). To disable the dashboard 1. Open the Amazon Q Developer console: • If you set up Amazon Q Developer with an organization instance of AWS IAM Identity Center, then sign in using a management account or member account. • If you set up Amazon Q Developer with an account instance of IAM Identity Center, then sign in using the account associated with that instance. 2. Choose Settings, and in the Amazon Q Developer user activity section, choose Edit. 3. Disable Amazon Q Developer usage dashboard. Troubleshooting the Amazon Q Developer dashboard If the Amazon Q Developer dashboard page is not available, do the following: Disabling the dashboard 484 Amazon Q Developer User Guide • Verify your permissions. To view the dashboard, you need the following permissions: • q:ListDashboardMetrics • codewhisperer:ListProfiles • sso:ListInstances • user-subscriptions:ListUserSubscriptions • To see metrics generated before November 22, 2024, you also need: cloudwatch:GetMetricData and cloudwatch:ListMetrics For more information about permissions, see Allow administrators to use the Amazon Q Developer console. • Verify your settings. In the Amazon Q Developer console, choose Settings and make sure that the Amazon Q Developer usage dashboard toggle is enabled. For more information about the dashboard, see Viewing usage metrics (dashboard). Viewing the activity of specific users in Amazon Q Developer You can configure Amazon Q to collect user activity telemetry of individual Amazon Q Developer subscribers in your organization and present that information in a report. The report gives you insights into how specific users are using Amazon Q. Amazon Q generates the report every day at midnight, and saves it in a CSV file at the following path: s3://bucketName/prefix/AWSLogs/accountId/QDeveloperLogs/ by_user_analytic/region/year/month/day/utc- hour/accountId_by_user_analytic_timestamp_randomString.csv The CSV file is laid out as follows: • Each row shows a user who interacted with Amazon Q that day. • Each column shows a metric, as described in User activity report metrics. Metrics are calculated based on the user telemetry collected over the course of the day. If the CSV file surpasses 1 MB, Amazon Q splits the data into several CSV files for the day. Viewing per-user activity 485 Amazon Q Developer Note User Guide When you enable user activity reports, Amazon Q collects telemetry regardless of how a developer has set the Enable Amazon Q to send usage data to AWS setting in their IDE. That setting controls whether telemetry can be used by the AWS corporation, not your organization. For more information about this setting, see Opting out of sharing your client-side telemetry. Use the following instructions to enable user activity reports. Prerequisite Create an Amazon S3 bucket to hold the user activity report CSV file. The bucket must: • Be in the AWS Region where the Amazon Q Developer profile was installed. This profile was installed when you subscribed users to Amazon Q Developer Pro for the first time. For more information about this profile and the Regions where it's supported, see Amazon Q Developer profiles, and Supported Regions for the Q Developer console and Q Developer profile. • Be in |
amazonq-developer-ug-154 | amazonq-developer-ug.pdf | 154 | about this setting, see Opting out of sharing your client-side telemetry. Use the following instructions to enable user activity reports. Prerequisite Create an Amazon S3 bucket to hold the user activity report CSV file. The bucket must: • Be in the AWS Region where the Amazon Q Developer profile was installed. This profile was installed when you subscribed users to Amazon Q Developer Pro for the first time. For more information about this profile and the Regions where it's supported, see Amazon Q Developer profiles, and Supported Regions for the Q Developer console and Q Developer profile. • Be in the AWS account where users are subscribed. If users are subscribed in multiple AWS accounts, then you must create buckets in each of those accounts. Cross-account buckets are not supported. • (Optional but recommended) Be different from the bucket you might be using for prompt logging. • Include a prefix, also known as a subfolder, where Amazon Q will save the CSV file. The CSV file cannot be saved in the root of the bucket. • Have a bucket policy like the one that follows. Replace bucketName, region, accountId, and prefix with your own information. { "Version": "2012-10-17", "Statement": [ { "Sid": "QDeveloperLogsWrite", "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": [ Viewing per-user activity 486 Amazon Q Developer User Guide "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucketName/prefix/*" ], "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } } ] } If you're configuring SSE-KMS on the bucket, add the below policy on the KMS key: { "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": "kms:GenerateDataKey", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } } To learn about protecting the data in your Amazon S3 bucket, see Protecting data with encryption in the Amazon Simple Storage Service User Guide. To enable user activity reports 1. Open the Amazon Q Developer console. Viewing per-user activity 487 Amazon Q Developer User Guide To use the Amazon Q Developer console, you must have the permissions defined in Allow administrators to use the Amazon Q Developer console. 2. Choose Settings. 3. Under Q Developer user activity reports, choose Edit. 4. Toggle Collect granular metrics per user. 5. Under S3 location, enter the Amazon S3 URI that you will use to hold the CSV reports. Example: s3://amzn-s3-demo-bucket/user-activity-reports/ User activity report metrics The following table describes the metrics that are included in the user activity reports generated by Amazon Q Developer. For more information about these reports, see Viewing the activity of specific users in Amazon Q Developer. Metric name Chat_AICodeLines Chat_MessagesInteracted Chat_MessagesSent Description Lines of code suggested by Amazon Q and accepted by the user. This metric includes code that was generated through the Amazon Q chat (not inline chat) and inserted into the IDE. Number of chat messages where the user has interacted positively with Amazon Q. Examples of positive interactions: clicking a link, inserting a suggestion, and upvoting a response from Amazon Q. This metric includes messages that were generated by Amazon Q chat (not inline chat). Number of messages sent to and from Amazon Q. This metric includes the user prompts and Amazon Q responses in the Amazon Q chat (not inline chat). User activity report metrics 488 Amazon Q Developer Metric name CodeFix_AcceptanceEventCount CodeFix_AcceptedLines CodeFix_GeneratedLines CodeFix_GenerationEventCount CodeReview_FailedEventCount CodeReview_FindingsCount CodeReview_SucceededEventCount Dev_AcceptanceEventCount User Guide Description Number of code fixes suggested by Amazon Q and accepted by the user. This metric applies to code fixes generated through the /review command. Lines of code suggested by Amazon Q and accepted by the user. This metric applies to lines of code generated through the /review command. Lines of code suggested by Amazon Q. This metric applies to lines of code generated through the /review command. Number of code fixes suggested by Amazon Q. This metric applies to code fixes generated through the /review command. Number of code issues that were found but for which Amazon Q could not suggest a code fix. This metric applies to code issues generated using the /review command. Number of code issues found by Amazon Q. This metric applies to code issues found using the /review command. Number of code issues that were found and for which Amazon Q was able to generate a suggested code fix. This metric applies to code issues found using the /review command. Number of code features suggested by Amazon Q and accepted by the user. This metric applies to code features generated through the /dev command. User activity report metrics 489 Amazon Q Developer Metric name Dev_AcceptedLines Dev_GeneratedLines Dev_GenerationEventCount DocGeneration_AcceptedFileUpdates DocGeneration_AcceptedFilesCreations DocGeneration_AcceptedLineAdditions DocGeneration_AcceptedLineUpdates DocGeneration_EventCount User Guide Description Lines of code suggested by Amazon Q and accepted by the user. This metric applies to lines of code generated through the /dev command. Lines of code suggested by |
amazonq-developer-ug-155 | amazonq-developer-ug.pdf | 155 | were found and for which Amazon Q was able to generate a suggested code fix. This metric applies to code issues found using the /review command. Number of code features suggested by Amazon Q and accepted by the user. This metric applies to code features generated through the /dev command. User activity report metrics 489 Amazon Q Developer Metric name Dev_AcceptedLines Dev_GeneratedLines Dev_GenerationEventCount DocGeneration_AcceptedFileUpdates DocGeneration_AcceptedFilesCreations DocGeneration_AcceptedLineAdditions DocGeneration_AcceptedLineUpdates DocGeneration_EventCount User Guide Description Lines of code suggested by Amazon Q and accepted by the user. This metric applies to lines of code generated through the /dev command. Lines of code suggested by Amazon Q. This metric applies to lines of code generated through the /dev command. Number of code features suggested by Amazon Q. This metric applies to code features generated through the /dev command. Number of file updates suggested by Amazon Q and accepted by the user. This metric applies to file updates generated through the /doc command. Number of file creations suggested by Amazon Q and accepted by the user. This metric applies to file creations generated through the /doc command. Lines of documentation additions suggested by Amazon Q and accepted by the user. This metric applies to documentation generated through the /doc command. Lines of documentation updates suggested by Amazon Q and accepted by the user. This metric applies to documentation generated using the /doc command. Number of times the user engaged with Amazon Q using the /doc command. User activity report metrics 490 Amazon Q Developer Metric name DocGeneration_RejectedFileCreations DocGeneration_RejectedFileUpdates DocGeneration_RejectedLineAdditions DocGeneration_RejectedLineUpdates InlineChat_AcceptedLineAdditions InlineChat_AcceptedLineDeletions InlineChat_EventCount User Guide Description Number of file creations suggested by Amazon Q and rejected by the user. This metric applies to file creations generated through the /doc command. Number of file updates suggested by Amazon Q and rejected by the user. This metric applies to file updates generated through the /doc command. Lines of documentation additions suggested by Amazon Q and rejected by the user. This metric applies to documentation generated through the /doc command. Lines of documentation updates suggested by Amazon Q and rejected by the user. This metric applies to documentation generated using the /doc command. Lines of code additions suggested by Amazon Q and accepted by the user. This metric includes code additions generated through the inline chat (not Amazon Q chat). Lines of code deletions suggested by Amazon Q and accepted by the user. This metric includes code deletions suggested through the inline chat (not Amazon Q chat). Number of inline chat (not Amazon Q chat) sessions that the user engaged in. User activity report metrics 491 Amazon Q Developer Metric name InlineChat_RejectedLineAdditions InlineChat_RejectedLineDeletions Inline_AICodeLines Inline_AcceptanceCount Inline_SuggestionsCount TestGeneration_AcceptedLines TestGeneration_AcceptedTests TestGeneration_EventCount TestGeneration_GeneratedLines User Guide Description Lines of code additions suggested by Amazon Q and rejected by the user. This metric includes code additions generated through the inline chat (not Amazon Q chat). Lines of code deletions suggested by Amazon Q and rejected by the user. This metric includes code deletions suggested through the inline chat (not Amazon Q chat). Lines of code suggested by Amazon Q and accepted by the user. This metric includes code that was accepted as inline suggestions. Number of inline suggestions accepted by the user. Number of inline suggestions displayed to the user. Lines of code suggested by Amazon Q and accepted by the user. This metric applies to lines of code generated through the /test command. Number of unit tests suggested by Amazon Q and accepted by the user. This metric applies to unit tests generated through the /test command. Number of times the user engaged with Amazon Q through the /test command. Lines of code suggested by Amazon Q. This metric applies to lines of code generated through the /test command. User activity report metrics 492 Amazon Q Developer Metric name TestGeneration_GeneratedTests Transformation_EventCount Transformation_LinesGenerated Transformation_LinesIngested User Guide Description Number of unit tests suggested by Amazon Q. This metric applies to unit tests generated through the /test command. Number of times the user engaged with Amazon Q through the /transform command, excluding the times when the when the user transformed code on the command line. Lines of code suggested by Amazon Q. This metric applies to code generated through the /transform command, excluding code transformed on the command line. Lines of code provided to Amazon Q for transformation. This metric applies to code that is provided through the /transform command, excluding code provided for transformation on the command line, or for an SQL conversion. Logging users' prompts in Amazon Q Developer Administrators can enable the logging of all inline suggestions and chat conversations that users have with Amazon Q in their integrated development environment (IDE). These logs can help with auditing, debugging, analytics, and ensuring compliance. When developers use inline suggestions, Amazon Q will log the accepted and actively rejected suggestions. When developers chat with Amazon |
amazonq-developer-ug-156 | amazonq-developer-ug.pdf | 156 | the command line. Lines of code provided to Amazon Q for transformation. This metric applies to code that is provided through the /transform command, excluding code provided for transformation on the command line, or for an SQL conversion. Logging users' prompts in Amazon Q Developer Administrators can enable the logging of all inline suggestions and chat conversations that users have with Amazon Q in their integrated development environment (IDE). These logs can help with auditing, debugging, analytics, and ensuring compliance. When developers use inline suggestions, Amazon Q will log the accepted and actively rejected suggestions. When developers chat with Amazon Q, Amazon Q will log both the developers' prompts and Amazon Q's responses. When developers chat with the Amazon Q Agent for software development using the /dev command, only the prompts will be logged. Amazon Q stores the logs in an Amazon S3 bucket that you create, at the following path: bucketName/prefix/AWSLogs/accountId/QDeveloperLogs/log- type/region/year/month/day/utc-hour/zipFile.gz/logFile.json Logging users' prompts 493 Amazon Q Developer User Guide At the previous path, log-type is one of the following: • GenerateAssistantResponse — holds chat logs • GenerateCompletions — holds inline completion logs • StartTaskAssistCodeGeneration — holds /dev logs For examples and explanations of log file contents, see Prompt log examples in Amazon Q Developer. Use the following instructions to enable prompt logging. Prerequisite Create an Amazon S3 bucket to hold the prompt logs. The bucket must: • Be in the AWS Region where the Amazon Q Developer profile was installed. This profile was installed when you subscribed users to Amazon Q Developer Pro for the first time. For more information about this profile and the Regions where it's supported, see Amazon Q Developer profiles, and Supported Regions for the Q Developer console and Q Developer profile. • Be in the AWS account where users are subscribed. If users are subscribed in multiple AWS accounts, then you must create a bucket in each account. Cross-account buckets are not supported. • Have a bucket policy like the one that follows. Replace bucketName, region, accountId, and prefix with your own information. { "Version": "2012-10-17", "Statement": [ { "Sid": "QDeveloperLogsWrite", "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": [ "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucketName/prefix/*" ], Logging users' prompts 494 Amazon Q Developer User Guide "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } } ] } If you're configuring SSE-KMS on the bucket, add the following policy on the KMS key: { "Effect": "Allow", "Principal": { "Service": "q.amazonaws.com" }, "Action": "kms:GenerateDataKey", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "accountId" }, "ArnLike": { "aws:SourceArn": "arn:aws:codewhisperer:region:accountId:*" } } } To learn about protecting the data in your Amazon S3 bucket, see Protecting data with encryption in the Amazon Simple Storage Service User Guide. To enable prompt logging 1. Open the Amazon Q Developer console. To use the Amazon Q Developer console, you must have the permissions defined in Allow administrators to use the Amazon Q Developer console. Logging users' prompts 495 Amazon Q Developer Note User Guide You must sign in as a standalone account administrator, or management account administrator. Member account administrators cannot enable prompt logging. 2. Choose Settings. 3. Under Preferences, choose Edit. 4. In the Edit preferences window, toggle Q Developer prompt logging. 5. Under Amazon S3 location, enter the Amazon S3 URI that you will use to receive the logs. Example: s3://amzn-s3-demo-bucket/qdev-prompt-logs/ Prompt log examples in Amazon Q Developer This section provides examples of prompt logs generated by Amazon Q Developer. Following each example is a table that describes the log file's fields. For more information about prompt logs, see Logging users' prompts in Amazon Q Developer. Topics • Inline suggestions log example • Chat log example • /dev log example Inline suggestions log example The following example shows a log file that is generated when a user accepts an inline suggestion. { "records": [ { "generateCompletionsEventRequest": { "leftContext": "import * cdk from 'aws-cdk-lib';\r\nimport * s3 from 'aws-cdk-lib/aws-s3';\r\nimport { Stack, StackProps } from 'constructs';\r \nexport class MyStack extends Stack {\r\n constructor(scope: cdk.App, id: string, props?: StackProps) {\r\n super(scope, id, props);\r\n\r\n new s3.Bucket(this, 'XXXXXXXX', {\r\n versioned: true\r\n });\r\n }\r\n ", Prompt log examples 496 Amazon Q Developer User Guide "rightContext": "", "fileName": "cdk-modified.ts", "customizationArn": null, "userId": "d-92675051d5.b8f1f340-9081-70ad-5fc5-0f37151937a6", "timeStamp": "2025-01-06T15:09:16.412719Z" }, "generateCompletionsEventResponse": { "completions": ["synth() {\n return cdk.App.prototype.synth.apply(this, arguments);\n }"], "requestId": "797c70ee-abc9-4cc7-a148-b9df17f6ce48" } } ] } The following table describes the fields in the log file for inline suggestions. Field name records generateCompletionsEventRequest leftContext rightContext fileName customizationArn Description Top-level field that contains a set of inline suggestions, also known as inline completions. Describes the request for an inline code suggestion. The request is made by Amazon Q, on behalf of the user. Indicates the code before the cursor that Amazon Q is using for context to generate an inline suggestion. Indicates the code after the cursor that |
amazonq-developer-ug-157 | amazonq-developer-ug.pdf | 157 | "d-92675051d5.b8f1f340-9081-70ad-5fc5-0f37151937a6", "timeStamp": "2025-01-06T15:09:16.412719Z" }, "generateCompletionsEventResponse": { "completions": ["synth() {\n return cdk.App.prototype.synth.apply(this, arguments);\n }"], "requestId": "797c70ee-abc9-4cc7-a148-b9df17f6ce48" } } ] } The following table describes the fields in the log file for inline suggestions. Field name records generateCompletionsEventRequest leftContext rightContext fileName customizationArn Description Top-level field that contains a set of inline suggestions, also known as inline completions. Describes the request for an inline code suggestion. The request is made by Amazon Q, on behalf of the user. Indicates the code before the cursor that Amazon Q is using for context to generate an inline suggestion. Indicates the code after the cursor that Amazon Q is using for context to generate an inline suggestion. Indicates the name of the file in which an inline suggestion was requested. Indicates the Amazon Resource Name (ARN) of the customization applied to inline suggestio ns. In this example, there is no customization. Prompt log examples 497 Amazon Q Developer Field name userId timeStamp generateCompletionsEventResponse completions requestId Chat log example User Guide Description For more information about customizations, see Customizing suggestions. Indicates the user ID of the user who requested an inline suggestion. Indicates the date and time that the inline suggestion was requested. The timestamp is in Coordinated Universal Time (UTC). Describes the inline suggestion generated by Amazon Q. Indicates the inline suggestion that Amazon Q provided and that the user accepted. The ID of the inline request that uniquely identifies the event. The following example shows a log file that is generated when a user chats using Amazon Q in their IDE. { "records": [ { "generateAssistantResponseEventRequest": { "prompt": "Can you explain how to set up object-level access control in an S3 bucket using AWS CDK?", "chatTriggerType": "MANUAL", "customizationArn": null, "userId": "d-92675051d5.b8f1f340-9081-70ad-5fc5-0f37151937a6", "timeStamp": "2025-01-06T15:05:56.313070Z" }, "generateAssistantResponseEventResponse": { "assistantResponse": "I'll explain how to set up object-level access control for an S3 bucket using AWS CDK. Here's how you can implement different access control configurations: [[1]](https://docs.aws.amazon.com/AmazonS3/latest/ Prompt log examples 498 Amazon Q Developer User Guide API/s3_example_s3_Scenario_ManageACLs_section.html)\n\n1. Using Bucket Owner Enforced (Recommended Modern Approach):\n```typescript\nimport * as cdk from 'aws-cdk-lib'; \nimport * as s3 from 'aws-cdk-lib/aws-s3';\n\nnew s3.Bucket(this, 'XXXXXXXX', {\n objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED,\n blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL\n});\n```\n\n2. Using Public Access Block Configuration:\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\n\nnew s3.Bucket(this, 'XXXXXXXX', {\n blockPublicAccess: new s3.BlockPublicAccess({\n blockPublicAcls: true,\n blockPublicPolicy: true,\n ignorePublicAcls: true,\n restrictPublicBuckets: true\n })\n});\n``` \n\n3. Setting Access Control for Specific Use Cases:\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\nconst bucket = new s3.Bucket(this, 'XXXXXXXX', {\n // Enable versioning for object-level recovery\n versioned: true,\n \n // Enforce encryption\n encryption: s3.BucketEncryption.S3_MANAGED,\n \n // Block all public access\n blockPublicAccess: s3.BlockPublicAccess.BLOCK_ALL,\n \n // Enforce object ownership\n objectOwnership: s3.ObjectOwnership.BUCKET_OWNER_ENFORCED, \n \n // Enable server access logs\n serverAccessLogsPrefix: 'logs/'\n});\n \n// Grant read access to specific IAM role\nconst role = new iam.Role(this, 'MyRole', {\n assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'), \n});\nbucket.grantRead(role);\n\n// Grant write access to specific objects with prefix\nbucket.addToResourcePolicy(new iam.PolicyStatement({\n actions: ['s3:PutObject'],\n resources: [bucket.arnForObjects('uploads/*')],\n principals: [new iam.AccountRootPrincipal()]\n}));\n```\n\n4. Setting up Lifecycle Rules for Objects:\n```typescript\nimport * as cdk from 'aws-cdk-lib';\nimport * as s3 from 'aws-cdk-lib/aws-s3';\n\nnew s3.Bucket(this, 'XXXXXXXX', {\n lifecycle: [\n {\n transitions: [\n {\n storageClass: s3.StorageClass.INFREQUENT_ACCESS,\n transitionAfter: cdk.Duration.days(30)\n },\n {\n storageClass: s3.StorageClass.GLACIER,\n transitionAfter: cdk.Duration.days(90)\n }\n ],\n expiration: cdk.Duration.days(365)\n }\n ]\n});\n```\n\nKey points to remember:\n- Always use the principle of least privilege\n- Block public access by default unless explicitly required\n- Use BUCKET_OWNER_ENFORCED for object ownership when possible\n- Consider implementing lifecycle rules for cost optimization\n- Use versioning for sensitive data\n- Implement server-side encryption\n- Use resource policies and IAM roles for access control instead of ACLs\n- Monitor access patterns using server access logging\n\nThese configurations help create a secure and well-managed S3 bucket with appropriate access controls at both bucket and object levels.", "followupPrompts": "How can you implement multi-factor authentication for S3 bucket access using AWS CDK?What are the best practices for setting up object- level versioning in AWS S3 using CDK?How can you use AWS CDK to create a custom error message for unauthorized access attempts on an S3 bucket?", "messageMetadata": { "conversationId": "491bd3cd-d70d-40c0-a452-5ef3f0878422", "utteranceId": null Prompt log examples 499 Amazon Q Developer }, "codeReferenceEvents": [], "supplementaryWebLinksEvent": [ { User Guide "uri": "https://docs.aws.amazon.com/AmazonS3/latest/API/ s3_example_s3_Scenario_ManageACLs_section.html", "title": "[1] Manage access control lists (ACLs) for Amazon S3 buckets using an AWS SDK - Amazon Simple Storage Service", "snippet": "The following code example shows how to manage access control lists (ACLs) for Amazon S3 buckets.\n\n.NET\n\n**AWS SDK for .NET** \n\n```\n using System;\n using System.Collections.Generic;\n using System.Threading.Tasks;\n using Amazon.S3;\n using Amazon.S3.Model;\n\n /// <summary>\n /// This example shows how to manage Amazon Simple Storage Service\n /// (Amazon S3) access control lists (ACLs) to control Amazon S3 bucket\n /// access.\n /// </summary>\n public class ManageACLs\n {\n public static async Task Main()\n {\n string bucketName = \"amzn-s3-demo-bucket1\";\n string newBucketName = \"amzn-s3-demo- bucket2\";\n string keyName = \"sample-object.txt\";\n string emailAddress = \"someone@example.com\";\n\n // If the AWS Region where your bucket is located is different from\n // the Region defined for |
amazonq-developer-ug-158 | amazonq-developer-ug.pdf | 158 | shows how to manage access control lists (ACLs) for Amazon S3 buckets.\n\n.NET\n\n**AWS SDK for .NET** \n\n```\n using System;\n using System.Collections.Generic;\n using System.Threading.Tasks;\n using Amazon.S3;\n using Amazon.S3.Model;\n\n /// <summary>\n /// This example shows how to manage Amazon Simple Storage Service\n /// (Amazon S3) access control lists (ACLs) to control Amazon S3 bucket\n /// access.\n /// </summary>\n public class ManageACLs\n {\n public static async Task Main()\n {\n string bucketName = \"amzn-s3-demo-bucket1\";\n string newBucketName = \"amzn-s3-demo- bucket2\";\n string keyName = \"sample-object.txt\";\n string emailAddress = \"someone@example.com\";\n\n // If the AWS Region where your bucket is located is different from\n // the Region defined for the default user, pass the Amazon S3 bucket's\n // name to the client constructor. It should look like this:\n // RegionEndpoint bucketRegion = RegionEndpoint.USEast1;\n IAmazonS3 client = new AmazonS3Client();\n\n await TestBucketObjectACLsAsync(client, bucketName, newBucketName, keyName, emailAddress);\n }\n\n /// <summary>\n /// Creates a new Amazon S3 bucket with a canned ACL, then retrieves the ACL\n /// information and then adds a new ACL to one of the objects in the\n /// Amazon S3 bucket.\n /// </summary>\n /// <param name=\"client\">The initialized Amazon S3 client object used to call\n /// methods to create a bucket, get an ACL, and add a different ACL to\n /// one of the objects.</param>\n /// <param name= \"bucketName\">A string representing the original Amazon S3\n /// bucket name.</ param>\n /// <param name=\"newBucketName\">A string representing the name of the\n /// new bucket that will be created.</param>\n /// <param name= \"keyName\">A string representing the key name of an Amazon S3\n /// object for which we will change the ACL.</param>\n /// <param name=\"emailAddress\">A string representing the email address\n /// belonging to the person to whom access to the Amazon S3 bucket will be\n /// granted.</param>\n public static async Task TestBucketObjectACLsAsync(\n IAmazonS3 client,\n string bucketName,\n string newBucketName,\n string keyName, \n string emailAddress)\n {\n try\n {\n // Create a new Amazon S3 bucket and specify canned ACL.\n var success = await CreateBucketWithCannedACLAsync(client, newBucketName);\n\n // Get the ACL on a bucket.\n await GetBucketACLAsync(client, bucketName);\n\n // Add (replace) the ACL on an object in a Prompt log examples 500 Amazon Q Developer User Guide bucket.\n await AddACLToExistingObjectAsync(client, bucketName, keyName, emailAddress);\n }\n catch (AmazonS3Exception amazonS3Exception)\n {\n Console.WriteLine($\"Exception: {amazonS3Exception.Message}\");\n }\n }\n\n /// <summary>\n /// Creates a new Amazon S3 bucket with a canned ACL attached.\n /// </summary>\n /// <param name=\"client\">The initialized client object used to call\n /// PutBucketAsync.</param>\n /// <param name=\"newBucketName\">A string representing the name of the\n /// new Amazon S3 bucket.</param>\n /// <returns>Returns a boolean value indicating success or failure.</returns>\n public static async Task<bool> CreateBucketWithCannedACLAsync(IAmazonS3 client, string newBucketName)\n {\n var request = new PutBucketRequest()\n {\n BucketName = newBucketName,\n BucketRegion = S3Region.EUWest1,\n\n // Add a canned ACL.\n CannedACL = S3CannedACL.LogDeliveryWrite,\n };\n\n var response = await client.PutBucketAsync(request);\n return response.HttpStatusCode == System.Net.HttpStatusCode.OK;\n }\n\n\n /// <summary>\n /// Retrieves the ACL associated with the Amazon S3 bucket name in the\n /// bucketName parameter.\n /// </summary>\n /// <param name= \"client\">The initialized client object used to call\n /// PutBucketAsync.</ param>\n /// <param name=\"bucketName\">The Amazon S3 bucket for which we want to get the\n /// ACL list.</param>\n /// <returns>Returns an S3AccessControlList returned from the call to\n /// GetACLAsync.</returns> \n public static async Task<S3AccessControlList> GetBucketACLAsync(IAmazonS3 client, string bucketName)\n {\n GetACLResponse response = await client.GetACLAsync(new GetACLRequest\n {\n BucketName = bucketName,\n });\n\n return response.AccessControlList;\n }\n\n\n\n /// <summary>\n /// Adds a new ACL to an existing object in the Amazon S3 bucket.\n /// </summary>\n /// <param name=\"client \">The initialized client object used to call\n /// PutBucketAsync.</param>\n /// <param name=\"bucketName\">A string representing the name of the Amazon S3\n /// bucket containing the object to which we want to apply a new ACL.</ param>\n /// <param name=\"keyName\">A string representing the name of the object\n /// to which we want to apply the new ACL.</param>\n /// <param name=\"emailAddress\">The email address of the person to whom\n /// we will be applying to whom access will be granted.</param>\n public static async Task AddACLToExistingObjectAsync(IAmazonS3 client, string bucketName, string keyName, string emailAddress)\n {\n // Retrieve the ACL for an object.\n GetACLResponse aclResponse = await client.GetACLAsync(new GetACLRequest\n {\n BucketName = bucketName,\n Key = keyName,\n });\n\n S3AccessControlList acl = aclResponse.AccessControlList; \n\n // Retrieve the owner.\n Owner owner = acl.Owner;\n\n // Clear existing grants.\n acl.Grants.Clear();\n\n // Add a grant to reset the owner's full permission\n // (the previous clear statement removed all permissions).\n var fullControlGrant = new Prompt log examples 501 Amazon Q Developer User Guide S3Grant\n {\n Grantee = new S3Grantee { CanonicalUser = acl.Owner.Id },\n };\n acl.AddGrant(fullControlGrant.Grantee, S3Permission.FULL_CONTROL);\n\n // Specify email to identify grantee for granting permissions.\n var grantUsingEmail = new S3Grant\n {\n Grantee = new S3Grantee { EmailAddress = emailAddress },\n Permission = S3Permission.WRITE_ACP,\n };\n\n // Specify log delivery group as grantee.\n var grantLogDeliveryGroup = new S3Grant\n {\n Grantee = new S3Grantee { URI = \"http://acs.amazonaws.com/groups/s3/LogDelivery\" },\n Permission = S3Permission.WRITE,\n };\n\n // Create a new ACL.\n var newAcl = new S3AccessControlList\n {\n Grants = new List<S3Grant> { |
amazonq-developer-ug-159 | amazonq-developer-ug.pdf | 159 | removed all permissions).\n var fullControlGrant = new Prompt log examples 501 Amazon Q Developer User Guide S3Grant\n {\n Grantee = new S3Grantee { CanonicalUser = acl.Owner.Id },\n };\n acl.AddGrant(fullControlGrant.Grantee, S3Permission.FULL_CONTROL);\n\n // Specify email to identify grantee for granting permissions.\n var grantUsingEmail = new S3Grant\n {\n Grantee = new S3Grantee { EmailAddress = emailAddress },\n Permission = S3Permission.WRITE_ACP,\n };\n\n // Specify log delivery group as grantee.\n var grantLogDeliveryGroup = new S3Grant\n {\n Grantee = new S3Grantee { URI = \"http://acs.amazonaws.com/groups/s3/LogDelivery\" },\n Permission = S3Permission.WRITE,\n };\n\n // Create a new ACL.\n var newAcl = new S3AccessControlList\n {\n Grants = new List<S3Grant> { grantUsingEmail, grantLogDeliveryGroup },\n Owner = owner,\n };\n\n // Set the new ACL. We're throwing away the response here.\n _ = await client.PutACLAsync(new PutACLRequest\n {\n BucketName = bucketName,\n Key = keyName,\n AccessControlList = newAcl,\n });\n }\n\n }\n\n\n```\n\n* For API details, see the following topics in _AWS SDK for .NET API Reference_.\n \n * GetBucketAcl\n\n* GetObjectAcl\n\n* PutBucketAcl\n\n* PutObjectAcl\n\nFor a complete list of AWS SDK developer guides and code examples, see Developing with Amazon S3 using the AWS SDKs. This topic also includes information about getting started and details about previous SDK versions.\n" } ], "requestId": "dad38fc0-815c-45f7-970a-db916cb7f131" } } ] } Field name records generateAssistantResponseEv entRequest prompt chatTriggerType Description Top-level field that contains a set of prompts and responses. Describes the prompt entered by the user in the chat window in their IDE. Indicates the prompt the user entered into the chat window. MANUAL indicates that the user entered a prompt into the chat window, or clicked Prompt log examples 502 Amazon Q Developer Field name customizationArn userId timeStamp User Guide Description on one of the suggested questions in the chat window. INLINE_CHAT indicates that the user entered a prompt into the small input screen in the main coding window. For more information about chatting inline, see Chatting inline with Amazon Q Developer. Indicates the Amazon Resource Name (ARN) of the customization applied to the chat. In this example, there is no customization. For more information about customizations, see Customizing suggestions. Indicates the user ID of the user who entered the prompt. Indicates the date and time that the user entered the prompt. The timestamp is in universal time (UTC). generateAssistantResponseEv entResponse Describes the response generated by Amazon Q. assistantResponse followupPrompts messageMetadata conversationId Indicates the response that Amazon Q provided to the user's prompt. Indicates the follow-up example prompts that were displayed to the user at the end of the response. Describes metadata associated with the response. Indicates the conversation ID of the response. The conversation ID groups together messages in a chat session. Prompt log examples 503 Amazon Q Developer Field name utteranceId codeReferenceEvents supplementaryWebLinksEvent requestId /dev log example User Guide Description Indicates the utterance ID of the response. An utterance ID is a label that distinguishes one prompt from another within a dialogue or data set. Describes links to code references included in the response. Indicates the links that were displayed to the user at the end of the response. The ID of the response that uniquely identifies the event. The following example shows a log file that is generated with a user enters a /dev command in the Amazon Q chat in their IDE. { "records": [ { "startTaskAssistCodeGenerationEventRequest": { "prompt": "write a python application that prints 'hello world!' text to the screen and format it in red bold text", "chatTriggerType": "MANUAL", "conversationId": "da1c95b6-84e1-46a2-9ef9-fe92f5ee169e", "customizationArn": null, "userId": "d-92675051d5.b8f1f340-9081-70ad-5fc5-0f37151937a6", "timeStamp": "2025-01-13T15:40:27.808027101Z" }, "startTaskAssistCodeGenerationEventResponse": { "requestId": "e504f126-7197-4e3c-a046-1a10d5a3f3e0" } } ] } Prompt log examples 504 Amazon Q Developer Field name records User Guide Description Top-level field that contains a set of prompts and responses. startTaskAssistCodeGenerati onEventRequest Describes the /dev prompt entered by the user in the chat window in their IDE. prompt chatTriggerType conversationId customizationArn userId timeStamp Indicates the /dev prompt the user entered into the chat window. MANUAL indicates that the user entered a prompt into the chat window, or clicked on one of the suggested questions in the chat window. INLINE_CHAT indicates that the user entered a prompt into the small input screen in the main coding window. For more information about chatting inline, see Chatting inline with Amazon Q Developer. Indicates the conversation ID of the response. The conversation ID groups together messages in a chat session. Indicates the Amazon Resource Name (ARN) of the customization applied to the chat. In this example, there is no customization. For more information about customizations, see Customizing suggestions. Indicates the user ID of the user who entered the prompt. Indicates the date and time that the user entered the prompt. The timestamp is in universal time (UTC). startTaskAssistCodeGenerati onEventResponse Describes the response generated by Amazon Q. Currently, recording the responses to /dev Prompt log examples 505 Amazon Q Developer Field name assistantResponse requestId User Guide Description commands is not supported, so the |
amazonq-developer-ug-160 | amazonq-developer-ug.pdf | 160 | ID groups together messages in a chat session. Indicates the Amazon Resource Name (ARN) of the customization applied to the chat. In this example, there is no customization. For more information about customizations, see Customizing suggestions. Indicates the user ID of the user who entered the prompt. Indicates the date and time that the user entered the prompt. The timestamp is in universal time (UTC). startTaskAssistCodeGenerati onEventResponse Describes the response generated by Amazon Q. Currently, recording the responses to /dev Prompt log examples 505 Amazon Q Developer Field name assistantResponse requestId User Guide Description commands is not supported, so the field won't include a response. Indicates the response that Amazon Q provided to the user's prompt. The ID of the response that uniquely identifies the event. Prompt log examples 506 Amazon Q Developer User Guide Supported Regions for Amazon Q Developer Note If you make a request that requires Amazon Q Developer to retrieve information from an opt-in Region not listed on this page, Amazon Q can make calls to that Region. To manage access to Regions Amazon Q can make calls to, see Allow Amazon Q permission to perform actions on your behalf in specific regions. This topic describes the AWS Regions where you can use Amazon Q Developer. For more information about AWS Regions, see Specify which AWS Regions your account can use in the AWS Account Management Reference Guide. Your data may be processed in a different Region from the Region where you use Amazon Q Developer. For information on cross-region processing in Amazon Q Developer, see Cross-region processing. For information on where data is stored during processing, see Data protection. Supported Regions (enabled by default) Amazon Q Developer is available in the AWS Management Console, AWS Console Mobile Application, AWS website, AWS Documentation website, and integrated chat applications in the following AWS Regions. These Regions are enabled by default, meaning you don't need to enable them before use. For more information, see Regions that are enabled by default. Note The Amazon Q Developer service within the AWS Management Console is only available in the Regions outlined in Supported Regions for the Q Developer console and Q Developer profile. To manage Amazon Q Developer settings as an administrator, you must go to the Amazon Q Developer service and then use the Region selector to switch to a supported Region. You can chat and use other Amazon Q console features in the following Regions. Certain features of Amazon Q might not be available in all of these Regions. Check the topic for the feature you're using to verify availability. Supported Regions (enabled by default) 507 User Guide Amazon Q Developer • US East (Ohio) • US East (N. Virginia) • US West (N. California) • US West (Oregon) • Asia Pacific (Mumbai) • Asia Pacific (Osaka) • Asia Pacific (Seoul) • Asia Pacific (Singapore) • Asia Pacific (Sydney) • Asia Pacific (Tokyo) • Canada (Central) • Europe (Frankfurt) • Europe (Ireland) • Europe (London) • Europe (Paris) • Europe (Stockholm) • South America (São Paulo) Supported opt-in Regions To use an opt-in Region with Amazon Q Developer, you must enable the Region manually. For more information, see Opt-in Regions. Opt-in Regions are only supported in the Amazon Q Developer Free tier. The following opt-in Regions are supported. • Africa (Cape Town) • Asia Pacific (Hong Kong) • Asia Pacific (Hyderabad) • Asia Pacific (Jakarta) • Asia Pacific (Malaysia) • Asia Pacific (Melbourne) Supported opt-in Regions 508 User Guide Amazon Q Developer • Asia Pacific (Thailand) • Canada West (Calgary) • Europe (Milan) • Europe (Spain) • Europe (Zurich) • Mexico (Central) • Middle East (Bahrain) • Middle East (UAE) • Israel (Tel Aviv) Supported opt-in Regions 509 Amazon Q Developer User Guide Amazon Q Developer rename - Summary of changes On April 30, 2024, Amazon CodeWhisperer became a part of Amazon Q Developer. This section points you to the parts of this guide where you can find documentation for features that you are accustomed to using through CodeWhisperer. As you transition from using CodeWhisperer to using Amazon Q Developer, you may consider the following changes to be most significant: • The administrative setup at the professional tier (Amazon Q Developer Pro) is different than it was for CodeWhisperer Professional. • You can chat with Amazon Q Developer in the AWS Management Console, and on the AWS documentation and marketing websites. The following familiar features of CodeWhisperer are available as part of Amazon Q Developer, with a few changes: • Coding suggestions in a third-party IDE • Coding suggestions in the context of another AWS service • Suggestions at the command line • Customizations • Code reviews • Dashboard 510 Amazon Q Developer User Guide Document history for Amazon Q Developer User Guide The following table describes the document |
amazonq-developer-ug-161 | amazonq-developer-ug.pdf | 161 | Q Developer Pro) is different than it was for CodeWhisperer Professional. • You can chat with Amazon Q Developer in the AWS Management Console, and on the AWS documentation and marketing websites. The following familiar features of CodeWhisperer are available as part of Amazon Q Developer, with a few changes: • Coding suggestions in a third-party IDE • Coding suggestions in the context of another AWS service • Suggestions at the command line • Customizations • Code reviews • Dashboard 510 Amazon Q Developer User Guide Document history for Amazon Q Developer User Guide The following table describes the document history for the Amazon Q Developer User Guide. For notifications about updates to this documentation, you can subscribe to the RSS feed. Change Description Date Added subscription details Transformation website removed Updated terminology Example SCP added Amazon Q Developer for GitHub May 13, 2025 May 12, 2025 May 10, 2025 May 8, 2025 May 5, 2025 The Subscribe users to Amazon Q Developer Pro across accounts topic now includes information about where to install IAM Identity Center and the Amazon Q Developer profile. The Amazon Q Developer transformation website has been taken down, and with it, the related documentation. Updated the term identity- aware console sessions to identity-enhanced console sessions throughout this guide. This service control policy (SCP) denies access to Amazon Q outside of EU regions. Information about Amazon Q Developer for GitHub, including concepts and procedures focused on setting up, key features, and configuration. 511 Amazon Q Developer Added context hooks Added support for context hooks. May 3, 2025 User Guide Managed policy updated Permission has been added to AmazonQFullAccess. May 2, 2025 Agentic chat in the IDE Agentic chat functionality is available in the IDE. May 1, 2025 Updates to customizations Customizations now support additional languages. April 30, 2025 Managed and example policies update Permissions have been added to AmazonQFullAccess, April 30, 2025 GitLabDuoWithAmazo nQPermissionsPolicy, and Allow administrators to configure plugins. Added MCP support Added support for MCP in the CLI. April 29, 2025 Added upgrade details Added information about how to upgrade from the Free tier April 28, 2025 to the Pro tier. Support for conversation history Support for code as context April 21, 2025 April 21, 2025 Your conversation history is now saved when you chat with Amazon Q in the IDE. You can now specify classes, functions, and global variables as context when you chat with Amazon Q in the IDE. 512 Amazon Q Developer User Guide Updates to GitLab Duo with Amazon Q onboarding and GitLab Duo with Amazon Q has been updated with April 16, 2025 policy changes to onboarding and permissions policy (GitLabDuo WithAmazonQPermiss ionsPolicy). Updated dashboard permissio ns Updated the list of permissio ns required to view the April 15, 2025 Improved security documenta tion for command line Enhanced command-line security and settings Update to the subscription experience Amazon Q Developer dashboard. Reorganized and enhanced security documentation with comprehensive guidance on security considerations, best practices, and safe usage of tool permissions. Added a new command- line settings section with configuration options. Enhanced tool permissions documentation with security best practices for sensitive environments. The workflow to subscribe users to Amazon Q Developer Pro and install the Amazon Q Developer profile has been moved from the Amazon Q console to the Amazon Q Developer console. April 13, 2025 April 12, 2025 April 10, 2025 Inline chat is available in Eclipse You can chat inline with Amazon Q in Eclipse. April 10, 2025 513 Amazon Q Developer User Guide Amazon Q Developer profiles are available in Europe When you subscribe to Amazon Q Developer, you can April 10, 2025 (Frankfurt) create profiles in the Europe /tools feature added to CLI (Frankfurt) Region. You can use the /tools command to manage permissions for tools that Amazon Q uses to perform actions on your system. April 10, 2025 Support for natural languages other than English You can chat with Amazon Q in the IDE and on the April 9, 2025 command line. Updates to GitLab Duo with Amazon Q GitLab Duo with Amazon Q has been updated regarding April 8, 2025 Email notifications for transformations New context, prompt, and project rules topics Updates to subscriptions topics changes to inline policy, and you can optionally create a CMK policy. The /fix feature has been removed. You may receive email notifications for updates related to your transform ations. The Adding context to the chat, Saving prompts, and Creating project rules topics have been added. The Understanding subscript ions, Viewing aggregated subscriptions, and Enabling profile sharing topics have been corrected. April 8, 2025 April 4, 2025 March 25, 2025 514 Amazon Q Developer Example policy update User Guide March 24, 2025 The example policies in Allow administrators to use the Amazon Q console and Allow administrators to use |
amazonq-developer-ug-162 | amazonq-developer-ug.pdf | 162 | topics changes to inline policy, and you can optionally create a CMK policy. The /fix feature has been removed. You may receive email notifications for updates related to your transform ations. The Adding context to the chat, Saving prompts, and Creating project rules topics have been added. The Understanding subscript ions, Viewing aggregated subscriptions, and Enabling profile sharing topics have been corrected. April 8, 2025 April 4, 2025 March 25, 2025 514 Amazon Q Developer Example policy update User Guide March 24, 2025 The example policies in Allow administrators to use the Amazon Q console and Allow administrators to use the Amazon Q Developer console have been updated with the sso:CreateInstance permission. Support for C++ and C# in customizations Customizations now support C++ and C#. March 20, 2025 Updates to chatting about resources March 13, 2025 You can chat with Amazon Q about multiple AWS resources and services to get answers about your AWS infrastru cture and configurations. Additional language support for documentation generation The agent for documentation generation now supports C++ March 12, 2025 and C#. New subscription-related limit Updated the Subscribing March 6, 2025 users to Amazon Q Developer Pro topic to indicate that you can enable Amazon Q Developer in a maximum of 50 AWS accounts within an organization managed by AWS Organizations. 515 Amazon Q Developer User Guide Context integration to CLI chat Amazon Q CLI now has context integration, giving March 6, 2025 Policy correction Amazon Q enhanced understanding of use cases and enabling it to provide more relevant and context-a ware responses. A JSON sytax error has been corrected in the policy described in Allow administr ators to use the Amazon Q console. February 28, 2025 New version of the command line tool for transformation The latest version of the command line tool for February 28, 2025 Upgrading to the Pro tier transformation includes support for authenticating with IAM through the AWS CLI. Added information about how to upgrade to the Pro tier in the Amazon Q Developer Free tier topic. February 25, 2025 Customizations policy update A permission has been added to the customizations policy. February 25, 2025 New dashboard topic The following topic has been added: Descriptions of Amazon Q Developer dashboard usage metrics. February 21, 2025 516 Amazon Q Developer User Guide New cross-region processing topic The cross-region processing topic describes how Amazon February 21, 2025 Managed policy update /doc enhancement New subscription topics Q Developer processes requests and makes calls across AWS Regions to provide the service. Permissions have been added to AWSServiceRoleForU serSubscriptions. Amazon Q can now generate infrastructure diagrams in response to a /doc command. Two subscription-related topics were added: Amazon Q Developer subscript ion statuses and Viewing aggregated Amazon Q Developer subscriptions. February 21, 2025 February 20, 2025 February 19, 2025 Amazon Q Developer in chat applications chapter Amazon Q Developer in chat applications is now Amazon February 19, 2025 Support for Java 21 transformations New firewall topic Q Developer in chat applicati ons. A new chapter describes the supported features. You can upgrade Java applications to Java 21 in the IDE and on the command line. A Configuring a firewall or proxy server for Amazon Q Developer topic has been added. February 14, 2025 February 14, 2025 517 Amazon Q Developer User Guide New version of the command line tool for transformation The latest version of the command line tool for February 12, 2025 User activity report correction transformation includes support for converting embedded SQL in Java applications. The path to the user activity report CSV file has been corrected. February 10, 2025 Update to the retention period of transformed code Amazon Q now retains transformed code for 30 days, February 7, 2025 New subscription workflow up from 24 hours. The steps to subscribe users to Amazon Q Developer have been improved. February 6, 2025 New version of the command line tool for transformation The latest version of the command line for transform February 3, 2025 /dev enhancement Customizations section update Prompt logging examples ation includes the ability to receive your upgraded Java code in multiple commits. Amazon Q can now test the code it generates in response to a /dev command. The Creating your customiza tion topic now indicates you can include any number of repositories in your customiza tion. The Enabling prompt logging section now includes example logs. January 31, 2025 January 24, 2025 January 23, 2025 518 Amazon Q Developer CloudZero plugin The CloudZero plugin is available in Amazon Q chat. January 15, 2025 User Guide User activity report update New metrics have been added to User activity reports. December 16, 2024 Dashboard update December 16, 2024 Information about the old dashboard has been removed from the Amazon Q Developer Pro dashboard section. Information about filters and metrics has been added. Troubleshooting with |
amazonq-developer-ug-163 | amazonq-developer-ug.pdf | 163 | tion topic now indicates you can include any number of repositories in your customiza tion. The Enabling prompt logging section now includes example logs. January 31, 2025 January 24, 2025 January 23, 2025 518 Amazon Q Developer CloudZero plugin The CloudZero plugin is available in Amazon Q chat. January 15, 2025 User Guide User activity report update New metrics have been added to User activity reports. December 16, 2024 Dashboard update December 16, 2024 Information about the old dashboard has been removed from the Amazon Q Developer Pro dashboard section. Information about filters and metrics has been added. Troubleshooting with Amazon Q An Asking Amazon Q to troubleshoot your resources December 13, 2024 section has been added. Identity-enhanced sessions update The instructions for enabling identity-enhanced console December 6, 2024 sessions have been clarified in the Subscribing users to the Amazon Q Developer Pro tier with an organization instance section. You can use Amazon Q test generation feature to generate unit tests. Amazon Q can transform .NET, mainframe, and VMware workloads in bulk. December 3, 2024 December 3, 2024 New test generation agent Large-scale transformation 519 Amazon Q Developer User Guide GitLab Duo with Amazon Q December 3, 2024 Information about GitLab Duo with Amazon Q, including concepts, getting started procedures, and troublehs ooting. Documentation generation in the IDE Amazon Q can generate READMEs for your code in December 3, 2024 Code reviews in the IDE supported IDEs. Amazon Q code reviews, previously security scans, can detect and address issues in your code in supported IDEs. December 3, 2024 .NET transformation in the IDE Amazon Q can port your .NET applications to Linux-com December 3, 2024 Transformation on the command line patible cross-platform applications in Visual Studio, available in preview. You can transform Java applications on the command line, available in preview. November 27, 2024 Multiple diffs for transform ation in the IDE You can choose to receive transformation changes from November 27, 2024 Amazon Q in multiple diffs. Amazon Q in Eclipse The Amazon Q plugin is available in preview in Eclipse. November 27, 2024 Cost analysis The cost analysis capabilit y, previously available in preview, is now generally available. November 26, 2024 520 Amazon Q Developer User Guide Transformation for embedded SQL code You can convert embedded SQL code in your Java November 22, 2024 Dashboard update applications with Amazon Q transformation in the IDE. The Amazon Q Developer Pro dashboard has been update with new metrics. November 22, 2024 CodeConnections repositories When creating a customiza November 22, 2024 tion using a CodeConnections connection, you can now choose the repositories you want to use. Amazon Q command line now supports Linux Amazon Q command line supports Linux environments. November 21, 2024 Subscribing users Changes to customizations It supports Ubuntu 22 and 24, and may otherwise work with GNOME v42+ or environme nts where the display server is Xorg and the input method framework is IBus. The instructions for subscribi ng users in Setting up access to the Amazon Q Developer Pro tier have been updated to reflect new user interface (UI) elements. The Customization in chat feature is now generally available. Also, customiza tions can now be created with the following file types: .md, .mdx, .rst, and .txt. November 20, 2024 November 20, 2024 521 Amazon Q Developer User Guide Supported IAM Identity Center Regions Languages added Customer managed key support Cross-region inference A section has been added with information about the Regions where you can set up IAM Identity Center instances for Amazon Q Developer Pro subscriptions. Support has been added for Dart, Lua, R, Swift, SystemVer ilog, and Powershell, as well as expanded support for JSON and YAML. Information about using customer managed keys and the features that can be encrypted with them has been added to the Data encryption topic. A topic on cross-region inference in Amazon Q Developer has been added. November 18, 2024 November 18, 2024 November 18, 2024 November 18, 2024 Amazon Q Developer Pro quotas A Pro tier quotas section has been added. November 18, 2024 Updated managed policy: AmazonQFullAccess Updated managed policy: AmazonQDeveloperAccess Additional permissions have been added to the AmazonQFullAccess policy. Additional permissions have been added to the AmazonQDeveloperAccess policy. November 13, 2024 November 13, 2024 522 Amazon Q Developer Amazon Q plugins Plugins enable users to chat with Amazon Q about metrics provided by third party tools. November 13, 2024 User Guide User activity reports You can now enable user activity reports. November 8, 2024 Customizations section update The Preparing your data section now describes file and directory naming limitations. November 5, 2024 Clarified the Amazon Q Developer Pro section The instructions for subscribi ng users to Amazon Q November 1, 2024 Developer Pro have been clarified. Inline chat You can transform code using the new inline chat feature. |
amazonq-developer-ug-164 | amazonq-developer-ug.pdf | 164 | November 13, 2024 November 13, 2024 522 Amazon Q Developer Amazon Q plugins Plugins enable users to chat with Amazon Q about metrics provided by third party tools. November 13, 2024 User Guide User activity reports You can now enable user activity reports. November 8, 2024 Customizations section update The Preparing your data section now describes file and directory naming limitations. November 5, 2024 Clarified the Amazon Q Developer Pro section The instructions for subscribi ng users to Amazon Q November 1, 2024 Developer Pro have been clarified. Inline chat You can transform code using the new inline chat feature. October 29, 2024 Updated managed policies: AmazonQFullAccess and Additional permissions have been added to the AmazonQDeveloperAccess AmazonQFullAccess policy October 28, 2024 Customizations section correction and AmazonQDeveloperAc cess policy. The Creating your customiza tion section now indicates that your codebase must reside in a folder in Amazon S3, not the bucket's root. October 28, 2024 Prompt logging section clarification The Enabling prompt logging section's wording was clarified . October 24, 2024 523 Amazon Q Developer User Guide Amazon S3 bucket policy fix Expanded features chapter Console-to-Code October 22, 2024 October 3, 2024 October 3, 2024 The Amazon S3 bucket policy shown in Enabling prompt logging contained a JSON syntax error that was fixed. The chapter describing various Amazon Q Developer features has been significa ntly expanded. Console-to-Code, previousl y available in preview as a feature of Amazon EC2, is now generally available as a feature of Amazon Q Developer. It integrates with Amazon EC2, Amazon VPC, and Amazon RDS. New policy: Use Amazon Q CLI with AWS CloudShell Identity-based policy allows users to use Amazon Q CLI October 2, 2024 Prompt logging Setup content updated with AWS CloudShell. You can log your users' IDE prompts in an Amazon S3 bucket. The Getting started chapter has been significantly simplified and restructured. September 16, 2024 August 15, 2024 CodeWhisperer endpoint needed for IDE VPC access Access from a Amazon VPC July 18, 2024 must include both q and codewhisperer endpoints. New endpoint Endpoints can now use July 12, 2024 the string q instead of codewhisperer . 524 Amazon Q Developer Customizations are GA The customizations feature is generally available. July 10, 2024 User Guide Chatting about customiza tions (Preview) In Preview, you can use the customizations feature to July 10, 2024 ask questions related to your codebase. Updated managed policy: AmazonQFullAccess Additional permissions have been added to the July 9, 2024 New managed policy: AmazonQDeveloperAccess Updated Amazon Q Developer admin policy Trusted access section Updated setup procedures Updated code examples AmazonQFullAccess policy. The AmazonQDeveloperAc cess managed policy provides full access to enable interacti ons with Amazon Q Developer , without administrator access. The policy for empowerin g Amazon Q Developer administrators has been updated to include sso:ListProfiles . A new section more clearly explains how a Amazon Q Developer administrator can share settings with member accounts. There's an improved Getting started chapter that includes support for account instances. The code examples now include C and C++, and have improved examples for C#. July 9, 2024 June 19, 2024 June 19, 2024 June 6, 2024 June 6, 2024 525 Amazon Q Developer User Guide Updated managed policy: AmazonQFullAccess Additional permissions have been added to the April 30, 2024 AmazonQFullAccess policy. New service-linked role: AWSServiceRoleForU The AWSServiceRoleForU serSubscriptions service-l April 30, 2024 serSubscriptions inked role provides access for New service-linked role: AWSServiceRoleForA mazonQDeveloper New managed policy: AWSServiceRoleForU serSubscriptionPolicy User Subscriptions to your IAM Identity Center resources to automatically update your subscriptions. The AWSServiceRoleForA mazonQDeveloper service-l inked role grants permission to access and emit data, and to create reports. The AWSServiceRoleForU serSubscriptionPolicy allows principals to track IAM Identity Center directory and AWS Organizations changes. April 30, 2024 April 30, 2024 New managed policy: AWSServiceRoleForA The AWSServiceRoleForA mazonQDeveloperPolicy mazonQDeveloperPolicy allows Amazon Q Developer April 30, 2024 GA release Amazon CodeWhisperer merge to call CloudWatch and CodeGuru on your behalf. Amazon Q Developer is available for general audiences. Amazon CodeWhisperer is now a part of Amazon Q Developer. April 30, 2024 April 30, 2024 526 Amazon Q Developer New guide name New permission New data protection topic New topic Preview release This service and accompany ing user guide have been renamed Amazon Q Developer. The ListConversations action is required to chat with Amazon Q in the console. Amazon Q now uses content for service improvement purposes. Added instructions for how to add Amazon Q to Slack and Microsoft Teams channels that are configured with Amazon Q Developer in chat applications. This is the initial preview release of the Amazon Q Developer User Guide. User Guide March 29, 2024 March 5, 2024 January 25, 2024 January 18, 2024 November 28, 2023 527 |
amazonsecuritylake-api-001 | amazonsecuritylake-api.pdf | 1 | API Reference Amazon Security Lake API Version 2018-05-10 Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Security Lake API Reference Amazon Security Lake: API Reference Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Security Lake Table of Contents API Reference Welcome ........................................................................................................................................... 1 Actions .............................................................................................................................................. 2 CreateAwsLogSource .................................................................................................................................... 4 Request Syntax ........................................................................................................................................ 4 URI Request Parameters ........................................................................................................................ 4 Request Body ........................................................................................................................................... 4 Response Syntax ...................................................................................................................................... 5 Response Elements ................................................................................................................................. 5 Errors .......................................................................................................................................................... 5 See Also ..................................................................................................................................................... 6 CreateCustomLogSource ............................................................................................................................. 8 Request Syntax ........................................................................................................................................ 8 URI Request Parameters ........................................................................................................................ 8 Request Body ........................................................................................................................................... 8 Response Syntax ................................................................................................................................... 10 Response Elements ............................................................................................................................... 10 Errors ....................................................................................................................................................... 10 See Also .................................................................................................................................................. 11 CreateDataLake ........................................................................................................................................... 13 Request Syntax ...................................................................................................................................... 13 URI Request Parameters ...................................................................................................................... 14 Request Body ......................................................................................................................................... 14 Response Syntax ................................................................................................................................... 15 Response Elements ............................................................................................................................... 16 Errors ....................................................................................................................................................... 16 See Also .................................................................................................................................................. 17 CreateDataLakeExceptionSubscription ................................................................................................... 19 Request Syntax ...................................................................................................................................... 19 URI Request Parameters ...................................................................................................................... 19 Request Body ......................................................................................................................................... 19 Response Syntax ................................................................................................................................... 20 Response Elements ............................................................................................................................... 20 Errors ....................................................................................................................................................... 20 See Also .................................................................................................................................................. 21 API Version 2018-05-10 iii Amazon Security Lake API Reference CreateDataLakeOrganizationConfiguration .......................................................................................... 23 Request Syntax ...................................................................................................................................... 23 URI Request Parameters ...................................................................................................................... 23 Request Body ......................................................................................................................................... 23 Response Syntax ................................................................................................................................... 24 Response Elements ............................................................................................................................... 24 Errors ....................................................................................................................................................... 24 See Also .................................................................................................................................................. 25 CreateSubscriber ......................................................................................................................................... 26 Request Syntax ...................................................................................................................................... 26 URI Request Parameters ...................................................................................................................... 26 Request Body ......................................................................................................................................... 26 Response Syntax ................................................................................................................................... 28 Response Elements ............................................................................................................................... 28 Errors ....................................................................................................................................................... 29 See Also .................................................................................................................................................. 30 CreateSubscriberNotification ................................................................................................................... 31 Request Syntax ...................................................................................................................................... 31 URI Request Parameters ...................................................................................................................... 31 Request Body ......................................................................................................................................... 31 Response Syntax ................................................................................................................................... 32 Response Elements ............................................................................................................................... 32 Errors ....................................................................................................................................................... 32 See Also .................................................................................................................................................. 33 DeleteAwsLogSource ................................................................................................................................. 35 Request Syntax ...................................................................................................................................... 35 URI Request Parameters ...................................................................................................................... 35 Request Body ......................................................................................................................................... 35 Response Syntax ................................................................................................................................... 36 Response Elements ............................................................................................................................... 36 Errors ....................................................................................................................................................... 36 See Also .................................................................................................................................................. 37 DeleteCustomLogSource ........................................................................................................................... 39 Request Syntax ...................................................................................................................................... 39 URI Request Parameters ...................................................................................................................... 39 Request Body ......................................................................................................................................... 39 API Version 2018-05-10 iv Amazon Security Lake API Reference Response Syntax ................................................................................................................................... 39 Response Elements ............................................................................................................................... 40 Errors ....................................................................................................................................................... 40 See Also .................................................................................................................................................. 41 DeleteDataLake ........................................................................................................................................... 42 Request Syntax ...................................................................................................................................... 42 URI Request Parameters ...................................................................................................................... 42 Request Body ......................................................................................................................................... 42 Response Syntax ................................................................................................................................... 43 Response Elements ............................................................................................................................... 43 Errors ....................................................................................................................................................... 43 See Also .................................................................................................................................................. 44 DeleteDataLakeExceptionSubscription ................................................................................................... 45 Request Syntax ...................................................................................................................................... 45 URI Request Parameters ...................................................................................................................... 45 Request Body ......................................................................................................................................... 45 Response Syntax ................................................................................................................................... 45 Response Elements ............................................................................................................................... 45 Errors ....................................................................................................................................................... 45 See Also .................................................................................................................................................. 46 DeleteDataLakeOrganizationConfiguration .......................................................................................... 48 Request Syntax ...................................................................................................................................... 48 URI Request Parameters ...................................................................................................................... 48 Request Body ......................................................................................................................................... 48 Response Syntax ................................................................................................................................... 49 Response Elements ............................................................................................................................... 49 Errors ....................................................................................................................................................... 49 See Also .................................................................................................................................................. 50 DeleteSubscriber ......................................................................................................................................... 51 Request Syntax ...................................................................................................................................... 51 URI Request Parameters ...................................................................................................................... 51 Request Body ......................................................................................................................................... 51 Response Syntax ................................................................................................................................... 51 Response Elements ............................................................................................................................... 51 Errors ....................................................................................................................................................... 51 See Also .................................................................................................................................................. 53 API Version 2018-05-10 v Amazon Security Lake API Reference DeleteSubscriberNotification ................................................................................................................... 54 Request Syntax ...................................................................................................................................... 54 URI Request Parameters ...................................................................................................................... 54 Request Body ......................................................................................................................................... 54 Response Syntax ................................................................................................................................... 54 Response Elements ............................................................................................................................... 54 Errors ....................................................................................................................................................... 54 See Also .................................................................................................................................................. 56 DeregisterDataLakeDelegatedAdministrator ........................................................................................ 57 Request Syntax ...................................................................................................................................... 57 URI Request Parameters ...................................................................................................................... 57 Request Body ......................................................................................................................................... 57 Response Syntax ................................................................................................................................... 57 Response Elements ............................................................................................................................... 57 Errors ....................................................................................................................................................... 57 See Also .................................................................................................................................................. 58 GetDataLakeExceptionSubscription ........................................................................................................ 60 Request Syntax ...................................................................................................................................... 60 URI Request Parameters ...................................................................................................................... 60 Request Body ......................................................................................................................................... 60 Response Syntax ................................................................................................................................... 60 Response Elements ............................................................................................................................... 60 Errors ....................................................................................................................................................... 61 See Also .................................................................................................................................................. 62 GetDataLakeOrganizationConfiguration ................................................................................................ 63 Request Syntax ...................................................................................................................................... 63 URI Request Parameters ...................................................................................................................... 63 Request Body ......................................................................................................................................... 63 Response Syntax ................................................................................................................................... 63 Response Elements ............................................................................................................................... 63 Errors ....................................................................................................................................................... 64 See Also .................................................................................................................................................. 65 GetDataLakeSources .................................................................................................................................. 66 Request Syntax ...................................................................................................................................... 66 URI Request Parameters ...................................................................................................................... 66 Request Body ......................................................................................................................................... 66 API Version 2018-05-10 vi Amazon Security Lake API Reference Response Syntax ................................................................................................................................... 67 Response Elements ............................................................................................................................... 68 Errors ....................................................................................................................................................... 68 See Also .................................................................................................................................................. 70 GetSubscriber .............................................................................................................................................. 71 Request Syntax ...................................................................................................................................... 71 URI Request Parameters ...................................................................................................................... 71 Request Body ......................................................................................................................................... 71 Response Syntax ................................................................................................................................... 71 Response Elements ............................................................................................................................... 72 Errors ....................................................................................................................................................... 72 See Also .................................................................................................................................................. 73 ListDataLakeExceptions ............................................................................................................................. 75 Request Syntax ...................................................................................................................................... 75 URI Request Parameters ...................................................................................................................... 75 Request Body ......................................................................................................................................... 75 Response Syntax ................................................................................................................................... 76 Response Elements ............................................................................................................................... 76 Errors ....................................................................................................................................................... 77 See Also .................................................................................................................................................. 78 ListDataLakes ............................................................................................................................................... 79 Request Syntax ...................................................................................................................................... 79 URI Request Parameters ...................................................................................................................... 79 Request Body ......................................................................................................................................... 79 Response Syntax |
amazonsecuritylake-api-002 | amazonsecuritylake-api.pdf | 2 | Amazon Security Lake API Reference Response Syntax ................................................................................................................................... 67 Response Elements ............................................................................................................................... 68 Errors ....................................................................................................................................................... 68 See Also .................................................................................................................................................. 70 GetSubscriber .............................................................................................................................................. 71 Request Syntax ...................................................................................................................................... 71 URI Request Parameters ...................................................................................................................... 71 Request Body ......................................................................................................................................... 71 Response Syntax ................................................................................................................................... 71 Response Elements ............................................................................................................................... 72 Errors ....................................................................................................................................................... 72 See Also .................................................................................................................................................. 73 ListDataLakeExceptions ............................................................................................................................. 75 Request Syntax ...................................................................................................................................... 75 URI Request Parameters ...................................................................................................................... 75 Request Body ......................................................................................................................................... 75 Response Syntax ................................................................................................................................... 76 Response Elements ............................................................................................................................... 76 Errors ....................................................................................................................................................... 77 See Also .................................................................................................................................................. 78 ListDataLakes ............................................................................................................................................... 79 Request Syntax ...................................................................................................................................... 79 URI Request Parameters ...................................................................................................................... 79 Request Body ......................................................................................................................................... 79 Response Syntax ................................................................................................................................... 79 Response Elements ............................................................................................................................... 80 Errors ....................................................................................................................................................... 80 See Also .................................................................................................................................................. 82 ListLogSources ............................................................................................................................................ 83 Request Syntax ...................................................................................................................................... 83 URI Request Parameters ...................................................................................................................... 83 Request Body ......................................................................................................................................... 83 Response Syntax ................................................................................................................................... 84 Response Elements ............................................................................................................................... 85 Errors ....................................................................................................................................................... 85 See Also .................................................................................................................................................. 86 API Version 2018-05-10 vii Amazon Security Lake API Reference ListSubscribers ............................................................................................................................................ 88 Request Syntax ...................................................................................................................................... 88 URI Request Parameters ...................................................................................................................... 88 Request Body ......................................................................................................................................... 88 Response Syntax ................................................................................................................................... 88 Response Elements ............................................................................................................................... 89 Errors ....................................................................................................................................................... 90 See Also .................................................................................................................................................. 91 ListTagsForResource ................................................................................................................................... 92 Request Syntax ...................................................................................................................................... 92 URI Request Parameters ...................................................................................................................... 92 Request Body ......................................................................................................................................... 92 Response Syntax ................................................................................................................................... 92 Response Elements ............................................................................................................................... 93 Errors ....................................................................................................................................................... 93 See Also .................................................................................................................................................. 94 RegisterDataLakeDelegatedAdministrator ............................................................................................ 95 Request Syntax ...................................................................................................................................... 95 URI Request Parameters ...................................................................................................................... 95 Request Body ......................................................................................................................................... 95 Response Syntax ................................................................................................................................... 95 Response Elements ............................................................................................................................... 95 Errors ....................................................................................................................................................... 96 See Also .................................................................................................................................................. 97 TagResource ................................................................................................................................................. 98 Request Syntax ...................................................................................................................................... 98 URI Request Parameters ...................................................................................................................... 98 Request Body ......................................................................................................................................... 99 Response Syntax ................................................................................................................................... 99 Response Elements ............................................................................................................................... 99 Errors ....................................................................................................................................................... 99 See Also ................................................................................................................................................ 100 UntagResource .......................................................................................................................................... 102 Request Syntax .................................................................................................................................... 102 URI Request Parameters ................................................................................................................... 102 Request Body ....................................................................................................................................... 102 API Version 2018-05-10 viii Amazon Security Lake API Reference Response Syntax ................................................................................................................................. 103 Response Elements ............................................................................................................................ 103 Errors ..................................................................................................................................................... 103 See Also ................................................................................................................................................ 104 UpdateDataLake ....................................................................................................................................... 105 Request Syntax .................................................................................................................................... 105 URI Request Parameters ................................................................................................................... 106 Request Body ....................................................................................................................................... 106 Response Syntax ................................................................................................................................. 106 Response Elements ............................................................................................................................ 107 Errors ..................................................................................................................................................... 108 See Also ................................................................................................................................................ 109 UpdateDataLakeExceptionSubscription ............................................................................................... 110 Request Syntax .................................................................................................................................... 110 URI Request Parameters ................................................................................................................... 110 Request Body ....................................................................................................................................... 110 Response Syntax ................................................................................................................................. 111 Response Elements ............................................................................................................................ 111 Errors ..................................................................................................................................................... 111 See Also ................................................................................................................................................ 112 UpdateSubscriber ..................................................................................................................................... 114 Request Syntax .................................................................................................................................... 114 URI Request Parameters ................................................................................................................... 114 Request Body ....................................................................................................................................... 114 Response Syntax ................................................................................................................................. 115 Response Elements ............................................................................................................................ 116 Errors ..................................................................................................................................................... 116 See Also ................................................................................................................................................ 117 UpdateSubscriberNotification ............................................................................................................... 119 Request Syntax .................................................................................................................................... 119 URI Request Parameters ................................................................................................................... 119 Request Body ....................................................................................................................................... 119 Response Syntax ................................................................................................................................. 120 Response Elements ............................................................................................................................ 120 Errors ..................................................................................................................................................... 120 See Also ................................................................................................................................................ 121 API Version 2018-05-10 ix Amazon Security Lake API Reference Data Types ................................................................................................................................... 123 AwsIdentity ................................................................................................................................................ 125 Contents ............................................................................................................................................... 125 See Also ................................................................................................................................................ 125 AwsLogSourceConfiguration .................................................................................................................. 126 Contents ............................................................................................................................................... 126 See Also ................................................................................................................................................ 127 AwsLogSourceResource ........................................................................................................................... 128 Contents ............................................................................................................................................... 128 See Also ................................................................................................................................................ 128 CustomLogSourceAttributes .................................................................................................................. 129 Contents ............................................................................................................................................... 129 See Also ................................................................................................................................................ 130 CustomLogSourceConfiguration ........................................................................................................... 131 Contents ............................................................................................................................................... 131 See Also ................................................................................................................................................ 131 CustomLogSourceCrawlerConfiguration ............................................................................................. 132 Contents ............................................................................................................................................... 132 See Also ................................................................................................................................................ 132 CustomLogSourceProvider ..................................................................................................................... 133 Contents ............................................................................................................................................... 133 See Also ................................................................................................................................................ 133 CustomLogSourceResource .................................................................................................................... 134 Contents ............................................................................................................................................... 134 See Also ................................................................................................................................................ 135 DataLakeAutoEnableNewAccountConfiguration ................................................................................ 136 Contents ............................................................................................................................................... 136 See Also ................................................................................................................................................ 136 DataLakeConfiguration ........................................................................................................................... 137 Contents ............................................................................................................................................... 137 See Also ................................................................................................................................................ 137 DataLakeEncryptionConfiguration ........................................................................................................ 139 Contents ............................................................................................................................................... 139 See Also ................................................................................................................................................ 139 DataLakeException ................................................................................................................................... 140 Contents ............................................................................................................................................... 140 API Version 2018-05-10 x Amazon Security Lake API Reference See Also ................................................................................................................................................ 141 DataLakeLifecycleConfiguration ............................................................................................................ 142 Contents ............................................................................................................................................... 142 See Also ................................................................................................................................................ 142 DataLakeLifecycleExpiration .................................................................................................................. 143 Contents ............................................................................................................................................... 143 See Also ................................................................................................................................................ 143 DataLakeLifecycleTransition ................................................................................................................... 144 Contents ............................................................................................................................................... 144 See Also ................................................................................................................................................ 144 DataLakeReplicationConfiguration ....................................................................................................... 145 Contents ............................................................................................................................................... 145 See Also ................................................................................................................................................ 145 DataLakeResource .................................................................................................................................... 147 Contents ............................................................................................................................................... 147 See Also ................................................................................................................................................ 148 DataLakeSource ........................................................................................................................................ 150 Contents ............................................................................................................................................... 150 See Also ................................................................................................................................................ 151 DataLakeSourceStatus ............................................................................................................................. 152 Contents ............................................................................................................................................... 152 See Also ................................................................................................................................................ 152 DataLakeUpdateException ..................................................................................................................... 153 Contents ............................................................................................................................................... 153 See Also ................................................................................................................................................ 153 DataLakeUpdateStatus ............................................................................................................................ 154 Contents ............................................................................................................................................... 154 See Also ................................................................................................................................................ 154 HttpsNotificationConfiguration ............................................................................................................. 156 Contents ............................................................................................................................................... 156 See Also ................................................................................................................................................ 157 LogSource .................................................................................................................................................. 158 Contents ............................................................................................................................................... 158 See Also ................................................................................................................................................ 158 LogSourceResource .................................................................................................................................. 160 Contents ............................................................................................................................................... 160 API Version 2018-05-10 xi Amazon Security Lake API Reference See Also ................................................................................................................................................ 160 NotificationConfiguration ....................................................................................................................... 162 Contents ............................................................................................................................................... 162 See Also ................................................................................................................................................ 162 SqsNotificationConfiguration ................................................................................................................ 163 Contents ............................................................................................................................................... 163 See Also ................................................................................................................................................ 163 SubscriberResource .................................................................................................................................. 164 Contents ............................................................................................................................................... 164 See Also ................................................................................................................................................ 167 Tag ............................................................................................................................................................... 168 Contents ............................................................................................................................................... 168 See Also ................................................................................................................................................ 169 Common Parameters ................................................................................................................... 170 Common Errors ............................................................................................................................ 173 API Version 2018-05-10 xii Amazon Security Lake Welcome API Reference Amazon Security Lake is a fully managed security data lake service. You can use Security Lake to automatically centralize security data from cloud, on-premises, and custom sources into a data |
amazonsecuritylake-api-003 | amazonsecuritylake-api.pdf | 3 | Version 2018-05-10 xi Amazon Security Lake API Reference See Also ................................................................................................................................................ 160 NotificationConfiguration ....................................................................................................................... 162 Contents ............................................................................................................................................... 162 See Also ................................................................................................................................................ 162 SqsNotificationConfiguration ................................................................................................................ 163 Contents ............................................................................................................................................... 163 See Also ................................................................................................................................................ 163 SubscriberResource .................................................................................................................................. 164 Contents ............................................................................................................................................... 164 See Also ................................................................................................................................................ 167 Tag ............................................................................................................................................................... 168 Contents ............................................................................................................................................... 168 See Also ................................................................................................................................................ 169 Common Parameters ................................................................................................................... 170 Common Errors ............................................................................................................................ 173 API Version 2018-05-10 xii Amazon Security Lake Welcome API Reference Amazon Security Lake is a fully managed security data lake service. You can use Security Lake to automatically centralize security data from cloud, on-premises, and custom sources into a data lake that's stored in your AWS account. AWS Organizations is an account management service that lets you consolidate multiple AWS accounts into an organization that you create and centrally manage. With Organizations, you can create member accounts and invite existing accounts to join your organization. Security Lake helps you analyze security data for a more complete understanding of your security posture across the entire organization. It can also help you improve the protection of your workloads, applications, and data. The data lake is backed by Amazon Simple Storage Service (Amazon S3) buckets, and you retain ownership over your data. Amazon Security Lake integrates with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service. In Security Lake, CloudTrail captures API calls for Security Lake as events. The calls captured include calls from the Security Lake console and code calls to the Security Lake API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for Security Lake. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in Event history. Using the information collected by CloudTrail you can determine the request that was made to Security Lake, the IP address from which the request was made, who made the request, when it was made, and additional details. To learn more about Security Lake information in CloudTrail, see the Amazon Security Lake User Guide. Security Lake automates the collection of security-related log and event data from integrated AWS services and third-party services. It also helps you manage the lifecycle of data with customizable retention and replication settings. Security Lake converts ingested data into Apache Parquet format and a standard open-source schema called the Open Cybersecurity Schema Framework (OCSF). Other AWS services and third-party services can subscribe to the data that's stored in Security Lake for incident response and security data analytics. This document was last published on May 21, 2025. API Version 2018-05-10 1 Amazon Security Lake Actions The following actions are supported: • CreateAwsLogSource • CreateCustomLogSource • CreateDataLake • CreateDataLakeExceptionSubscription • CreateDataLakeOrganizationConfiguration • CreateSubscriber • CreateSubscriberNotification • DeleteAwsLogSource • DeleteCustomLogSource • DeleteDataLake • DeleteDataLakeExceptionSubscription • DeleteDataLakeOrganizationConfiguration • DeleteSubscriber • DeleteSubscriberNotification • DeregisterDataLakeDelegatedAdministrator • GetDataLakeExceptionSubscription • GetDataLakeOrganizationConfiguration • GetDataLakeSources • GetSubscriber • ListDataLakeExceptions • ListDataLakes • ListLogSources • ListSubscribers • ListTagsForResource • RegisterDataLakeDelegatedAdministrator • TagResource • UntagResource API Reference API Version 2018-05-10 2 Amazon Security Lake • UpdateDataLake • UpdateDataLakeExceptionSubscription • UpdateSubscriber • UpdateSubscriberNotification API Reference API Version 2018-05-10 3 Amazon Security Lake API Reference CreateAwsLogSource Adds a natively supported AWS service as an Amazon Security Lake source. Enables source types for member accounts in required AWS Regions, based on the parameters you specify. You can choose any source type in any Region for either accounts that are part of a trusted organization or standalone accounts. Once you add an AWS service as a source, Security Lake starts collecting logs and events from it. You can use this API only to enable natively supported AWS services as a source. Use CreateCustomLogSource to enable data collection from a custom source. Request Syntax POST /v1/datalake/logsources/aws HTTP/1.1 Content-type: application/json { "sources": [ { "accounts": [ "string" ], "regions": [ "string" ], "sourceName": "string", "sourceVersion": "string" } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. sources Specify the natively-supported AWS service to add as a source in Security Lake. Type: Array of AwsLogSourceConfiguration objects CreateAwsLogSource API Version 2018-05-10 4 Amazon Security Lake API Reference Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "failed": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. failed Lists all accounts in which enabling a natively supported AWS service as a Security Lake source failed. The failure occurred as these accounts are not part of an organization. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Errors For information |
amazonsecuritylake-api-004 | amazonsecuritylake-api.pdf | 4 | Lake API Reference Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "failed": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. failed Lists all accounts in which enabling a natively supported AWS service as a Security Lake source failed. The failure occurred as these accounts are not part of an organization. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. Response Syntax API Version 2018-05-10 5 Amazon Security Lake HTTP Status Code: 403 BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ See Also API Version 2018-05-10 6 Amazon Security Lake • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 7 Amazon Security Lake API Reference CreateCustomLogSource Adds a third-party custom source in Amazon Security Lake, from the AWS Region where you want to create a custom source. Security Lake can collect logs and events from third-party custom sources. After creating the appropriate IAM role to invoke AWS Glue crawler, use this API to add a custom source name in Security Lake. This operation creates a partition in the Amazon S3 bucket for Security Lake as the target location for log files from the custom source. In addition, this operation also creates an associated AWS Glue table and an AWS Glue crawler. Request Syntax POST /v1/datalake/logsources/custom HTTP/1.1 Content-type: application/json { "configuration": { "crawlerConfiguration": { "roleArn": "string" }, "providerIdentity": { "externalId": "string", "principal": "string" } }, "eventClasses": [ "string" ], "sourceName": "string", "sourceVersion": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. configuration The configuration used for the third-party custom source. CreateCustomLogSource API Version 2018-05-10 8 Amazon Security Lake API Reference Type: CustomLogSourceConfiguration object Required: Yes eventClasses The Open Cybersecurity Schema Framework (OCSF) event classes which describes the type of data that the custom source will send to Security Lake. For the list of supported event classes, see the Amazon Security Lake User Guide. Type: Array of strings Pattern: ^[A-Z\_0-9]*$ Required: No sourceName Specify the name for a third-party custom source. This must be a Regionally unique value. The sourceName you enter here, is used in the LogProviderRole name which follows the convention AmazonSecurityLake-Provider-{name of the custom source}- {region}. You must use a CustomLogSource name that is shorter than or equal to 20 characters. This ensures that the LogProviderRole name is below the 64 character limit. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: ^[\w\-\_\:\.]*$ Required: Yes sourceVersion Specify the source version for the third-party custom source, to limit log collection to a specific version of custom data source. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^[A-Za-z0-9\-\.\_]*$ Required: No Request Body API Version 2018-05-10 9 API Reference Amazon Security Lake Response Syntax HTTP/1.1 200 Content-type: application/json { "source": { "attributes": { "crawlerArn": "string", "databaseArn": "string", "tableArn": "string" }, "provider": { "location": "string", "roleArn": "string" }, "sourceName": "string", "sourceVersion": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The |
amazonsecuritylake-api-005 | amazonsecuritylake-api.pdf | 5 | Pattern: ^[\w\-\_\:\.]*$ Required: Yes sourceVersion Specify the source version for the third-party custom source, to limit log collection to a specific version of custom data source. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^[A-Za-z0-9\-\.\_]*$ Required: No Request Body API Version 2018-05-10 9 API Reference Amazon Security Lake Response Syntax HTTP/1.1 200 Content-type: application/json { "source": { "attributes": { "crawlerArn": "string", "databaseArn": "string", "tableArn": "string" }, "provider": { "location": "string", "roleArn": "string" }, "sourceName": "string", "sourceVersion": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. source The third-party custom source that was created. Type: CustomLogSourceResource object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial Response Syntax API Version 2018-05-10 10 Amazon Security Lake API Reference occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface See Also API Version 2018-05-10 11 API Reference Amazon Security Lake • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 12 Amazon Security Lake CreateDataLake API Reference Initializes an Amazon Security Lake instance with the provided (or default) configuration. You can enable Security Lake in AWS Regions with customized settings before enabling log collection in Regions. To specify particular Regions, configure these Regions using the configurations parameter. If you have already enabled Security Lake in a Region when you call this command, the command will update the Region if you provide new configuration parameters. If you have not already enabled Security Lake in the Region when you call this API, it will set up the data lake in the Region with the specified configurations. When you enable Security Lake, it starts ingesting security data after the CreateAwsLogSource call and after you create subscribers using the CreateSubscriber API. This includes ingesting security data from sources, storing data, and making data accessible to subscribers. Security Lake also enables all the existing settings and resources that it stores or maintains for your AWS account in the current Region, including security log and event data. For more information, see the Amazon Security Lake User Guide. Request Syntax POST /v1/datalake HTTP/1.1 Content-type: application/json { "configurations": [ { "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", "replicationConfiguration": { CreateDataLake API Version 2018-05-10 13 Amazon Security Lake API Reference "regions": [ "string" ], "roleArn": "string" } } ], "metaStoreManagerRoleArn": "string", "tags": [ { "key": "string", "value": "string" } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. configurations Specify the Region or Regions that will contribute data to the rollup region. Type: Array of DataLakeConfiguration objects Array Members: Minimum number of 1 item. Required: Yes metaStoreManagerRoleArn The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: Yes URI Request Parameters API Version 2018-05-10 14 Amazon Security Lake tags API Reference An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag |
amazonsecuritylake-api-006 | amazonsecuritylake-api.pdf | 6 | will contribute data to the rollup region. Type: Array of DataLakeConfiguration objects Array Members: Minimum number of 1 item. Required: Yes metaStoreManagerRoleArn The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: Yes URI Request Parameters API Version 2018-05-10 14 Amazon Security Lake tags API Reference An array of objects, one for each tag to associate with the data lake configuration. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 50 items. Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "dataLakes": [ { "createStatus": "string", "dataLakeArn": "string", "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", "replicationConfiguration": { "regions": [ "string" ], "roleArn": "string" }, "s3BucketArn": "string", Response Syntax API Version 2018-05-10 15 Amazon Security Lake API Reference "updateStatus": { "exception": { "code": "string", "reason": "string" }, "requestId": "string", "status": "string" } } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. dataLakes The created Security Lake configuration object. Type: Array of DataLakeResource objects Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. Response Elements API Version 2018-05-10 16 Amazon Security Lake HTTP Status Code: 400 ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2018-05-10 17 Amazon Security Lake • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 18 Amazon Security Lake API Reference CreateDataLakeExceptionSubscription Creates the specified notification subscription in Amazon Security Lake for the organization you specify. The notification subscription is created for exceptions that cannot be resolved by Security Lake automatically. Request Syntax POST /v1/datalake/exceptions/subscription HTTP/1.1 Content-type: application/json { "exceptionTimeToLive": number, "notificationEndpoint": "string", "subscriptionProtocol": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. exceptionTimeToLive The expiration period and time-to-live (TTL). It is the duration of time until which the exception message remains. Type: Long Valid Range: Minimum value of 1. Required: No notificationEndpoint The AWS account where you want to receive exception notifications. Type: String CreateDataLakeExceptionSubscription API Version 2018-05-10 19 Amazon Security Lake API Reference Pattern: ^[\\\w\-_:/.@=+]*$ Required: Yes subscriptionProtocol The subscription protocol to which exception notifications are posted. Type: String Pattern: ^[a-z\-]*$ Required: Yes Response Syntax HTTP/1.1 200 Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is |
amazonsecuritylake-api-007 | amazonsecuritylake-api.pdf | 7 | If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 Response Syntax API Version 2018-05-10 20 Amazon Security Lake ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 See Also API Version 2018-05-10 21 Amazon Security Lake • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 22 Amazon Security Lake API Reference CreateDataLakeOrganizationConfiguration Automatically enables Amazon Security Lake for new member accounts in your organization. Security Lake is not automatically enabled for any existing member accounts in your organization. This operation merges the new data lake organization configuration with the existing configuration for Security Lake in your organization. If you want to create a new data lake organization configuration, you must delete the existing one using DeleteDataLakeOrganizationConfiguration. Request Syntax POST /v1/datalake/organization/configuration HTTP/1.1 Content-type: application/json { "autoEnableNewAccount": [ { "region": "string", "sources": [ { "sourceName": "string", "sourceVersion": "string" } ] } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. autoEnableNewAccount Enable Security Lake with the specified configuration settings, to begin collecting security data for new accounts in your organization. CreateDataLakeOrganizationConfiguration API Version 2018-05-10 23 Amazon Security Lake API Reference Type: Array of DataLakeAutoEnableNewAccountConfiguration objects Array Members: Minimum number of 1 item. Required: No Response Syntax HTTP/1.1 200 Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 Response Syntax API Version 2018-05-10 24 Amazon Security Lake InternalServerException API Reference Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 25 Amazon Security Lake CreateSubscriber |
amazonsecuritylake-api-008 | amazonsecuritylake-api.pdf | 8 | ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 25 Amazon Security Lake CreateSubscriber API Reference Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current AWS Region. Request Syntax POST /v1/subscribers HTTP/1.1 Content-type: application/json { "accessTypes": [ "string" ], "sources": [ { ... } ], "subscriberDescription": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string", "tags": [ { "key": "string", "value": "string" } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accessTypes The Amazon S3 or AWS Lake Formation access type. Type: Array of strings CreateSubscriber API Version 2018-05-10 26 Amazon Security Lake API Reference Valid Values: LAKEFORMATION | S3 Required: No sources The supported AWS services from which logs and events are collected. Security Lake supports log and event collection for natively supported AWS services. Type: Array of LogSourceResource objects Required: Yes subscriberDescription The description for your subscriber account in Security Lake. Type: String Pattern: ^[\\\w\s\-_:/,.@=+]*$ Required: No subscriberIdentity The AWS identity used to access your data. Type: AwsIdentity object Required: Yes subscriberName The name of your Security Lake subscriber account. Type: String Length Constraints: Minimum length of 0. Maximum length of 64. Required: Yes tags An array of objects, one for each tag to associate with the subscriber. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string. Request Body API Version 2018-05-10 27 Amazon Security Lake Type: Array of Tag objects API Reference Array Members: Minimum number of 0 items. Maximum number of 50 items. Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "subscriber": { "accessTypes": [ "string" ], "createdAt": "string", "resourceShareArn": "string", "resourceShareName": "string", "roleArn": "string", "s3BucketArn": "string", "sources": [ { ... } ], "subscriberArn": "string", "subscriberDescription": "string", "subscriberEndpoint": "string", "subscriberId": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string", "subscriberStatus": "string", "updatedAt": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Response Syntax API Version 2018-05-10 28 Amazon Security Lake subscriber API Reference Retrieve information about the subscriber created using the CreateSubscriber API. Type: SubscriberResource object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. Errors API Version 2018-05-10 29 Amazon Security Lake HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. API Reference HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 30 Amazon Security Lake API Reference CreateSubscriberNotification Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create |
amazonsecuritylake-api-009 | amazonsecuritylake-api.pdf | 9 | of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 30 Amazon Security Lake API Reference CreateSubscriberNotification Notifies the subscriber when new data is written to the data lake for the sources that the subscriber consumes in Security Lake. You can create only one subscriber notification per subscriber. Request Syntax POST /v1/subscribers/subscriberId/notification HTTP/1.1 Content-type: application/json { "configuration": { ... } } URI Request Parameters The request uses the following URI parameters. subscriberId The subscriber ID for the notification subscription. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request accepts the following data in JSON format. configuration Specify the configuration using which you want to create the subscriber notification. Type: NotificationConfiguration object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes CreateSubscriberNotification API Version 2018-05-10 31 API Reference Amazon Security Lake Response Syntax HTTP/1.1 200 Content-type: application/json { "subscriberEndpoint": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. subscriberEndpoint The subscriber endpoint to which exception messages are posted. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 Response Syntax API Version 2018-05-10 32 Amazon Security Lake ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 See Also API Version 2018-05-10 33 Amazon Security Lake • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 34 Amazon Security Lake API Reference DeleteAwsLogSource Removes a natively supported AWS service as an Amazon Security Lake source. You can remove a source for one or more Regions. When you remove the source, Security Lake stops collecting data from that source in the specified Regions and accounts, and subscribers can no longer consume new data from the source. However, subscribers can still consume data that Security Lake collected from the source before removal. You can choose any source type in any AWS Region for either accounts that are part of a trusted organization or standalone accounts. Request Syntax POST /v1/datalake/logsources/aws/delete HTTP/1.1 Content-type: application/json { "sources": [ { "accounts": [ "string" ], "regions": [ "string" ], "sourceName": "string", "sourceVersion": "string" } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. sources Specify the natively-supported AWS service to remove as a source in Security Lake. Type: Array of AwsLogSourceConfiguration objects DeleteAwsLogSource API Version 2018-05-10 35 Amazon Security Lake API Reference Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "failed": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. failed Deletion of the AWS sources failed as the account is not a part of the organization. Type: Array of strings Length Constraints: Fixed length of |
amazonsecuritylake-api-010 | amazonsecuritylake-api.pdf | 10 | remove as a source in Security Lake. Type: Array of AwsLogSourceConfiguration objects DeleteAwsLogSource API Version 2018-05-10 35 Amazon Security Lake API Reference Array Members: Minimum number of 1 item. Maximum number of 50 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "failed": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. failed Deletion of the AWS sources failed as the account is not a part of the organization. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 Response Syntax API Version 2018-05-10 36 Amazon Security Lake BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 See Also API Version 2018-05-10 37 Amazon Security Lake • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 38 Amazon Security Lake API Reference DeleteCustomLogSource Removes a custom log source from Amazon Security Lake, to stop sending data from the custom source to Security Lake. Request Syntax DELETE /v1/datalake/logsources/custom/sourceName?sourceVersion=sourceVersion HTTP/1.1 URI Request Parameters The request uses the following URI parameters. sourceName The source name of custom log source that you want to delete. Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: ^[\w\-\_\:\.]*$ Required: Yes sourceVersion The source version for the third-party custom source. You can limit the custom source removal to the specified source version. Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^[A-Za-z0-9\-\.\_]*$ Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 DeleteCustomLogSource API Version 2018-05-10 39 Amazon Security Lake Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 Response Elements API Version 2018-05-10 40 Amazon Security Lake ThrottlingException API Reference The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go |
amazonsecuritylake-api-011 | amazonsecuritylake-api.pdf | 11 | 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 Response Elements API Version 2018-05-10 40 Amazon Security Lake ThrottlingException API Reference The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 41 Amazon Security Lake DeleteDataLake API Reference When you disable Amazon Security Lake from your account, Security Lake is disabled in all AWS Regions and it stops collecting data from your sources. Also, this API automatically takes steps to remove the account from Security Lake. However, Security Lake retains all of your existing settings and the resources that it created in your AWS account in the current AWS Region. The DeleteDataLake operation does not delete the data that is stored in your Amazon S3 bucket, which is owned by your AWS account. For more information, see the Amazon Security Lake User Guide. Request Syntax POST /v1/datalake/delete HTTP/1.1 Content-type: application/json { "regions": [ "string" ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. regions The list of Regions where Security Lake is enabled. Type: Array of strings Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: Yes DeleteDataLake API Version 2018-05-10 42 Amazon Security Lake Response Syntax HTTP/1.1 200 Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 Response Syntax API Version 2018-05-10 43 Amazon Security Lake ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException API Reference The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 44 Amazon Security Lake API Reference DeleteDataLakeExceptionSubscription Deletes the specified notification subscription in Amazon Security Lake for the organization you specify. Request Syntax DELETE /v1/datalake/exceptions/subscription HTTP/1.1 URI Request Parameters The request does not use any URI parameters. Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 DeleteDataLakeExceptionSubscription API Version 2018-05-10 45 Amazon Security Lake BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP |
amazonsecuritylake-api-012 | amazonsecuritylake-api.pdf | 12 | to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 DeleteDataLakeExceptionSubscription API Version 2018-05-10 45 Amazon Security Lake BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 See Also API Version 2018-05-10 46 Amazon Security Lake • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 47 Amazon Security Lake API Reference DeleteDataLakeOrganizationConfiguration Turns off automatic enablement of Amazon Security Lake for member accounts that are added to an organization in AWS Organizations. Only the delegated Security Lake administrator for an organization can perform this operation. If the delegated Security Lake administrator performs this operation, new member accounts won't automatically contribute data to the data lake. Request Syntax POST /v1/datalake/organization/configuration/delete HTTP/1.1 Content-type: application/json { "autoEnableNewAccount": [ { "region": "string", "sources": [ { "sourceName": "string", "sourceVersion": "string" } ] } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. autoEnableNewAccount Turns off automatic enablement of Security Lake for member accounts that are added to an organization. Type: Array of DataLakeAutoEnableNewAccountConfiguration objects Array Members: Minimum number of 1 item. DeleteDataLakeOrganizationConfiguration API Version 2018-05-10 48 Amazon Security Lake Required: No Response Syntax HTTP/1.1 200 Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. Response Syntax API Version 2018-05-10 49 Amazon Security Lake HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException API Reference The limit on the number of requests per second was exceeded. HTTP Status Code: 429 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 50 Amazon Security Lake DeleteSubscriber API Reference Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes |
amazonsecuritylake-api-013 | amazonsecuritylake-api.pdf | 13 | SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 50 Amazon Security Lake DeleteSubscriber API Reference Deletes the subscription permission and all notification settings for accounts that are already enabled in Amazon Security Lake. When you run DeleteSubscriber, the subscriber will no longer consume data from Security Lake and the subscriber is removed. This operation deletes the subscriber and removes access to data in the current AWS Region. Request Syntax DELETE /v1/subscribers/subscriberId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. subscriberId A value created by Security Lake that uniquely identifies your DeleteSubscriber API request. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. DeleteSubscriber API Version 2018-05-10 51 Amazon Security Lake AccessDeniedException API Reference You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 52 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 53 Amazon Security Lake API Reference DeleteSubscriberNotification Deletes the specified subscription notification in Amazon Security Lake for the organization you specify. Request Syntax DELETE /v1/subscribers/subscriberId/notification HTTP/1.1 URI Request Parameters The request uses the following URI parameters. subscriberId The ID of the Security Lake subscriber account. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. DeleteSubscriberNotification API Version 2018-05-10 54 Amazon Security Lake AccessDeniedException API Reference You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 55 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.