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 11ARG PYTHON_VERSION
22FROM --platform=linux/amd64 public.ecr.aws/lambda/python:${PYTHON_VERSION}
33
4- ARG PGSTAC_VERSION
5- RUN echo "PGSTAC_VERSION: ${PGSTAC_VERSION}"
64RUN echo "PYTHON_VERSION: ${PYTHON_VERSION}"
75
86WORKDIR /tmp
97
10- RUN pip install httpx psycopg[binary,pool] pypgstac==${PGSTAC_VERSION} -t /asset
8+ RUN pip install httpx psycopg[binary,pool] pypgstac -t /asset
119
1210COPY bootstrapper_runtime/handler.py /asset/handler.py
1311
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ export class PgStacDatabase extends Construct {
7979 code : aws_lambda . Code . fromDockerBuild ( __dirname , {
8080 file : "bootstrapper_runtime/Dockerfile" ,
8181 buildArgs : {
82- PGSTAC_VERSION : DEFAULT_PGSTAC_VERSION ,
83- PYTHON_VERSION : "3.11" ,
82+ PYTHON_VERSION : "3.11"
8483 } ,
8584 } ) ,
8685 vpc : hasVpc ( this . db ) ? this . db . vpc : props . vpc ,
@@ -131,7 +130,7 @@ export class PgStacDatabase extends Construct {
131130
132131 // if props.lambdaFunctionOptions doesn't have 'code' defined, update pgstac_version (needed for default runtime)
133132 if ( ! props . bootstrapperLambdaFunctionOptions ?. code ) {
134- customResourceProperties [ "pgstac_version" ] = DEFAULT_PGSTAC_VERSION ;
133+ customResourceProperties [ "pgstac_version" ] = props . pgstacVersion || DEFAULT_PGSTAC_VERSION ;
135134 }
136135 // this.connections = props.database.connections;
137136 const bootstrapper = new CustomResource ( this , "bootstrapper" , {
@@ -226,6 +225,13 @@ export interface PgStacDatabaseProps extends rds.DatabaseInstanceProps {
226225 */
227226 readonly pgstacDbName ?: string ;
228227
228+ /**
229+ * Version of pgstac to install on the database
230+ *
231+ * @default 0.8.5
232+ */
233+ readonly pgstacVersion ?: string ;
234+
229235 /**
230236 * Prefix to assign to the generated `secrets_manager.Secret`
231237 *
You can’t perform that action at this time.
0 commit comments