File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
44RUN echo "PYTHON_VERSION: ${PYTHON_VERSION}"
55
66WORKDIR /tmp
7-
8- RUN pip install httpx psycopg[binary,pool] pypgstac -t /asset
7+ ARG PGSTAC_VERSION
8+ RUN pip install httpx psycopg[binary,pool] pypgstac==${PGSTAC_VERSION} -t /asset
99
1010COPY bootstrapper_runtime/handler.py /asset/handler.py
1111
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class PgStacDatabase extends Construct {
6969 parameterGroup,
7070 ...props ,
7171 } ) ;
72-
72+ const pgstac_version = props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
7373 const handler = new aws_lambda . Function ( this , "lambda" , {
7474 // defaults
7575 runtime : aws_lambda . Runtime . PYTHON_3_11 ,
@@ -81,6 +81,7 @@ export class PgStacDatabase extends Construct {
8181 file : "bootstrapper_runtime/Dockerfile" ,
8282 buildArgs : {
8383 PYTHON_VERSION : "3.11" ,
84+ PGSTAC_VERSION : pgstac_version ,
8485 } ,
8586 } ) ,
8687 vpc : hasVpc ( this . db ) ? this . db . vpc : props . vpc ,
@@ -131,8 +132,7 @@ export class PgStacDatabase extends Construct {
131132
132133 // if props.lambdaFunctionOptions doesn't have 'code' defined, update pgstac_version (needed for default runtime)
133134 if ( ! props . bootstrapperLambdaFunctionOptions ?. code ) {
134- customResourceProperties [ "pgstac_version" ] =
135- props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
135+ customResourceProperties [ "pgstac_version" ] = pgstac_version ;
136136 }
137137
138138 // add timestamp to properties to ensure the Lambda gets re-executed on each deploy
You can’t perform that action at this time.
0 commit comments