11import {
2- Stack ,
3- aws_ec2 as ec2 ,
4- aws_lambda as lambda ,
5- aws_logs as logs ,
6- aws_rds as rds ,
7- aws_secretsmanager as secretsmanager ,
8- CfnOutput ,
9- Duration ,
10- } from "aws-cdk-lib" ;
11- import { IDomainName , HttpApi , ParameterMapping , MappingValue } from "@aws-cdk/aws-apigatewayv2-alpha" ;
12- import { HttpLambdaIntegration } from "@aws-cdk/aws-apigatewayv2-integrations-alpha" ;
13- import { Construct } from "constructs" ;
14- import { CustomLambdaFunctionProps } from "../utils" ;
2+ Stack ,
3+ aws_ec2 as ec2 ,
4+ aws_lambda as lambda ,
5+ aws_logs as logs ,
6+ aws_rds as rds ,
7+ aws_secretsmanager as secretsmanager ,
8+ CfnOutput ,
9+ Duration ,
10+ } from "aws-cdk-lib" ;
11+ import { IDomainName , HttpApi , ParameterMapping , MappingValue } from "@aws-cdk/aws-apigatewayv2-alpha" ;
12+ import { HttpLambdaIntegration } from "@aws-cdk/aws-apigatewayv2-integrations-alpha" ;
13+ import { Construct } from "constructs" ;
14+ import { CustomLambdaFunctionProps } from "../utils" ;
15+ import * as path from 'path' ;
1516
1617 export class TiPgApiLambda extends Construct {
1718 readonly url : string ;
@@ -27,9 +28,9 @@ import {
2728 memorySize : 1024 ,
2829 logRetention : logs . RetentionDays . ONE_WEEK ,
2930 timeout : Duration . seconds ( 30 ) ,
30- code : lambda . Code . fromDockerBuild ( __dirname , {
31- file : "runtime/Dockerfile" ,
32- buildArgs : { PYTHON_VERSION : '3.11' } ,
31+ code : lambda . Code . fromDockerBuild ( path . join ( __dirname , '..' ) , {
32+ file : "tipg-api/ runtime/Dockerfile" ,
33+ buildArgs : { PYTHON_VERSION : '3.11' } ,
3334 } ) ,
3435 vpc : props . vpc ,
3536 vpcSubnets : props . subnetSelection ,
0 commit comments