File tree 2 files changed +5
-5
lines changed
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}
4
4
RUN echo "PYTHON_VERSION: ${PYTHON_VERSION}"
5
5
6
6
WORKDIR /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
9
9
10
10
COPY bootstrapper_runtime/handler.py /asset/handler.py
11
11
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class PgStacDatabase extends Construct {
69
69
parameterGroup,
70
70
...props ,
71
71
} ) ;
72
-
72
+ const pgstac_version = props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
73
73
const handler = new aws_lambda . Function ( this , "lambda" , {
74
74
// defaults
75
75
runtime : aws_lambda . Runtime . PYTHON_3_11 ,
@@ -81,6 +81,7 @@ export class PgStacDatabase extends Construct {
81
81
file : "bootstrapper_runtime/Dockerfile" ,
82
82
buildArgs : {
83
83
PYTHON_VERSION : "3.11" ,
84
+ PGSTAC_VERSION : pgstac_version ,
84
85
} ,
85
86
} ) ,
86
87
vpc : hasVpc ( this . db ) ? this . db . vpc : props . vpc ,
@@ -131,8 +132,7 @@ export class PgStacDatabase extends Construct {
131
132
132
133
// if props.lambdaFunctionOptions doesn't have 'code' defined, update pgstac_version (needed for default runtime)
133
134
if ( ! props . bootstrapperLambdaFunctionOptions ?. code ) {
134
- customResourceProperties [ "pgstac_version" ] =
135
- props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
135
+ customResourceProperties [ "pgstac_version" ] = pgstac_version ;
136
136
}
137
137
138
138
// 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