From 2cb83020d64b6994d42b6f59a489bc5633b5f234 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Tue, 22 Sep 2026 23:15:20 +0530 Subject: [PATCH 1/3] ci: force PyPI botocore so awslocal works on GitHub runners The GitHub-hosted runner ships a Debian de-vendored system botocore (python3-botocore, no botocore.vendored subpackage). pip treats boto3/botocore as already satisfied and never installs the PyPI build, so awslocal's unguarded 'from botocore.vendored.requests...' import in awscli's s3transfer fails with: ModuleNotFoundError: No module named 'botocore.vendored' This broke ~20 samples' 'make test-ci' at the awslocal step. Installing PyPI boto3/botocore into the user site shadows the system package and restores botocore.vendored. --- .github/workflows/test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22cf7e3..b1f7634 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,14 @@ jobs: node-version: 20 - name: Install LocalStack - run: pip install localstack awscli-local[ver1] virtualenv + run: | + pip install localstack awscli-local[ver1] virtualenv + # The runner's system python3-botocore is Debian de-vendored (no + # botocore.vendored), which breaks awslocal's awscli s3transfer import + # with "ModuleNotFoundError: No module named 'botocore.vendored'". + # Force the PyPI boto3/botocore into the user site so it shadows the + # system package and restores botocore.vendored. + pip install --upgrade boto3 botocore - name: Setup config run: | From 5ff64d3f83ae8a3c079a5306b8526e186f4d9e63 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Tue, 22 Sep 2026 23:16:42 +0530 Subject: [PATCH 2/3] Update test.yml --- .github/workflows/test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1f7634..d60e97c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,11 +41,6 @@ jobs: - name: Install LocalStack run: | pip install localstack awscli-local[ver1] virtualenv - # The runner's system python3-botocore is Debian de-vendored (no - # botocore.vendored), which breaks awslocal's awscli s3transfer import - # with "ModuleNotFoundError: No module named 'botocore.vendored'". - # Force the PyPI boto3/botocore into the user site so it shadows the - # system package and restores botocore.vendored. pip install --upgrade boto3 botocore - name: Setup config From eaf1ecb4d2b7a01017ea80aed845e86e0a9732ee Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Tue, 22 Sep 2026 23:38:04 +0530 Subject: [PATCH 3/3] elb-load-balancing: add second subnet so the ALB can be created Creating an AWS::ElasticLoadBalancingV2::LoadBalancer (ALB) requires at least two subnets in two different Availability Zones. The sample defined only one subnet, so 'make test-ci' failed at deploy with: CREATE_FAILED: LoadBalancer ... ValidationError: At least two subnets in two different Availability Zones must be specified Widen the VPC to /16 and add a second /24 subnet in AZ index 1, wiring both into the load balancer. Verified locally against LocalStack Pro: stack deploys and both ALB endpoints (/hello1, /hello2) return HTTP 200. --- elb-load-balancing/serverless.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/elb-load-balancing/serverless.yml b/elb-load-balancing/serverless.yml index 935f1d2..c2d69bd 100644 --- a/elb-load-balancing/serverless.yml +++ b/elb-load-balancing/serverless.yml @@ -33,6 +33,7 @@ resources: Name: lb-test-1 Subnets: - !Ref Subnet + - !Ref Subnet2 HTTPListener: Type: AWS::ElasticLoadBalancingV2::Listener Properties: @@ -53,12 +54,21 @@ resources: AvailabilityZone: !Select - 0 - Fn::GetAZs: !Ref "AWS::Region" + # An ALB requires at least two subnets in two different Availability Zones. + Subnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: 12.2.2.0/24 + AvailabilityZone: !Select + - 1 + - Fn::GetAZs: !Ref "AWS::Region" VPC: Type: AWS::EC2::VPC Properties: EnableDnsSupport: "true" EnableDnsHostnames: "true" - CidrBlock: 12.2.1.0/24 + CidrBlock: 12.2.0.0/16 plugins: - serverless-deployment-bucket