diff --git a/.gitignore b/.gitignore index 9f54310..50d2fa1 100644 --- a/.gitignore +++ b/.gitignore @@ -143,4 +143,5 @@ build CD.sh PUB.sh CREATE.sh -tsconfig.tsbuildinfo \ No newline at end of file +tsconfig.tsbuildinfo +.idea/ diff --git a/STUDYPORTALS.md b/STUDYPORTALS.md index 0b5b36f..a9d9bda 100644 --- a/STUDYPORTALS.md +++ b/STUDYPORTALS.md @@ -19,6 +19,8 @@ Run `sam build --region us-east-1` to build the infrastructure consisting of an Run `sam package --region us-east-1 --s3-bucket devops-sam-deployments-us-east-1 --output-template-file packaged.yaml` to prepare for deployment +Run `sam publish --template packaged.yaml --region us-east-1` + Deploy it with `sam deploy --stack-name portal-experiments --region us-east-1 --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND --parameter-overrides BucketNameParameter="portal-experiments" AlternateDomainNames="portal-experiments.studyportals.xyz" --s3-bucket devops-sam-deployments-us-east-1` Take note of the `UserPoolId` and `CognitoAuthDomain` and proceed further diff --git a/template.yaml b/template.yaml index 2bcfd02..0929890 100644 --- a/template.yaml +++ b/template.yaml @@ -148,7 +148,7 @@ Resources: Properties: CodeUri: src/lambda-edge/check-auth/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaEdgeExecutionRole.Arn Timeout: 5 @@ -157,7 +157,7 @@ Resources: Properties: CodeUri: src/lambda-edge/parse-auth/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaEdgeExecutionRole.Arn Timeout: 5 @@ -166,7 +166,7 @@ Resources: Properties: CodeUri: src/lambda-edge/refresh-auth/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaEdgeExecutionRole.Arn Timeout: 5 @@ -175,7 +175,7 @@ Resources: Properties: CodeUri: src/lambda-edge/http-headers/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaEdgeExecutionRole.Arn Timeout: 5 @@ -184,7 +184,7 @@ Resources: Properties: CodeUri: src/lambda-edge/sign-out/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaEdgeExecutionRole.Arn Timeout: 5 @@ -337,7 +337,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/user-pool-domain/ Handler: index.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Policies: - Version: "2012-10-17" Statement: @@ -373,7 +373,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/user-pool-client/ Handler: index.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Policies: - Version: "2012-10-17" Statement: @@ -396,7 +396,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/client-secret-retrieval/ Handler: index.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Policies: - Version: "2012-10-17" Statement: @@ -418,7 +418,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/static-site/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Timeout: 180 MemorySize: 2048 Policies: @@ -457,7 +457,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/react-app/ Handler: bundle.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Timeout: 180 MemorySize: 2048 Policies: @@ -682,7 +682,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/lambda-code-update/ Handler: index.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Role: !GetAtt LambdaCodeUpdateHandlerRole.Arn @@ -698,7 +698,7 @@ Resources: Properties: CodeUri: src/cfn-custom-resources/generate-secret/ Handler: index.handler - Runtime: nodejs12.x + Runtime: nodejs16.x Outputs: S3Bucket: