DEV Community

Mike Anderson
Mike Anderson

Posted on Edited on

From Git Commit to Production: Building a Secure Cloud-Native Platform with AWS, Cloudflare, EKS, and Istio Ambient

Image_complete_example

The image describes Atlas Commerce, a fictional e-commerce platform deployed on AWS. It follows two connected journeys: how engineers deliver a new application version, and how a customer request reaches the application.

The design uses Cloudflare for public DNS, WAF, CDN and tunnel connectivity. AWS hosts the application and supporting services. Amazon EKS runs the workloads, while Istio ambient mode provides workload identity, service-to-service mTLS and selected Layer 7 traffic controls.

The architecture is a proposed design, not evidence of an existing deployment. The traffic weights, identities and connectivity shown are examples that would need to be configured and validated.

A more fresh view is here:

Atlas Commerce – Istio Ambient Mode

View full-resolution architecture diagram

Open the full-resolution diagram to explore the individual components, network boundaries and traffic flows.

1. The problem Atlas Commerce needs to solve

Imagine that a customer opens Atlas Commerce, searches for a product and places an order.

That seemingly simple action crosses several systems:

  1. The customer’s browser needs to find the application.
  2. Malicious requests should be filtered before they reach AWS.
  3. The application must remain private rather than expose its load balancer directly to the internet.
  4. The Frontend, Order and other services must communicate securely.
  5. The application must read and write data without exposing database or AWS credentials.
  6. Engineers must be able to release new versions without sending every customer to an untested version immediately.
  7. The operations team must be able to detect failures and investigate them.

The image connects these concerns into one architecture. It does not require every customer request to pass through every component: the delivery pipeline, customer traffic, private access and monitoring are different paths with different purposes.

Part 1: From a code change to production

Image-02

2. A developer submits an application change

The journey starts when a developer changes the Atlas Commerce application and opens a pull request in GitHub.

For example, the developer may add a new order-confirmation feature. Before that change becomes available to customers, the team wants to answer several questions:

  • Does the code compile?
  • Do the unit and integration tests pass?
  • Did the change introduce a known vulnerable dependency?
  • Did someone accidentally commit a secret?
  • Was the change reviewed by the right people?

GitHub stores the source code and the proposed changes. Repository rules, pull-request reviews and required checks establish the first control point before a change reaches production.

3. GitHub Actions builds and validates the application

When the configured workflow runs, GitHub Actions performs the application build and validation.

A typical pipeline for Atlas Commerce could:

  1. Check out the application source.
  2. Install dependencies.
  3. Run linting and automated tests.
  4. Perform static analysis and dependency checks.
  5. Build the application container image.
  6. Scan the image and produce supply-chain evidence.
  7. Publish the approved image to Amazon ECR.

Amazon ECR is the container image registry. It stores the image; it does not run the application.

The image digest identifies the exact built artifact. Referencing the digest makes it possible to promote the same image from staging to production without rebuilding it at each stage.

The diagram simplifies the pipeline. The actual checks, approval policies, image signing and credential configuration would need to be defined in the workflows.

4. GitOps tells the cluster what to run

Image-04

After a successful build, the delivery process opens a separate change to the GitOps repository, updating the desired image reference.

That distinction matters:

  • The application repository contains application source code.
  • The GitOps repository contains the desired Kubernetes configuration.
  • Amazon ECR contains the container image.

Once the GitOps change is approved, Argo CD compares the desired configuration in Git with the live state in EKS and reconciles the application according to its sync configuration.

If Helm is used, Argo CD can render the Helm chart into Kubernetes manifests and manage the application lifecycle. Helm and Argo CD therefore serve different purposes: Helm packages and templates the manifests; Argo CD reconciles the desired state.

5. Terraform builds the underlying AWS platform

Image-05

Terraform appears in a separate lane because it manages infrastructure, not the customer request.

An infrastructure engineer might change a VPC route, add a private endpoint or update an EKS node group. A proposed workflow is:

Terraform change
   → Review and validation
   → Terraform plan
   → Approval
   → Terraform apply
   → AWS infrastructure update
Enter fullscreen mode Exit fullscreen mode

Terraform uses authenticated AWS API calls to create or update resources such as VPCs, subnets, IAM roles, EKS components and supporting infrastructure.

