Files
airun-pathfinder-crud-pricing/build.sh
James Bland e88609d724
All checks were successful
kinec.tech/airun-pathfinder-crud-pricing/pipeline/head This commit looks good
feat: crud-pricing initial implementation
Complete CRUD service for AWS pricing operations - single source of truth.

Features:
- Dual pricing model (retail + account-specific with auto EDP/PPA detection)
- Get/Put pricing operations with intelligent caching
- AWS Pricing API integration for public list prices
- AWS Cost Explorer integration for account-specific pricing
- Access counting for self-learning 14-day refresh
- Query most-accessed instances (powers smart refresh)
- TTL: 30 days (retail), 7 days (account-specific)

Architecture:
- All other lambdas use this for pricing operations
- No direct DynamoDB access from other components
- Consistent schema enforcement
- Complete IAM setup for Pricing API, Cost Explorer, STS

Infrastructure:
- Complete Terraform configuration
- Full CI/CD pipeline (Jenkinsfile)
- Comprehensive documentation
- Production-ready scaffolding

Part of Phase 1 - foundation for pricing system.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 04:20:56 -05:00

35 lines
897 B
Bash
Executable File

#!/bin/bash
set -e
echo "🔨 Building crud-pricing for ARM64 (Graviton)..."
# Check if cargo-lambda is installed
if ! command -v cargo-lambda &> /dev/null; then
echo "❌ 'cargo-lambda' is not installed. Installing..."
cargo install cargo-lambda
fi
# Check if cargo-audit is installed
if ! command -v cargo-audit &> /dev/null; then
echo "❌ 'cargo-audit' is not installed. Installing..."
cargo install cargo-audit
fi
# Run security audit before building
echo "🔒 Running security audit..."
cargo audit
# Build for Lambda (ARM64)
echo "📦 Compiling with cargo lambda..."
cargo lambda build --release --arm64 --output-format zip
echo "✅ Build complete: target/lambda/bootstrap/bootstrap.zip"
echo ""
echo "📊 Package size:"
ls -lh target/lambda/bootstrap/bootstrap.zip
echo ""
echo "Next steps:"
echo " cd terraform"
echo " terraform init"
echo " terraform apply"