# Technical Infrastructure

The Toknox application infrastructure leverages AWS services to create a robust, scalable, and secure environment for deploying services. By utilizing AWS ECS for container orchestration and automating the deployment process with AWS CodePipeline, we ensure efficient resource management and rapid delivery of updates. This document’s part outlines the setup and configuration of the infrastructure components, including source control, build, and deployment stages, as well as security and monitoring practices.

<figure><img src="/files/6U7y6dE4SVCxfFoXAuaJ" alt=""><figcaption></figcaption></figure>

Toknox utilizes GitHub, adopting a Git Flow-like strategy for source control, which is central to managing code versions, supporting feature development, releases, and bug fixes. This setup is integrated with AWS CodePipeline, automating the continuous integration and delivery process that begins with code changes in GitHub triggering the pipeline through a webhook. AWS CodeBuild takes over to compile the code, run tests, and build Docker images according to specifications in a buildspec.yml file, while also pushing these images to Amazon Elastic Container Registry (ECR) for secure hosting. Deployment is handled by AWS ECS, using Fargate to abstract the underlying infrastructure, pulling Docker images from ECR to run in a scalable environment. All these operations are safeguarded within a protected Virtual Private Cloud, ensuring isolation and security, with AWS RDS managing the database layer for high availability and resilience.

## Advantages of Using This Structure <a href="#advantages-of-using-this-structure" id="advantages-of-using-this-structure"></a>

1. Automation and Efficiency: The CI/CD pipeline automates the entire build and deployment process, reducing manual interventions and speeding up the release cycle.
2. Scalability: ECS and Fargate provide robust scaling options, automatically adjusting resources based on application demand, ensuring high availability and performance.
3. Security: The use of IAM roles, VPCs, and security groups ensures secure access control and networking configurations, protecting the application and data.
4. Monitoring and Logging: Integration with AWS CloudWatch enables comprehensive monitoring and logging, providing insights into application performance and facilitating quick issue resolution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://toknox.gitbook.io/toknox.docs/protocol-architecture/technical-infrastructure.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
