This Guidance demonstrates how to aggregate public, open-source code repositories into a central location to customize Amazon Q Developer. It provides a blueprint to create a new repository that is preconfigured with source code and a workflow to deploy into an AWS account. Each repository is checked for open-source providers (such as GitHub) for a new release. If a new release is available, a subsequent task is launched within a customer-managed virtual private cloud (VPC). It uses an image of the repository, downloads, and extracts the release archive into a storage bucket. The task updates the repository and a notification is sent. An Amazon Q customization can be trained using the repository archives, allowing developers to use AI-generated code suited to their coding language and style.

Please note: [Disclaimer]

Architecture Diagram

[Architecture diagram description]

Download the architecture diagram PDF 

Well-Architected Pillars

The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

  • The goal of operational excellence is to get new features and bug fixes into your hands quickly and reliably. EventBridge, Step Functions, Amazon SNS, and Lambda do this by helping you automate the process of downloading or extracting repository releases when available, and alerting you when a new version of an Amazon Q customization can be trained.  An EventBridge rule and a Step Functions workflow automatically check for new repository versions on a schedule, whereas the Lambda functions synchronize repository metadata. Finally, messages are published to an Amazon SNS topic for operational notifications.

    Read the Operational Excellence whitepaper 
  • AWS Identity and Access Management (IAM) is used to define roles and permission policies for resources deployed in this solution, and Amazon S3 is configured with policies to restrict access to outside entities. Roles and policies defined within IAM and Amazon S3 are critical for implementing least-privilege access, and limiting access to only what is needed.

    Read the Security whitepaper 
  • Step Functions has features like automated retries, error handling, and fault tolerance for minimizing failures. It also can help limit re-processing that can degrade performance. These capabilities minimize the likelihood and impact of disruptions, enhancing the overall resiliency of workflow orchestration.

    Read the Reliability whitepaper 
  • The Map state feature in Step Functions allows you to process steps concurrently instead of sequentially, significantly increasing throughput and performance for workloads that can be done in parallel. This enables faster processing time by doing multiple tasks at once, and as the list of repositories scales, the time it takes to process all repositories remains static.

    Read the Performance Efficiency whitepaper 
  • By using Fargate and Lambda to complete on-demand tasks, you can achieve significant cost efficiencies compared to self-managed Amazon Elastic Compute Cloud (Amazon EC2) deployments that accrue costs when idle. Fargate enables a serverless model with auto-scaling to reduce over-provisioning and minimize idle resources. With Lambda, you only pay for compute time when your functions execute. No need to provision and pay for Amazon EC2 instances that may be underutilized. With these serverless options, you can save significantly compared to traditional servers or virtual machines.

    Read the Cost Optimization whitepaper 
  • Both Fargate and Lambda are serverless, auto-scaling services that right-size usage to workload needs. This eliminates over-provisioning and idle resources, which reduces energy usage. The serverless auto-scaling nature, ephemeral infrastructure, and managed provider sustainability efforts of Lambda and Fargate help you to reduce waste, maximize utilization, and minimize the overall environmental footprint of your workloads.

    Read the Sustainability whitepaper 

Implementation Resources

The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.

[Content Type]


This [blog post/e-book/Guidance/sample code] demonstrates how [insert short description].


The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.

Was this page helpful?