This post captures the DevOpsSec outline for a GenAI platform designed to run securely and efficiently on AWS infrastructure. This document precedes deeper hands-on Terraform and terraform state analysis and will serve as the governance foundation for automation, monitoring, and compliance.
The platform includes a Hugging Face UI (TypeScript + Svelte) interacting via a LightLLM proxy with AWS Bedrock.
It is deployed to a managed EKS cluster (Elastic Kubernetes Service).
All infrastructure is managed through Terraform modules, following Infrastructure-as-Code (IaC) best practices for repeatability, reviewability, and automation.
2. Security and Compliance (Non-Functional Requirements)#
This section outlines DevSecOps controls that span the CI/CD pipeline, AWS resources, and Terraform configurations:
Identity & Access Management (IAM): Least-privilege roles for developers, deployers, and workloads.
Terraform state security: State files are encrypted, versioned, and stored in a remote backend with restricted access (e.g., S3 + DynamoDB + KMS).
Cluster Security: Hardened EKS nodes, restricted ingress via security groups and NACLs, and namespace-level RBAC.
Secret Management: Secrets are handled via AWS Secrets Manager or SSM Parameter Store—never hardcoded.
Audit and Compliance: CloudTrail, Config Rules, and periodic drift detection across IaC and live infra.
Terraform Access Control: Initial attempts to run terraform init revealed credential scoping issues. These will be resolved collaboratively with the client’s IAM admin.
Follow-Up Posts: Future posts will include:
Hands-on: analyzing terraform state
Module-by-module audit
IAM least-privilege patterns for Bedrock, Lambda, and EKS