AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Configuring AWS PrivateLink and Dedicated Deployments to Connect Devin to Self-Hosted GitLab

Ong Lay Hoon · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Deploying an autonomous software engineering agent into an enterprise engineering ecosystem forces platform engineering and DevSecOps leaders to resolve an immediate tension: granting an AI agent comprehensive access to proprietary source repositories, internal artifact registries (such as JFrog Artifactory or AWS CodeArtifact), and private staging environments, while adhering to zero-trust network isolation that strictly forbids exposing internal infrastructure to the public internet.

For organizations running self-hosted GitLab (GitLab Self-Managed 15.0+) and internal development resources within strictly shielded AWS Virtual Private Clouds (VPCs), conventional SaaS integrations based on public IP allowlisting fail internal security audits. 365Finds evaluates Cognition's Customer Dedicated Deployment paired with AWS PrivateLink as the enterprise standard for bridging this divide. This architecture establishes private, unidirectional network conduits entirely across the AWS backbone, ensuring zero public ingress while maintaining strict multi-tenant boundary isolation.

This guide provides a comprehensive architecture blueprint and deployment playbook for platform engineering and DevSecOps teams to implement Customer Dedicated Deployments, configure AWS PrivateLink, connect self-hosted GitLab, and evaluate alternative models like Devin Connect and Devin Outposts.


Architectural Decoupling: The Brain vs. The Devbox

Understanding how Devin interacts with enterprise infrastructure requires dissecting its two decoupled core components:

┌──────────────────────────────────────────────────────────────┐
│                    Cognition Cloud (Azure)                   │
│                                                              │
│                      ┌────────────────┐                      │
│                      │   The Brain    │                      │
│                      │ (Stateless AI) │                      │
│                      └───────┬────────┘                      │
└──────────────────────────────┼───────────────────────────────┘
                               │ Outbound WebSocket (TLS 443)
                               ▼
┌──────────────────────────────────────────────────────────────┐
│       Cognition Customer Dedicated Tenant (AWS VPC)          │
│                                                              │
│   ┌──────────────────────────────────────────────────────┐   │
│   │                     The Devbox                       │   │
│   │        (Single-Tenant Execution Sandbox)             │   │
│   │       [Shell / Code Editor / Browser Runtime]        │   │
│   └──────────────────────────┬───────────────────────────┘   │
│                              │                               │
│                Interface VPC Endpoint (ENI)                  │
└──────────────────────────────┼───────────────────────────────┘
                               │ AWS PrivateLink Backbone
                               ▼
┌──────────────────────────────────────────────────────────────┐
│                     Customer AWS VPC                         │
│                                                              │
│              VPC Endpoint Service & NLB                      │
│                              │                               │
│       ┌──────────────────────┼───────────────────────┐       │
│       ▼                      ▼                       ▼       │
│ ┌────────────┐        ┌─────────────┐        ┌─────────────┐ │
│ │ Self-Hosted│        │  Internal   │        │   Private   │ │
│ │   GitLab   │        │ Artifactory │        │   Staging   │ │
│ └────────────┘        └─────────────┘        └─────────────┘ │
└──────────────────────────────────────────────────────────────┘
  1. The Brain (Cognition Cloud): A centralized, stateless compound AI orchestrator hosted within Cognition's cloud infrastructure (running on Azure). It manages high-level reasoning, multi-step planning, tool selection, and model inference. The Brain contains no persistent codebase storage.
  2. The Devbox (Customer Dedicated VPC): An auto-scaling, tenant-isolated virtual sandbox hosted by Cognition in a single-tenant AWS VPC dedicated exclusively to your organization. This is where Devin clones source code, executes build scripts, runs unit test suites, and operates interactive developer tools.

The Decoupled Communication Channel


Step-by-Step AWS PrivateLink Interconnect Configuration

AWS PrivateLink enables private IP connectivity from Cognition’s dedicated tenant VPC to services located in your AWS accounts without traversing the internet.

Step 1: Provision a Network Load Balancer (NLB) in the Customer VPC

Place an AWS Network Load Balancer (NLB) in your internal subnets across multiple Availability Zones (AZs) directly fronting your self-hosted GitLab instance.

Step 2: Create an AWS VPC Endpoint Service

Create an AWS VPC Endpoint Service that designates your newly provisioned NLB as its service target:

# Obtain your NLB ARN
NLB_ARN="arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/net/gitlab-internal-nlb/1234567890abcdef"

# Create the VPC Endpoint Service
aws ec2 create-vpc-endpoint-service-configuration \
    --network-load-balancer-arns $NLB_ARN \
    --no-acceptance-required \
    --region us-east-1

Note the generated Endpoint Service Name (for example: com.amazonaws.vpce.us-east-1.vpce-svc-0123456789abcdef0).

Step 3: Enable Cross-Region Support (If Applicable)

If your enterprise GitLab resides in a different AWS region (e.g., us-east-1) than Cognition's dedicated deployment tenant (e.g., us-west-2), cross-region consumption must be enabled on the service configuration:

