BBAWSLightsailMiniAIV1a
AI-enhanced AWS Lightsail Container Service deployment with AWS Bedrock integration.
Overview
BBAWSLightsailMiniAIV1a extends the base BBAWSLightsailMiniV1a stack to add AI capabilities through AWS Bedrock services. It provides infrastructure for AI-powered document processing, embeddings, and chat applications.
Features
- AI-Ready Infrastructure: AWS Bedrock integration for LLM and embedding models
- Document Processing: S3 storage with AI-optimized folder structure
- Training Data Management: Support for URL-based content ingestion
- Containerized Deployment: Lightsail Container Service with AI workloads
- Scalable Storage: S3 buckets for documents, embeddings, and processed content
Installation
pip install BBAWSLightsailMiniAIV1a
Quick Start
from cdktf import App
from BBAWSLightsailMiniAIV1a import BBAWSLightsailMiniAIV1a
app = App()
# Get archetype for configuration
archetype = BBAWSLightsailMiniAIV1a.get_archetype(
product='ai-app',
app='smart-docs',
tier='development',
organization='your-org',
region='us-east-1'
)
# Create AI-enhanced stack
ai_stack = BBAWSLightsailMiniAIV1a(
app, "my-ai-stack",
# Base configuration
project_name=archetype.get_project_name(),
environment=archetype.get_tier(),
region=archetype.get_region(),
secret_name=archetype.get_secret_name(),
profile="default",
# AI configuration
model="anthropic.claude-3-sonnet-20240229-v1:0",
training_urls=[
"https://docs.aws.amazon.com/bedrock/",
"https://your-docs.com"
]
)
archetype.set_stack(ai_stack)
app.synth()
Configuration
AI Models
The stack supports various AWS Bedrock models:
- Claude Models:
anthropic.claude-3-sonnet-20240229-v1:0,anthropic.claude-3-haiku-20240307-v1:0 - Titan Models:
amazon.titan-text-express-v1,amazon.titan-embed-text-v1 - Llama Models:
meta.llama2-13b-chat-v1,meta.llama2-70b-chat-v1
Training Data
Configure training URLs for document ingestion:
training_urls = [
"https://docs.aws.amazon.com/bedrock/",
"https://your-company.com/api-docs",
"https://your-company.com/knowledge-base"
]
Chunking Configuration
Customize document processing:
chunk_size = 2000 # Characters per chunk
chunk_overlap = 400 # Character overlap between chunks
Architecture
The AI stack creates:
-
S3 Buckets:
documents/- Raw document storageembeddings/- Processed embeddingstraining/- Training data from URLs
-
IAM Roles:
- Bedrock access permissions
- S3 read/write permissions
- Container service access
-
Lightsail Container Service:
- AI application deployment
- Auto-scaling configuration
- Custom domain support
Examples
Basic Deployment
# See examples/basic_deployment.py
Advanced Configuration
# See examples/advanced_deployment.py
Environment Variables
The following environment variables are available in your container:
AWS_BEDROCK_MODEL: The configured Bedrock modelAWS_BEDROCK_EMBEDDING_MODEL: The embedding modelS3_DOCUMENTS_BUCKET: Documents bucket nameS3_EMBEDDINGS_BUCKET: Embeddings bucket nameCHUNK_SIZE: Document chunk sizeCHUNK_OVERLAP: Chunk overlap size
Development
Building the Package
python prepare.py
python setup.py build
Running Tests
pytest tests/
Semantic Versioning
This package uses semantic-release for automated versioning:
semantic-release publish
Architecture Flags
Use architecture flags to customize deployment:
ArchitectureFlags = BBAWSLightsailMiniAIV1a.get_architecture_flags()
flags = [
ArchitectureFlags.SKIP_DATABASE._value_, # Skip database for AI-only workload
# Add other flags as needed
]
Dependencies
BBAWSLightsailMiniV1a>=1.0.0- Base Lightsail stackcdktf>=0.20.0- CDK for Terraformconstructs>=10.0.0- AWS CDK constructs
License
MIT License - see LICENSE file for details.
Support
For issues and questions:
- GitHub Issues: Repository issues
- Documentation: Full documentation
Changelog
See CHANGELOG.md for version history and changes.
Metadata
Release files for BBAWSLightsailMiniAIV1a 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bbawslightsailminiaiv1a-1.0.2.tar.gz | 9.0 kB | Without provenance | Details for bbawslightsailminiaiv1a-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bbawslightsailminiaiv1a-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for bbawslightsailminiaiv1a-1.0.2-py3-none-any.whl |
Total release size: 16.2 kB
Release files / bbawslightsailminiaiv1a-1.0.2.tar.gz
| Download URL | bbawslightsailminiaiv1a-1.0.2.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c68a9e0aface28999d6babe8648193f003758171c672eb3a3dc1ac09bc4ea6f8
|
|
BLAKE2b-256 checksum How to use checksums |
bf028f9cbe2a4d5073058fe61d2ec42324793eff1960821aab6987c6ea74b43b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.5
|
Release files / bbawslightsailminiaiv1a-1.0.2-py3-none-any.whl
| Download URL | bbawslightsailminiaiv1a-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d9e405828453d9e9de841d25736656e140720fa2bff9d44863e561283fa942c
|
|
BLAKE2b-256 checksum How to use checksums |
d3b9d56a3b45fd46c5feb7869759ec94d24e0aa66e0bd46db078e7b85acdfea0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.13.5
|
Security for BBAWSLightsailMiniAIV1a 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.