Skip to content

Commit a8e410a

Browse files
authored
Merge pull request #48 from kazmer97/feat/agentic-idp
feat(agentic idp): First version of agentic IDP using strands
2 parents ab7e48f + 7d2902a commit a8e410a

File tree

32 files changed

+18528
-6762
lines changed

32 files changed

+18528
-6762
lines changed

.dockerignore

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Git
2+
.git
3+
.gitignore
4+
.gitlab-ci.yml
5+
6+
# AWS SAM build artifacts
7+
.aws-sam/
8+
**/.aws-sam/
9+
10+
# Python
11+
__pycache__/
12+
*.py[cod]
13+
*$py.class
14+
*.so
15+
.Python
16+
env/
17+
venv/
18+
.venv/
19+
*.egg-info/
20+
dist/
21+
build/
22+
*.egg
23+
24+
# IDE
25+
.vscode/
26+
.idea/
27+
*.swp
28+
*.swo
29+
*~
30+
.DS_Store
31+
32+
# Documentation
33+
docs/
34+
*.md
35+
LICENSE
36+
NOTICE
37+
CONTRIBUTING.md
38+
CHANGELOG.md
39+
40+
# Test files
41+
tests/
42+
**/tests/
43+
**/test_*.py
44+
**/*_test.py
45+
pytest.ini
46+
.coverage
47+
htmlcov/
48+
49+
# Node (for UI components)
50+
node_modules/
51+
npm-debug.log
52+
yarn-error.log
53+
54+
# Temporary files
55+
*.log
56+
*.tmp
57+
*.temp
58+
.cache/
59+
tmp/
60+
temp/
61+
62+
# Build scripts and configs
63+
samconfig*.toml
64+
template.yaml
65+
template-*.yaml
66+
Makefile
67+
publish.py
68+
publish_container*.py
69+
deploy*.py
70+
update_templates.py
71+
72+
# Notebooks and samples
73+
notebooks/
74+
samples/
75+
76+
# CloudFormation packaged templates
77+
**/*.packaged.yaml
78+
**/packaged.yaml
79+
80+
# Docker files we don't need in context
81+
Dockerfile*
82+
docker-compose*.yml
83+
84+
# Other unnecessary files for Lambda
85+
images/
86+
scripts/
87+
memory-bank/
88+
*.xlsx
89+
*.pdf
90+
*.png
91+
*.jpg
92+
*.jpeg
93+
*.gif
94+
*.ico
95+
96+
# Keep only source code and requirements
97+
!patterns/*/src/**
98+
!lib/idp_common_pkg/**
99+
!src/lambda/**

CHANGELOG.md

Lines changed: 68 additions & 27 deletions
Large diffs are not rendered by default.

Dockerfile.optimized

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Optimized Dockerfile for Lambda functions with minimal dependencies
2+
# This builds each function with ONLY the dependencies it needs
3+
4+
FROM public.ecr.aws/lambda/python:3.12-arm64 AS builder
5+
6+
# Copy uv from official distroless image
7+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
8+
9+
# Build argument for function path
10+
ARG FUNCTION_PATH
11+
ARG INSTALL_IDP_COMMON=true
12+
13+
# Create working directory
14+
WORKDIR /build
15+
16+
# Copy idp_common_pkg and requirements for installation
17+
COPY lib/idp_common_pkg /tmp/idp_common_pkg
18+
COPY ${FUNCTION_PATH}/requirements.txt* /build/
19+
20+
# Install all dependencies including idp_common_pkg in one step
21+
RUN --mount=type=cache,target=/root/.cache/uv \
22+
if [ -f /build/requirements.txt ]; then \
23+
sed 's|^\.\./\.\.\(/\.\.\)\?/lib/idp_common_pkg|/tmp/idp_common_pkg|' /build/requirements.txt > /tmp/requirements.txt && \
24+
uv pip install --python python3.12 --target /opt/python -r /tmp/requirements.txt && \
25+
rm /tmp/requirements.txt; \
26+
fi && \
27+
rm -rf /tmp/idp_common_pkg
28+
29+
# Final stage - minimal runtime
30+
FROM public.ecr.aws/lambda/python:3.12-arm64
31+
32+
# Copy only the installed packages
33+
COPY --from=builder /opt/python /opt/python
34+
35+
# Copy function code
36+
ARG FUNCTION_PATH
37+
COPY ${FUNCTION_PATH}/*.py ${LAMBDA_TASK_ROOT}/
38+
39+
# Set Python path
40+
ENV PYTHONPATH=/opt/python:${LAMBDA_TASK_ROOT}
41+
42+
# Set handler
43+
CMD ["index.handler"]

0 commit comments

Comments
 (0)