The remote Terraform state must be protected because it contains information about managed infrastructure and can contain sensitive values. The image does not establish the actual state-backend security settings; those must be configured and reviewed.

Part 2: A customer reaches Atlas Commerce

6. Cloudflare receives the customer request

A customer enters the Atlas Commerce hostname in a browser.

The browser first performs a DNS lookup. DNS tells the client where to connect; it is not itself the path through which the application request is proxied.

The browser then sends an HTTPS request to Cloudflare Edge, where the configured services can provide:

  • WAF inspection.
  • DDoS protection.
  • CDN caching for appropriate content.
  • TLS termination for the customer connection.

For example, a cacheable product image may be served from Cloudflare without reaching the application. A personalized checkout request should normally be forwarded to the application rather than stored in a shared cache, unless a carefully reviewed caching policy says otherwise.

7. Cloudflare Tunnel connects to the private AWS origin

For a request that needs the application, Cloudflare forwards the request through Cloudflare Tunnel.

The connector, cloudflared, runs inside the AWS environment. It initiates outbound connections to Cloudflare and keeps them available for requests and responses.

The logical customer request path is:

Customer
   → Cloudflare Edge
   → Cloudflare Tunnel
   → cloudflared
   → Internal NLB A
   → Istio ingress gateway
   → Frontend application
Enter fullscreen mode Exit fullscreen mode

The response follows the reverse logical path:

Frontend application
   → Istio ingress gateway
   → Internal NLB A
   → cloudflared
   → Cloudflare Tunnel
   → Cloudflare Edge
   → Customer
Enter fullscreen mode Exit fullscreen mode

The customer does not connect directly to the private NLB. Cloudflare uses the connections already established by cloudflared to reach the private origin.

Where NAT and the Internet Gateway fit

The diagram separately shows how cloudflared establishes its outbound tunnel connection:

cloudflared in a private subnet
   → Public NAT Gateway
   → Internet Gateway
   → Cloudflare
Enter fullscreen mode Exit fullscreen mode

The NAT Gateway is in a public subnet. The Internet Gateway is attached to the VPC boundary. The private subnet needs a route to the NAT Gateway, and the public subnet needs a route to the Internet Gateway.

The established connection carries tunnel traffic in both directions. NAT is not an application hop between the NLB and the Kubernetes pod.

8. Internal NLB A forwards traffic to the public-route gateway

After receiving the request from the tunnel, cloudflared connects to internal NLB A.

Despite being associated with the customer-facing route, the NLB is private. “Public route” describes where the request originated; it does not mean the NLB has to be internet-facing.

In the selected design, the NLB forwards TCP traffic to the Istio ingress gateway. The gateway handles the configured TLS and application routing.

The deployment would need to define and verify:

  • Which connector sources can reach NLB A.
  • The NLB target type and gateway health checks.
  • TLS certificates and hostname validation between cloudflared and the gateway.
  • Gateway capacity, scaling and failure behavior.

Part 3: Private callers use a separate route

9. On-premises and internal VPC access

Not every caller needs to enter through the public Cloudflare path.

An approved internal service or on-premises system can use a separate private route:

On-premises / internal VPC caller
   → Configured VPN, Direct Connect or VPC connectivity
   → Transit Gateway, where applicable
   → Internal NLB B
   → Private-route Istio ingress gateway
   → Authorized application
Enter fullscreen mode Exit fullscreen mode

NLB B and the private ingress gateway are separate entry points. This allows the platform team to apply different access policies, scale the gateways independently and reduce the impact of a change to one ingress path.

The private route does not pass through Cloudflare WAF. It therefore needs its own network restrictions, authentication, authorization and monitoring. Private connectivity alone does not prove that a caller is authorized.

Separate gateways also do not make the two paths fully independent: they still depend on shared application workloads and data services.

Part 4: The AWS network

Let's understand it first with very simple concept:

AWS Network

10. Why the architecture uses three VPCs

The design separates workloads by purpose:

VPC CIDR Responsibility
Application VPC 10.20.0.0/16 EKS workloads, private ingress and application data services.
Shared Services VPC 10.30.0.0/16 Shared internal platform services and approved internal callers.
Observability VPC 10.40.0.0/16 Monitoring backends and operational visibility.

