Skip to content

Commit a8d338c

Browse files
committed
feat: install boto3 for system Python in EC2 user-data script
1 parent 764b458 commit a8d338c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • infrastructure/lambdas/process_build

infrastructure/lambdas/process_build/index.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,14 @@ def _generate_user_data(build_id, arch, python_version, requirements, single_fil
230230
231231
# --- Install Docker and CloudWatch Agent ---
232232
echo "$(date): Installing Docker and CloudWatch Agent..."
233-
dnf install -y docker git aws-cli amazon-cloudwatch-agent 2>/dev/null || yum install -y docker git aws-cli
233+
dnf install -y docker git aws-cli amazon-cloudwatch-agent python3-pip 2>/dev/null || yum install -y docker git aws-cli python3-pip
234234
systemctl start docker
235235
systemctl enable docker
236236
237+
# --- Install boto3 for system Python (AL2023 aws-cli v2 uses its own isolated Python) ---
238+
echo "$(date): Installing boto3 for system Python..."
239+
pip3 install boto3 --quiet
240+
237241
# --- Configure CloudWatch Logs streaming ---
238242
echo "$(date): Configuring CloudWatch Logs streaming..."
239243
mkdir -p /opt/aws/amazon-cloudwatch-agent/etc

0 commit comments

Comments
 (0)