File tree Expand file tree Collapse file tree 14 files changed +91
-19
lines changed
Expand file tree Collapse file tree 14 files changed +91
-19
lines changed Original file line number Diff line number Diff line change 44
55npm run generate-dependencies --workspaces --if-present
66
7- $root_dir /lambdas/layers/pdfjs/package .sh
7+ $root_dir /lambdas/layers/pdfjs/build .sh
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ if [ -z "$SKIP_SANDBOX_INSTALL" ]; then npm ci; fi
44
55npm run generate-dependencies --workspaces --if-present
66
7- $root_dir /lambdas/layers/pdfjs/package .sh
7+ $root_dir /lambdas/layers/pdfjs/build .sh
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ No requirements.
3737| <a name =" module_get_template_lambda " ></a > [ get\_ template\_ lambda] ( #module\_ get\_ template\_ lambda ) | ../lambda-function | n/a |
3838| <a name =" module_lambda_copy_scanned_object_to_internal " ></a > [ lambda\_ copy\_ scanned\_ object\_ to\_ internal] ( #module\_ lambda\_ copy\_ scanned\_ object\_ to\_ internal ) | ../lambda-function | n/a |
3939| <a name =" module_lambda_delete_failed_scanned_object " ></a > [ lambda\_ delete\_ failed\_ scanned\_ object] ( #module\_ lambda\_ delete\_ failed\_ scanned\_ object ) | ../lambda-function | n/a |
40+ | <a name =" module_lambda_layer_pdfjs " ></a > [ lambda\_ layer\_ pdfjs] ( #module\_ lambda\_ layer\_ pdfjs ) | ../lambda_layer | n/a |
4041| <a name =" module_lambda_set_file_virus_scan_status " ></a > [ lambda\_ set\_ file\_ virus\_ scan\_ status] ( #module\_ lambda\_ set\_ file\_ virus\_ scan\_ status ) | ../lambda-function | n/a |
4142| <a name =" module_lambda_validate_letter_template_files " ></a > [ lambda\_ validate\_ letter\_ template\_ files] ( #module\_ lambda\_ validate\_ letter\_ template\_ files ) | ../lambda-function | n/a |
4243| <a name =" module_list_template_lambda " ></a > [ list\_ template\_ lambda] ( #module\_ list\_ template\_ lambda ) | ../lambda-function | n/a |
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33
44 monorepo_root = abspath (" ${ path . module } /../../../.." )
55 lambdas_source_code_dir = abspath (" ${ local . monorepo_root } /lambdas" )
6- pdfjs_layer_filepath = abspath (" ${ local . lambdas_source_code_dir } /layers/pdfjs/dist/layer.zip " )
6+ pdfjs_layer_dir = abspath (" ${ local . lambdas_source_code_dir } /layers/pdfjs" )
77
88 openapi_spec = templatefile (" ${ path . module } /spec.tmpl.json" , {
99 AWS_REGION = var.region
Original file line number Diff line number Diff line change 1+ module "lambda_layer_pdfjs" {
2+ source = " ../lambda_layer"
3+ name = " ${ local . csi } -nodejs20-pdfjs-dist"
4+ description = " pdfjs-dist dependencies for nodejs20.x"
5+ layer_dir = local. pdfjs_layer_dir
6+ source_dir = " dist/layer"
7+ nodejs_runtime_version = " 20"
8+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module "lambda_validate_letter_template_files" {
77 filename = module. build_template_lambda . zips [local . backend_lambda_entrypoints . validate_letter_template_files ]. path
88 function_name = " ${ local . csi } -validate-letter-template-files"
99 handler = " validate-letter-template-files.handler"
10- layer_arns = [aws_lambda_layer_version . pdfjs . arn ]
10+ layer_arns = [module . lambda_layer_pdfjs . layer_arn ]
1111 log_retention_in_days = var. log_retention_in_days
1212 memory_size = 1024
1313 source_code_hash = module. build_template_lambda . zips [local . backend_lambda_entrypoints . validate_letter_template_files ]. base64sha256
Original file line number Diff line number Diff line change 1+ <!-- BEGIN_TF_DOCS -->
2+ <!-- markdownlint-disable -->
3+ <!-- vale off -->
4+
5+ ## Requirements
6+
7+ No requirements.
8+ ## Inputs
9+
10+ | Name | Description | Type | Default | Required |
11+ | ------| -------------| ------| ---------| :--------:|
12+ | <a name =" input_description " ></a > [ description] ( #input\_ description ) | Description of what your Lambda Layer does | ` string ` | n/a | yes |
13+ | <a name =" input_layer_dir " ></a > [ layer\_ dir] ( #input\_ layer\_ dir ) | Path to the root directory of the layer code | ` string ` | n/a | yes |
14+ | <a name =" input_name " ></a > [ name] ( #input\_ name ) | Unique name for your Lambda Layer | ` string ` | n/a | yes |
15+ | <a name =" input_nodejs_runtime_version " ></a > [ nodejs\_ runtime\_ version] ( #input\_ nodejs\_ runtime\_ version ) | Node.js runtime version | ` string ` | ` "20" ` | no |
16+ | <a name =" input_output_dir " ></a > [ output\_ dir] ( #input\_ output\_ dir ) | Name of the output directory (relative to layer\_ dir) | ` string ` | ` "dist" ` | no |
17+ | <a name =" input_source_dir " ></a > [ source\_ dir] ( #input\_ source\_ dir ) | Name of the source code directory (relative to layer\_ dir) | ` string ` | n/a | yes |
18+ ## Modules
19+
20+ No modules.
21+ ## Outputs
22+
23+ | Name | Description |
24+ | ------| -------------|
25+ | <a name =" output_layer_arn " ></a > [ layer\_ arn] ( #output\_ layer\_ arn ) | n/a |
26+ <!-- vale on -->
27+ <!-- markdownlint-enable -->
28+ <!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change 1+ data "archive_file" "zip" {
2+ type = " zip"
3+ output_path = " ${ var . layer_dir } /${ var . output_dir } /layer.zip"
4+ source_dir = " ${ var . layer_dir } /${ var . source_dir } "
5+ }
Original file line number Diff line number Diff line change 1+ resource "aws_lambda_layer_version" "lambda_layer" {
2+ layer_name = var. name
3+ description = var. description
4+ filename = data. archive_file . zip . output_path
5+ source_code_hash = data. archive_file . zip . output_base64sha256
6+ compatible_runtimes = [" nodejs${ var . nodejs_runtime_version } .x" ]
7+ }
You can’t perform that action at this time.
0 commit comments