This separation helps establish different network boundaries and access policies. It does not automatically make the workloads secure: routes, security groups, Kubernetes policies and service authorization still need to be configured.

11. How the VPCs communicate

Image-11

An AWS Transit Gateway connects the VPCs through separate attachments.

For example, an application workload may need to reach a monitoring endpoint in the Observability VPC. Its subnet route table must send the relevant destination CIDR to the Transit Gateway. The Transit Gateway must then have a suitable route to the destination attachment, and the destination must have a valid return path.

The important distinction is:

A route establishes a possible network path. Security controls determine which connections are allowed to use that path.

The diagram is a high-level view. Transit Gateway route-table associations, propagation, subnet routes and return routes must be designed and tested explicitly.

Part 5: Inside Amazon EKS and Istio ambient mode

Image-5.2

Image-5.3

12. Where the application actually runs

The application runs in Kubernetes pods on EKS worker nodes in private subnets.

The image distinguishes:

  • The AWS-managed EKS control plane, which manages Kubernetes control-plane services.
  • The worker nodes, which provide compute capacity.
  • The pods, which contain the Atlas Commerce application containers.

The Frontend, Order Service and other application components are workloads within the cluster. Amazon RDS is a separate managed database service in the Application VPC’s data subnets; it is not an EKS pod.

13. Why Istio ambient mode is used

Atlas Commerce needs services to communicate securely without requiring every application team to build its own certificate and mTLS implementation.

The selected design uses Istio ambient mode. Its key components are:

Component Role
ztunnel Node-level proxy providing the ambient Layer 4 security overlay.
Waypoint proxy Envoy-based proxy for selected Layer 7 capabilities, such as HTTP routing and policy.
Istiod Istio control plane that distributes configuration and supports workload certificate management.
Ingress gateway Handles traffic entering the mesh from the internal NLBs.

Unlike the sidecar model, ambient mode does not require an Envoy sidecar inside every application pod.

14. How Frontend talks to Order

Suppose the Frontend needs order information from the Order Service.

For a destination enrolled to use a waypoint, the conceptual path is:

Frontend pod
   → Source-node ztunnel
   → Order waypoint, when enrolled
   → Destination-node ztunnel
   → Order pod
Enter fullscreen mode Exit fullscreen mode

The ambient proxies use HBONE with mTLS for the relevant proxy-to-proxy connections. The waypoint applies configured Layer 7 rules for the traffic it receives.

The application-to-local-ztunnel redirection should not be described as a separate remote HBONE mTLS session. The protected connections are between the relevant ambient proxies.

A critical identity detail

When a waypoint is in the path:

  • The waypoint can evaluate the Frontend workload identity on the incoming connection.
  • The destination ztunnel sees the waypoint identity on the next connection.

That matters when writing authorization policies. A policy that expects the destination ztunnel to see the original Frontend identity may behave differently from what the engineer intended.

Part 6: Canary deployments and identity

15. How the waypoint supports a canary release

Suppose the team releases a new Frontend version.

Rather than immediately sending all traffic to the new version, an HTTP routing rule could specify:

90% → Frontend v1: stable
10% → Frontend v2: canary
Enter fullscreen mode Exit fullscreen mode

For traffic that actually reaches the waypoint, the waypoint applies the configured Layer 7 split and forwards requests to the appropriate version-specific backend.

The waypoint does not build the image, create the pods or decide by itself whether the release is successful. A human or a properly configured progressive-delivery controller must assess the release and coordinate changes to the routing weights.

There is an important configuration condition: ingress traffic does not automatically traverse the destination waypoint. If the public or private ingress path must use the waypoint’s canary rules, that path must be explicitly enabled and verified for the selected Istio version.

A waypoint also needs an appropriate authorization policy if bypassing it would bypass a mandatory Layer 7 security control.

16. SPIFFE, SVID and workload identity

The diagram shows workload identity alongside ambient mTLS.

A SPIFFE ID is an identity URI associated with a workload identity. An example for the Frontend is:

spiffe://cluster.local/ns/application/sa/frontend
Enter fullscreen mode Exit fullscreen mode

An X.509-SVID is a certificate that carries the SPIFFE ID in its URI Subject Alternative Name. The associated key and certificate allow the proxy to prove the identity during mTLS.