aws ec2 modify-vpc-endpoint-service-configuration \
    --service-id vpce-svc-0123456789abcdef0 \
    --add-supported-regions us-west-2

Step 4: Authorize Cognition's AWS Account Principal

Grant Cognition's dedicated tenant AWS account permission to discover and attach to your Endpoint Service:

# Cognition will supply their designated AWS Account ID during tenant onboarding
COGNITION_ACCOUNT_ID="YOUR_COGNITION_DEDICATED_ACCOUNT_ID"

aws ec2 modify-vpc-endpoint-service-permissions \
    --service-id vpce-svc-0123456789abcdef0 \
    --add-allowed-principals arn:aws:iam::${COGNITION_ACCOUNT_ID}:root

Step 5: Interface VPC Endpoint Provisioning & Private DNS Mapping

Transmit the following parameters to your Cognition technical onboarding team:

What Cognition Provisions:

  1. Creates an Interface VPC Endpoint within your dedicated tenant VPC.
  2. Initiates the connection request (auto-accepted or manually approved in your VPC console).
  3. Configures private DNS zones inside the Devin dedicated tenant environment so that requests to gitlab.corp.internal.example.com resolve directly to the private IP addresses of the Interface VPC Endpoint.

[!TIP] Gateway Load Balancer (GWLB) for Egress Inspection: If corporate security mandates deep packet inspection for all traffic originating from third-party tenants, deploy an AWS Gateway Load Balancer (GWLB) fronting next-generation firewalls (such as Palo Alto VM-Series or Zscaler Cloud Connector). Route Devin's PrivateLink traffic through the GWLB before forwarding requests to GitLab.


Integrating Self-Hosted GitLab (v15.0+) with Devin

Once network connectivity is established over PrivateLink, configure authentication, repository synchronization, and real-time event webhooks within GitLab and the Devin Enterprise console.

1. Provision a Dedicated GitLab Service Account

To maintain strict auditability, create a dedicated machine identity rather than binding Devin to an individual developer's personal account:

  1. Navigate to your target GitLab Group -> Settings -> Service Accounts.
  2. Create a new service account designated for Devin (e.g., svc-devin-agent).
  3. Navigate to Group Members and add svc-devin-agent with the appropriate role:
    • Developer: Sufficient for Devin to clone repositories, inspect issues, commit code, and push Merge Requests (MRs).
    • Maintainer: Recommended if you require Devin to automatically configure repository-level webhooks and manage pipeline feedback.
    • Owner: Required only if configuring group-level webhooks across GitLab Ultimate/Premium groups.

2. Generate a Scoped Personal Access Token (PAT)

Generate a scoped token for the service account:

  1. Under the newly created service account, open Manage access tokens -> Generate a new personal access token.
  2. Select the api scope (grants read/write access to repository operations, merge requests, and project metadata).
  3. Securely store the generated token.

