This repository was archived by the owner on May 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 6161 path ('files' , views .search_file , name = 'file-search' ),
6262 path ('file-signed-url' , views .sign_s3_file , name = 'file-signed-url' ),
6363 path ('storage-stats' , views .storage_stats , name = 'storage-stats' ),
64+ # we mirror the API surface at /iam/ - and set that path up in sls with an IAM authorizer as opposed to a JWT one
65+ path ('iam/' , include (router .urls )),
66+ # the main API surface authenticated using JWTs
6467 path ('' , include (router .urls )),
6568]
6669
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ provider:
2121 iam :
2222 role : ${ssm:/data_portal/backend/lambda_iam_role_arn}
2323 endpointType : regional
24+ logs :
25+ httpApi : true
2426 httpApi :
2527 disableDefaultEndpoint : true
2628 payload : ' 2.0'
@@ -89,6 +91,17 @@ functions:
8991 path : /{proxy+}
9092 method : POST
9193 authorizer : cognitoJwtAuthorizer
94+ # we mirror the API onto /iam/* and allow IAM access
95+ - httpApi :
96+ path : /iam/{proxy+}
97+ method : GET
98+ authorizer :
99+ type : aws_iam
100+ - httpApi :
101+ path : /iam/{proxy+}
102+ method : POST
103+ authorizer :
104+ type : aws_iam
92105 timeout : 28
93106
94107 migrate :
@@ -300,6 +313,8 @@ custom:
300313 app : data_portal.wsgi.application
301314 packRequirements : false
302315 pythonRequirements :
316+ # lambci don't seem to be updating their images so there is currently no python 3.9 without using custom
317+ dockerImage : mlupin/docker-lambda:python3.9-build
303318 dockerizePip : non-linux
304319 layer : true
305320 zip : false
You can’t perform that action at this time.
0 commit comments