These are distinct from:

  • The customer’s login or JWT.
  • The pod’s AWS IAM permissions.
  • The application version number.

For example, stable and canary pods can share the same workload identity if they use the same Kubernetes ServiceAccount. A new version does not automatically receive a new SPIFFE identity.

Part 7: Database and AWS service access

17. The Order Service reads and writes data

When the Order Service needs database information, it connects to Amazon RDS for PostgreSQL:

Order Service
   → SQL request
   → RDS PostgreSQL
   → SQL result
   → Order Service
Enter fullscreen mode Exit fullscreen mode

The database is in isolated data subnets, separate from the EKS cluster.

Database TLS must be configured separately. Istio ambient mTLS between meshed application workloads should not be assumed to automatically provide PostgreSQL TLS to RDS.

A Multi-AZ database configuration can improve resilience, but it does not by itself guarantee zero downtime or zero data loss for every failure scenario.

18. How the pod gets AWS permissions

The application may also need AWS services—for example, a secret from Secrets Manager or an invoice from S3.

The proposed design uses EKS Pod Identity:

Application pod
   → Kubernetes ServiceAccount
   → EKS Pod Identity association
   → Scoped IAM role
   → Temporary credentials
   → AWS SDK request
Enter fullscreen mode Exit fullscreen mode

The Pod Identity Agent and EKS Auth service supply temporary credentials for the associated role. The application uses a supported AWS SDK to obtain and use those credentials.

The customer does not inherit this IAM role. The application must first decide whether that customer is allowed to perform the business action, then use its own workload permissions to access AWS.

19. Reading an encrypted object from S3

Suppose the customer requests an invoice stored in a private S3 bucket using SSE-KMS.

The intended flow is:

  1. The application authenticates the customer.
  2. It verifies that the customer is allowed to access that invoice.
  3. The application calls S3 using its workload IAM role.
  4. S3 checks the applicable authorization.
  5. S3 uses AWS KMS as part of the server-side decryption process.
  6. S3 returns the object to the application over TLS.
  7. The application returns the authorized content to the customer.

The application needs the applicable s3:GetObject and KMS permissions. For SSE-KMS, S3 performs the server-side decryption; the application does not receive the KMS key and manually decrypt the stored object.

The diagram also shows Secrets Manager and private endpoint concepts. Their endpoint, IAM, resource-policy and KMS configurations are implementation details that still need to be defined.

Part 8: Operations and failure handling

20. What happens when a release or component fails?

The image includes monitoring and operational controls because building the request path is only part of operating the platform.

A production implementation should be able to answer questions such as:

  • Is a cloudflared connector healthy?
  • Is the tunnel healthy but the application behind it failing?
  • Are the Istio gateways receiving traffic across AZs?
  • Did the canary increase error rate or latency?
  • Can an unauthorized workload bypass the waypoint?
  • Are S3, Secrets Manager or KMS authorization errors causing failures?
  • Can the application recover when an AZ or database component fails?

Useful signals include application request rate, latency, error rate, gateway and proxy resource usage, database health, queue depth and certificate expiry.

The image shows a target for resilience; it does not prove that replica placement, HPA, PodDisruptionBudgets, alerts, failover or recovery tests have been implemented.

21. The complete story in one example

A new Order Service version starts as a pull request. GitHub Actions tests and builds it, then publishes an image to ECR. An approved GitOps change references that image, and Argo CD reconciles the desired state into EKS.

The customer opens Atlas Commerce. Cloudflare receives the request, applies the configured edge controls and forwards the request through the established tunnel to the private AWS origin. The internal NLB and Istio ingress gateway lead the request to the application.

When the Frontend calls Order, Istio ambient uses workload identity and mTLS for the enrolled service path. A waypoint can apply the configured HTTP routing rule, including a canary split, if the relevant traffic is routed through it.

The Order Service reads or writes PostgreSQL data, returns a response, and the response travels back through the gateway, tunnel and Cloudflare to the customer.

Throughout that journey, the platform uses different identities for different purposes:

  • Customer identity: what the customer is allowed to do.
  • Istio workload identity: which service is communicating in the mesh.
  • AWS IAM role: which AWS resources the workload may access.

That separation is central to the security model: a network path, a service identity and a customer’s authorization are related, but each answers a different question.

Top comments (0)