3. Register the GitLab Connection in Devin Enterprise

  1. In the Devin Enterprise web interface, navigate to Enterprise Settings -> Connections -> GitLab.
  2. Add a new connection and supply:
    • GitLab Host URL: Your private GitLab domain (e.g., https://gitlab.corp.internal.example.com).
    • Personal Access Token: The scoped token from Step 2.
  3. Devin verifies network reachability over PrivateLink and validates API authentication.

4. Configure Real-Time Webhooks

Webhooks allow Devin to respond immediately to repository events without relying on inefficient background polling:

  1. In Devin's GitLab Connection panel, open the Webhook configuration dialog to retrieve the unique Webhook URL and Secret Token.
  2. In GitLab (at the Group or Project level), navigate to Settings -> Webhooks.
  3. Create a new webhook with the provided endpoint and secret token, selecting the following triggers:
    • Merge request events (triggers Devin code reviews and iterative feedback loops).
    • Comments (enables @Devin interactive commands within MR discussion threads).
    • Push events (updates internal context when commits land).
    • Issues events (allows Devin to automatically convert backlog tickets into draft MRs).
    • Pipeline events (allows Devin to analyze CI/CD failures and propose automatic fixes).

5. Repository Permission Delegation and User Identity Linking


Architectural Comparison: Direct PrivateLink vs. Devin Connect vs. Devin Outposts

Platform architects must decide how to handle private VPC connectivity as the number of internal services scales. Cognition provides three distinct patterns:

Evaluation DimensionDedicated Deployment + Direct PrivateLinkDevin Connect (Gateway Mode)Devin Outposts (Self-Hosted Runner)
Execution Sandbox (Devbox)Cognition-managed Single-Tenant AWS VPCCognition-managed Single-Tenant AWS VPCCustomer-managed Infrastructure (K8s / EC2)
Brain LocationCognition CloudCognition CloudCognition Cloud
Network Path to GitLabDirect AWS PrivateLink to NLB per domainSingle HTTP CONNECT Gateway proxy via PrivateLink or Reverse TunnelLocal network routing inside customer VPC
Network ExposureZero public exposure; AWS backbone onlyZero inbound exposure; outbound tunnel or single PrivateLinkZero inbound exposure; worker initiates outbound HTTPS only
Operational OverheadLow (AWS native L4 infrastructure)Low-to-Medium (deploy and maintain 1 container image)High (orchestrate VM/container fleets, sandboxing, disk cleanup)
Supported ProtocolsL4 TCP (HTTPS, SSH, custom ports)HTTP CONNECT for TLS/HTTP; IPv4 CIDR rules for raw TCPAny protocol supported on customer host
Multi-Service ScalabilityRequires 1 NLB + Endpoint Service per domainHigh: One gateway multiplexes arbitrary internal domainsHigh: Local VPC DNS resolves all internal endpoints
SIEM & Audit LoggingAWS VPC Flow Logs, NLB CloudWatch logsGateway emits structured JSON logs (conn_open, conn_close, deny)Host-level daemon logs and container runtime auditing
365Finds Institutional RatingRecommended (1–3 Internal Services)Recommended (4+ Internal Services / Heterogeneous VPCs)Not Recommended for General Enterprise Adoption

365Finds Institutional Evaluation & Recommendations

  1. The Case for Direct PrivateLink (Default Choice): For enterprises whose primary objective is integrating Devin with self-hosted GitLab and a central artifact registry (such as Artifactory), Direct PrivateLink with native NLBs is our unequivocal recommendation. It requires no long-running intermediary proxy containers, introduces virtually zero latency overhead, operates on native AWS managed infrastructure, and maintains fail-closed network boundaries.

  2. When to Deploy Devin Connect: Deploy Devin Connect when your engineering toolchain is fragmented across dozens of internal endpoints—e.g., self-hosted GitLab, Jira Server, SonarQube, Confluence, multiple staging APIs, and internal package indexes. Instead of creating 10+ distinct NLBs and VPC Endpoint Services, Devin Connect allows you to run a single, lightweight, default-deny HTTP CONNECT proxy in your VPC. Using Devin Connect over PrivateLink consolidates routing while preserving end-to-end TLS encryption and granular hostname allowlists.

  3. Why 365Finds Cautions Against Devin Outposts: Devin Outposts appeals to teams seeking absolute isolation by running execution workers on customer Kubernetes clusters. However, 365Finds advises against choosing Outposts simply out of security anxiety. Running an autonomous agent worker on self-hosted infrastructure shifts immense operational toil onto platform engineers: managing ephemeral sandbox lifecycles, ensuring secure rootless container isolation, provisioning headless Chromium/X11 display servers for browser tools, and handling disk hygiene between sessions. Because Devin's Brain remains in Cognition's cloud regardless, Outposts does not eliminate external AI control-plane dependencies. Customer Dedicated Deployment via PrivateLink delivers enterprise-grade tenant isolation without turning your platform team into an internal VM sandbox vendor.


Enterprise DevSecOps Governance and Verification Checklist

Before opening Devin to broad engineering cohorts, DevSecOps teams should validate compliance across five pillars:

┌───────────────────────────────────────────────────────────────────────┐
│                     Enterprise DevSecOps Checklist                    │
├───────────────────────────────────┬───────────────────────────────────┤
│ Security Control                  │ Implementation Requirement        │
├───────────────────────────────────┼───────────────────────────────────┤
│ Workstation Access                │ Allowlist *.devinapps.com (443)   │
│ Data Encryption & Retention       │ TLS 1.3 / AWS KMS CMK / Zero Ret. │
│ SCM Access Scoping                │ Service Account Developer/Maint.  │
│ Branch Protection                 │ Human Approval on Protected Main  │
│ Network Egress Control            │ Strict Default-Deny Security Prof │
└───────────────────────────────────┴───────────────────────────────────┘

1. Developer Workstation Network Accessibility

Devin’s interactive IDE (VS Code frontend) and live Desktop session viewers stream via iframes hosted on *.devinapps.com. Corporate firewalls, Zscaler/Netskope web proxies, or VPN client profiles on developer laptops must explicitly allowlist *.devinapps.com over HTTPS (port 443). Blocking this domain allows Devin to complete headless tasks but breaks interactive developer oversight.

2. Encryption and Customer Managed Keys (CMK)

Under Cognition's SOC 2 Type II certified controls, data is encrypted in transit and at rest. Strategic enterprises requiring compliance with FIPS 140-2 or financial regulations should request Enterprise Assured Deployment, which introduces Customer Managed Keys (CMK) backed by your AWS Key Management Service (KMS), allowing instant revocation of data at rest within your dedicated tenant.

3. Zero Data Retention (ZDR) Guarantees

By default, Cognition does not train foundation models on enterprise customer code or session inputs. Under the dedicated deployment agreement, all session execution artifacts, ephemeral files, and logs remain strictly within your tenant boundary.

4. Branch Protection and Pull Request Governance

Never permit the Devin service account to bypass repository branch rules:

5. Outbound Egress Guardrails

Configure Devin Security Profiles within the admin console. Set strict egress filtering allowlists within the dedicated tenant VPC so Devboxes cannot communicate with unauthorized external endpoints while executing untrusted open-source dependencies.


References