Skip to content

Commit 44638b3

Browse files
committed
Merge branch 'master' into MEP-LambdaDevX-LDM_base_samples
2 parents 3af9bff + de13f51 commit 44638b3

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyspark_env

emr-serverless-python-dependencies/Dockerfile-localstack

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ COPY . .
2222
## Build and export stages for standard Python projects
2323
## ----------------------------------------------------------------------------
2424
# Build stage - installs required dependencies and creates a venv package
25-
FROM base as build-poetry
26-
RUN poetry self add poetry-plugin-bundle && \
27-
poetry bundle venv dist/bundle
25+
FROM base AS build-poetry
26+
WORKDIR /app
27+
28+
RUN poetry self add [email protected]
29+
RUN poetry bundle venv /app/dist/bundle --clear
2830

29-
FROM scratch as export-poetry
31+
FROM scratch AS export-poetry
3032
COPY --from=build-poetry /app/dist/bundle /pyspark_env/

emr-serverless-python-dependencies/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-aws:
1414
docker build . --file Dockerfile-aws --output .
1515

1616
deploy:
17-
docker-compose up --detach
17+
docker compose up --detach
1818
terraform workspace select local
1919
AWS_ENDPOINT_URL=https://localhost.localstack.cloud:4566 terraform apply --auto-approve
2020

@@ -31,7 +31,11 @@ run-aws:
3131
./start_job.sh aws
3232

3333
stop:
34-
docker-compose down
34+
docker compose down
35+
36+
logs:
37+
@localstack logs > logs.txt
38+
cat logs.txt
3539

3640
destroy:
3741
terraform workspace select local
@@ -44,5 +48,5 @@ destroy-aws:
4448
terraform destroy --auto-approve
4549

4650
test-ci:
47-
make init build deploy run; return_code=`echo $$?`;\
48-
make stop; exit $$return_code;
51+
make init build deploy logs run; return_code=`echo $$?`;\
52+
make logs; make stop; exit $$return_code;

lambda-mounting-and-debugging/javascript/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Alternatively, you can use the following `localstack` CLI configuration:
2929

3030
```sh
3131
LAMBDA_DOCKER_FLAGS='-e NODE_OPTIONS=--inspect-brk=0.0.0.0:9229 -p 9229:9229' \
32-
LAMBDA_REMOTE_DOCKER=0 \
3332
localstack start -d
3433
```
3534

lambda-mounting-and-debugging/javascript/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ services:
99
- "127.0.0.1:4510-4559:4510-4559" # external services port range
1010
environment:
1111
- DEBUG=1
12-
- LAMBDA_REMOTE_DOCKER=0
1312
- LAMBDA_DOCKER_FLAGS=-e NODE_OPTIONS=--inspect-brk=0.0.0.0:9229 -p 9229:9229
1413
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
1514
- DOCKER_HOST=unix:///var/run/docker.sock

lambda-mounting-and-debugging/python/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ make install
2121
Make sure that LocalStack is started with the following configuration:
2222
```
2323
LOCALSTACK_AUTH_TOKEN=... \
24-
LAMBDA_REMOTE_DOCKER=0 \
2524
LAMBDA_DOCKER_FLAGS='-p 19891:19891' \
2625
DEBUG=1 localstack start
2726
```
2827

29-
Please note that `LAMBDA_REMOTE_DOCKER=0` needs to be configured in order to properly run the sample app (required for local Docker volume mounts).
30-
3128
The config option `LAMBDA_DOCKER_FLAGS='-p 19891:19891'` defines a Docker flag that exposes port `19891` for debugging the Lambda handler code that will run inside the container.
3229

3330
## Running the Sample

0 commit comments

Comments
 (0)