File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG PYTHON_VERSION
2
2
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
3
3
4
- ARG PGSTAC_VERSION
5
- RUN echo "PGSTAC_VERSION: ${PGSTAC_VERSION}"
6
4
RUN echo "PYTHON_VERSION: ${PYTHON_VERSION}"
7
5
8
6
WORKDIR /tmp
9
7
10
- RUN pip install httpx psycopg[binary,pool] pypgstac==${PGSTAC_VERSION} -t /asset
8
+ RUN pip install httpx psycopg[binary,pool] pypgstac -t /asset
11
9
12
10
COPY bootstrapper_runtime/handler.py /asset/handler.py
13
11
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ export class PgStacDatabase extends Construct {
79
79
code : aws_lambda . Code . fromDockerBuild ( __dirname , {
80
80
file : "bootstrapper_runtime/Dockerfile" ,
81
81
buildArgs : {
82
- PGSTAC_VERSION : DEFAULT_PGSTAC_VERSION ,
83
- PYTHON_VERSION : "3.11" ,
82
+ PYTHON_VERSION : "3.11"
84
83
} ,
85
84
} ) ,
86
85
vpc : hasVpc ( this . db ) ? this . db . vpc : props . vpc ,
@@ -131,7 +130,7 @@ export class PgStacDatabase extends Construct {
131
130
132
131
// if props.lambdaFunctionOptions doesn't have 'code' defined, update pgstac_version (needed for default runtime)
133
132
if ( ! props . bootstrapperLambdaFunctionOptions ?. code ) {
134
- customResourceProperties [ "pgstac_version" ] = DEFAULT_PGSTAC_VERSION ;
133
+ customResourceProperties [ "pgstac_version" ] = props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
135
134
}
136
135
// this.connections = props.database.connections;
137
136
const bootstrapper = new CustomResource ( this , "bootstrapper" , {
@@ -226,6 +225,13 @@ export interface PgStacDatabaseProps extends rds.DatabaseInstanceProps {
226
225
*/
227
226
readonly pgstacDbName ?: string ;
228
227
228
+ /**
229
+ * Version of pgstac to install on the database
230
+ *
231
+ * @default 0.8.5
232
+ */
233
+ readonly pgstacVersion ?: string ;
234
+
229
235
/**
230
236
* Prefix to assign to the generated `secrets_manager.Secret`
231
237
*
You can’t perform that action at this time.
0 commit comments