A collection of reusable Terraform modules for building AWS infrastructure, optimized for serverless and containerized applications.
This package provides the following Terraform modules:
- ECR - Amazon Elastic Container Registry setup with lifecycle policies
- S3 - S3 bucket configuration with best practices
- VPC - VPC with public/private subnets and NAT gateway
- Redis - ElastiCache Redis cluster configuration
- Lambda Package - Lambda function packaging utilities
- Terraform >= 1.9.5
- AWS Provider >= 6.11.0
- Valid AWS credentials configured
Each module can be used independently by referencing it as a submodule:
# ECR Module
module "ecr" {
source = "yaalalabs/ak-common/aws//modules/ecr"
region = "us-west-2"
product_alias = "myapp"
env_alias = "prod"
module_name = "api"
source_path = "${path.module}/src"
}
# VPC Module
module "vpc" {
source = "yaalalabs/ak-common/aws//modules/vpc"
vpc_cidr = "10.0.0.0/16"
public_subnet_cidrs = ["10.0.1.0/24", "10.0.2.0/24"]
private_subnet_cidrs = ["10.0.3.0/24", "10.0.4.0/24"]
product_alias = "myapp"
env_alias = "prod"
}
# Redis Module
module "redis" {
source = "yaalalabs/ak-common/aws//modules/redis"
product_alias = "myapp"
env_alias = "prod"
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnet_ids
}
# S3 Module
module "s3" {
source = "yaalalabs/ak-common/aws//modules/s3"
product_alias = "myapp"
env_alias = "prod"
bucket_name = "my-application-data"
}
# Lambda Package Module
module "lambda_package" {
source = "yaalalabs/ak-common/aws//modules/lambda-package"
source_path = "${path.module}/lambda"
output_path = "${path.module}/dist/lambda.zip"
}Each module has its own comprehensive documentation:
- ECR Module Documentation
- S3 Module Documentation
- VPC Module Documentation
- Redis Module Documentation
- Lambda Package Module Documentation
| Name | Version |
|---|---|
| Terraform | >= 1.9.5 |
| AWS Provider | >= 6.11.0 |
# Create VPC for Lambda functions
module "vpc" {
source = "yaalalabs/ak-common/aws//modules/vpc"
product_alias = var.product_alias
env_alias = var.env_alias
}
# Create Redis cache
module "redis" {
source = "yaalalabs/ak-common/aws//modules/redis"
product_alias = var.product_alias
env_alias = var.env_alias
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnet_ids
}
# Create ECR and build container image
module "container_image" {
source = "yaalalabs/ak-common/aws//modules/ecr"
product_alias = var.product_alias
env_alias = var.env_alias
module_name = "api"
source_path = "${path.module}/src"
}
# Create S3 bucket for data storage
module "storage" {
source = "yaalalabs/ak-common/aws//modules/s3"
product_alias = var.product_alias
env_alias = var.env_alias
bucket_name = "application-data"
}Contributions are welcome! Please refer to the main repository for contribution guidelines.
This project is licensed under the terms specified in the LICENSE file.
- Agent Kernel - The main Agent Kernel project
For issues, questions, or contributions, please refer to the main repository's issue tracker.
This is a registry-compatible root module that contains no resources itself. All functionality is provided through submodules located in the modules/ directory. This structure allows for:
- Selective consumption: Use only the modules you need
- Independent versioning: Each module evolves independently
- Registry compatibility: Conforms to Terraform registry requirements
- Namespace isolation: Clean module paths via
//modules/<name>syntax
Important: Always reference modules using the //modules/<module-name> syntax as shown in the usage examples above.
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2025-2026 Yaala Labs.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.