From 25c3ef54ec95512a5ca0c779f901212410d09723 Mon Sep 17 00:00:00 2001
From: ghaymah_dev
Date: Tue, 18 Nov 2025 12:07:11 +0000
Subject: [PATCH] Add README.md
---
README.md | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..390ea80
--- /dev/null
+++ b/README.md
@@ -0,0 +1,89 @@
+
+
+**Lambda Exporter — AWS Lambda Functions Export Utility**
+
+This script exports all AWS Lambda functions (code and configuration) from your account to a local directory, for backup, migration, or auditing.
+
+---
+
+**Requirements**
+- Python 3.7+
+- `boto3`
+- AWS credentials configured (via CLI, environment variables, or IAM role)
+
+Install:
+```bash
+pip install boto3
+```
+
+---
+
+**Usage**
+
+1. **Default (uses default AWS profile and region `us-east-1`)**
+ ```python
+ exporter = LambdaExporter()
+ exporter.export_all_functions()
+ ```
+
+2. **Custom profile and region**
+ ```python
+ exporter = LambdaExporter(profile_name='my-profile', region_name='eu-west-1')
+ exporter.export_all_functions(base_dir='backups')
+ ```
+
+3. **Run directly**
+ Save as `lambda_exporter.py` and run:
+ ```bash
+ python lambda_exporter.py
+ ```
+
+---
+
+**Output Structure**
+```
+lambda_export/
+└── export_YYYYMMDD_HHMMSS/
+ ├── FunctionName1/
+ │ ├── configuration.json
+ │ └── [extracted source files...]
+ ├── FunctionName2/
+ │ ├── configuration.json
+ │ └── function_code.bin # if not a ZIP
+ └── export_summary.json
+```
+
+- ZIP-based functions are fully extracted.
+- `configuration.json` contains runtime, memory, timeout, env vars, role, etc.
+- `export_summary.json` logs total functions and success count.
+
+---
+
+**Required IAM Permissions**
+```json
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": [
+ "lambda:ListFunctions",
+ "lambda:GetFunction",
+ "lambda:GetFunctionConfiguration"
+ ],
+ "Resource": "*"
+ }
+ ]
+}
+```
+
+---
+
+**Important Notes**
+- The script is read-only — it does not modify any AWS resources.
+- Environment variables (including secrets) are included in `configuration.json`. Handle exports securely and avoid committing them to version control.
+- Pre-signed download URLs are used immediately, so expiration is not an issue for typical function sizes.
+
+---
+
+وصلى الله على نبينا محمد وعلى آله وصحبه وسلم
\ No newline at end of file