├── .eslintrc.json ├── .gitattributes ├── .github ├── pull_request_template.md └── workflows │ ├── build.yml │ ├── pull-request-lint.yml │ ├── release.yml │ └── upgrade-main.yml ├── .gitignore ├── .mergify.yml ├── .npmignore ├── .projen ├── deps.json ├── files.json └── tasks.json ├── .projenrc.ts ├── API.md ├── LICENSE ├── README.md ├── example ├── .gitignore ├── README.md ├── cdk.json ├── index.ts └── lambda │ ├── .llrt │ └── llrt-x64-no-sdk-bootstrap │ ├── ecs.ts │ ├── hono.ts │ ├── package-lock.json │ ├── package.json │ ├── s3.ts │ └── ssr.tsx ├── package.json ├── src ├── index.ts └── llrt-function.ts ├── test ├── integ.llrt-function.js.snapshot │ ├── LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets.json │ ├── LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.template.json │ ├── LlrtFunctionIntegTestTarget.assets.json │ ├── LlrtFunctionIntegTestTarget.template.json │ ├── asset.0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261 │ │ ├── bootstrap │ │ └── index.mjs │ ├── asset.3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d │ │ ├── bootstrap │ │ └── index.mjs │ ├── asset.b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4 │ │ ├── bootstrap │ │ └── index.mjs │ ├── asset.c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2 │ │ ├── bootstrap │ │ └── index.mjs │ ├── asset.ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf │ │ ├── bootstrap │ │ └── index.mjs │ ├── cdk.out │ ├── integ.json │ ├── manifest.json │ └── tree.json └── integ.llrt-function.ts ├── tsconfig.dev.json └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | // ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | { 3 | "env": { 4 | "jest": true, 5 | "node": true 6 | }, 7 | "root": true, 8 | "plugins": [ 9 | "@typescript-eslint", 10 | "import" 11 | ], 12 | "parser": "@typescript-eslint/parser", 13 | "parserOptions": { 14 | "ecmaVersion": 2018, 15 | "sourceType": "module", 16 | "project": "./tsconfig.dev.json" 17 | }, 18 | "extends": [ 19 | "plugin:import/typescript" 20 | ], 21 | "settings": { 22 | "import/parsers": { 23 | "@typescript-eslint/parser": [ 24 | ".ts", 25 | ".tsx" 26 | ] 27 | }, 28 | "import/resolver": { 29 | "node": {}, 30 | "typescript": { 31 | "project": "./tsconfig.dev.json", 32 | "alwaysTryTypes": true 33 | } 34 | } 35 | }, 36 | "ignorePatterns": [ 37 | "example/**/*", 38 | "test/assets/**/*", 39 | "test/*.snapshot/**/*", 40 | "*.d.ts", 41 | "!.projenrc.ts", 42 | "!projenrc/**/*.ts" 43 | ], 44 | "rules": { 45 | "indent": [ 46 | "off" 47 | ], 48 | "@typescript-eslint/indent": [ 49 | "error", 50 | 2 51 | ], 52 | "quotes": [ 53 | "error", 54 | "single", 55 | { 56 | "avoidEscape": true 57 | } 58 | ], 59 | "comma-dangle": [ 60 | "error", 61 | "always-multiline" 62 | ], 63 | "comma-spacing": [ 64 | "error", 65 | { 66 | "before": false, 67 | "after": true 68 | } 69 | ], 70 | "no-multi-spaces": [ 71 | "error", 72 | { 73 | "ignoreEOLComments": false 74 | } 75 | ], 76 | "array-bracket-spacing": [ 77 | "error", 78 | "never" 79 | ], 80 | "array-bracket-newline": [ 81 | "error", 82 | "consistent" 83 | ], 84 | "object-curly-spacing": [ 85 | "error", 86 | "always" 87 | ], 88 | "object-curly-newline": [ 89 | "error", 90 | { 91 | "multiline": true, 92 | "consistent": true 93 | } 94 | ], 95 | "object-property-newline": [ 96 | "error", 97 | { 98 | "allowAllPropertiesOnSameLine": true 99 | } 100 | ], 101 | "keyword-spacing": [ 102 | "error" 103 | ], 104 | "brace-style": [ 105 | "error", 106 | "1tbs", 107 | { 108 | "allowSingleLine": true 109 | } 110 | ], 111 | "space-before-blocks": [ 112 | "error" 113 | ], 114 | "curly": [ 115 | "error", 116 | "multi-line", 117 | "consistent" 118 | ], 119 | "@typescript-eslint/member-delimiter-style": [ 120 | "error" 121 | ], 122 | "semi": [ 123 | "error", 124 | "always" 125 | ], 126 | "max-len": [ 127 | "error", 128 | { 129 | "code": 150, 130 | "ignoreUrls": true, 131 | "ignoreStrings": true, 132 | "ignoreTemplateLiterals": true, 133 | "ignoreComments": true, 134 | "ignoreRegExpLiterals": true 135 | } 136 | ], 137 | "quote-props": [ 138 | "error", 139 | "consistent-as-needed" 140 | ], 141 | "@typescript-eslint/no-require-imports": [ 142 | "error" 143 | ], 144 | "import/no-extraneous-dependencies": [ 145 | "error", 146 | { 147 | "devDependencies": [ 148 | "**/test/**", 149 | "**/build-tools/**", 150 | ".projenrc.ts", 151 | "projenrc/**/*.ts" 152 | ], 153 | "optionalDependencies": false, 154 | "peerDependencies": true 155 | } 156 | ], 157 | "import/no-unresolved": [ 158 | "error" 159 | ], 160 | "import/order": [ 161 | "warn", 162 | { 163 | "groups": [ 164 | "builtin", 165 | "external" 166 | ], 167 | "alphabetize": { 168 | "order": "asc", 169 | "caseInsensitive": true 170 | } 171 | } 172 | ], 173 | "import/no-duplicates": [ 174 | "error" 175 | ], 176 | "no-shadow": [ 177 | "off" 178 | ], 179 | "@typescript-eslint/no-shadow": [ 180 | "error" 181 | ], 182 | "key-spacing": [ 183 | "error" 184 | ], 185 | "no-multiple-empty-lines": [ 186 | "error" 187 | ], 188 | "@typescript-eslint/no-floating-promises": [ 189 | "error" 190 | ], 191 | "no-return-await": [ 192 | "off" 193 | ], 194 | "@typescript-eslint/return-await": [ 195 | "error" 196 | ], 197 | "no-trailing-spaces": [ 198 | "error" 199 | ], 200 | "dot-notation": [ 201 | "error" 202 | ], 203 | "no-bitwise": [ 204 | "error" 205 | ], 206 | "@typescript-eslint/member-ordering": [ 207 | "error", 208 | { 209 | "default": [ 210 | "public-static-field", 211 | "public-static-method", 212 | "protected-static-field", 213 | "protected-static-method", 214 | "private-static-field", 215 | "private-static-method", 216 | "field", 217 | "constructor", 218 | "method" 219 | ] 220 | } 221 | ] 222 | }, 223 | "overrides": [ 224 | { 225 | "files": [ 226 | ".projenrc.ts" 227 | ], 228 | "rules": { 229 | "@typescript-eslint/no-require-imports": "off", 230 | "import/no-extraneous-dependencies": "off" 231 | } 232 | } 233 | ] 234 | } 235 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | * text=auto eol=lf 4 | *.snap linguist-generated 5 | /.eslintrc.json linguist-generated 6 | /.gitattributes linguist-generated 7 | /.github/pull_request_template.md linguist-generated 8 | /.github/workflows/build.yml linguist-generated 9 | /.github/workflows/pull-request-lint.yml linguist-generated 10 | /.github/workflows/release.yml linguist-generated 11 | /.github/workflows/upgrade-main.yml linguist-generated 12 | /.gitignore linguist-generated 13 | /.mergify.yml linguist-generated 14 | /.npmignore linguist-generated 15 | /.projen/** linguist-generated 16 | /.projen/deps.json linguist-generated 17 | /.projen/files.json linguist-generated 18 | /.projen/tasks.json linguist-generated 19 | /API.md linguist-generated 20 | /LICENSE linguist-generated 21 | /package.json linguist-generated 22 | /tsconfig.dev.json linguist-generated 23 | /yarn.lock linguist-generated -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Fixes # -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | name: build 4 | on: 5 | pull_request: {} 6 | workflow_dispatch: {} 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | permissions: 11 | contents: write 12 | outputs: 13 | self_mutation_happened: ${{ steps.self_mutation.outputs.self_mutation_happened }} 14 | env: 15 | CI: "true" 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | ref: ${{ github.event.pull_request.head.ref }} 21 | repository: ${{ github.event.pull_request.head.repo.full_name }} 22 | - name: Setup Node.js 23 | uses: actions/setup-node@v4 24 | with: 25 | node-version: 18.x 26 | - name: Install dependencies 27 | run: yarn install --check-files 28 | - name: build 29 | run: npx projen build 30 | - name: Find mutations 31 | id: self_mutation 32 | run: |- 33 | git add . 34 | git diff --staged --patch --exit-code > repo.patch || echo "self_mutation_happened=true" >> $GITHUB_OUTPUT 35 | working-directory: ./ 36 | - name: Upload patch 37 | if: steps.self_mutation.outputs.self_mutation_happened 38 | uses: actions/upload-artifact@v4.4.0 39 | with: 40 | name: repo.patch 41 | path: repo.patch 42 | overwrite: true 43 | - name: Fail build on mutation 44 | if: steps.self_mutation.outputs.self_mutation_happened 45 | run: |- 46 | echo "::error::Files were changed during build (see build log). If this was triggered from a fork, you will need to update your branch." 47 | cat repo.patch 48 | exit 1 49 | - name: Backup artifact permissions 50 | run: cd dist && getfacl -R . > permissions-backup.acl 51 | continue-on-error: true 52 | - name: Upload artifact 53 | uses: actions/upload-artifact@v4.4.0 54 | with: 55 | name: build-artifact 56 | path: dist 57 | overwrite: true 58 | self-mutation: 59 | needs: build 60 | runs-on: ubuntu-latest 61 | permissions: 62 | contents: write 63 | if: always() && needs.build.outputs.self_mutation_happened && !(github.event.pull_request.head.repo.full_name != github.repository) 64 | steps: 65 | - name: Checkout 66 | uses: actions/checkout@v4 67 | with: 68 | token: ${{ secrets.PROJEN_GITHUB_TOKEN }} 69 | ref: ${{ github.event.pull_request.head.ref }} 70 | repository: ${{ github.event.pull_request.head.repo.full_name }} 71 | - name: Download patch 72 | uses: actions/download-artifact@v4 73 | with: 74 | name: repo.patch 75 | path: ${{ runner.temp }} 76 | - name: Apply patch 77 | run: '[ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping."' 78 | - name: Set git identity 79 | run: |- 80 | git config user.name "github-actions" 81 | git config user.email "github-actions@github.com" 82 | - name: Push changes 83 | env: 84 | PULL_REQUEST_REF: ${{ github.event.pull_request.head.ref }} 85 | run: |- 86 | git add . 87 | git commit -s -m "chore: self mutation" 88 | git push origin HEAD:$PULL_REQUEST_REF 89 | package-js: 90 | needs: build 91 | runs-on: ubuntu-latest 92 | permissions: 93 | contents: read 94 | if: ${{ !needs.build.outputs.self_mutation_happened }} 95 | steps: 96 | - uses: actions/setup-node@v4 97 | with: 98 | node-version: 18.x 99 | - name: Download build artifacts 100 | uses: actions/download-artifact@v4 101 | with: 102 | name: build-artifact 103 | path: dist 104 | - name: Restore build artifact permissions 105 | run: cd dist && setfacl --restore=permissions-backup.acl 106 | continue-on-error: true 107 | - name: Checkout 108 | uses: actions/checkout@v4 109 | with: 110 | ref: ${{ github.event.pull_request.head.ref }} 111 | repository: ${{ github.event.pull_request.head.repo.full_name }} 112 | path: .repo 113 | - name: Install Dependencies 114 | run: cd .repo && yarn install --check-files --frozen-lockfile 115 | - name: Extract build artifact 116 | run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo 117 | - name: Move build artifact out of the way 118 | run: mv dist dist.old 119 | - name: Create js artifact 120 | run: cd .repo && npx projen package:js 121 | - name: Collect js artifact 122 | run: mv .repo/dist dist 123 | -------------------------------------------------------------------------------- /.github/workflows/pull-request-lint.yml: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | name: pull-request-lint 4 | on: 5 | pull_request_target: 6 | types: 7 | - labeled 8 | - opened 9 | - synchronize 10 | - reopened 11 | - ready_for_review 12 | - edited 13 | jobs: 14 | validate: 15 | name: Validate PR title 16 | runs-on: ubuntu-latest 17 | permissions: 18 | pull-requests: write 19 | steps: 20 | - uses: amannn/action-semantic-pull-request@v5.4.0 21 | env: 22 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 23 | with: 24 | types: |- 25 | feat 26 | fix 27 | chore 28 | requireScope: false 29 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | name: release 4 | on: 5 | push: 6 | branches: 7 | - main 8 | workflow_dispatch: {} 9 | concurrency: 10 | group: ${{ github.workflow }} 11 | cancel-in-progress: false 12 | jobs: 13 | release: 14 | runs-on: ubuntu-latest 15 | permissions: 16 | contents: write 17 | outputs: 18 | latest_commit: ${{ steps.git_remote.outputs.latest_commit }} 19 | tag_exists: ${{ steps.check_tag_exists.outputs.exists }} 20 | env: 21 | CI: "true" 22 | steps: 23 | - name: Checkout 24 | uses: actions/checkout@v4 25 | with: 26 | fetch-depth: 0 27 | - name: Set git identity 28 | run: |- 29 | git config user.name "github-actions" 30 | git config user.email "github-actions@github.com" 31 | - name: Setup Node.js 32 | uses: actions/setup-node@v4 33 | with: 34 | node-version: 18.x 35 | - name: Install dependencies 36 | run: yarn install --check-files --frozen-lockfile 37 | - name: release 38 | run: npx projen release 39 | - name: Check if version has already been tagged 40 | id: check_tag_exists 41 | run: |- 42 | TAG=$(cat dist/releasetag.txt) 43 | ([ ! -z "$TAG" ] && git ls-remote -q --exit-code --tags origin $TAG && (echo "exists=true" >> $GITHUB_OUTPUT)) || (echo "exists=false" >> $GITHUB_OUTPUT) 44 | cat $GITHUB_OUTPUT 45 | - name: Check for new commits 46 | id: git_remote 47 | run: |- 48 | echo "latest_commit=$(git ls-remote origin -h ${{ github.ref }} | cut -f1)" >> $GITHUB_OUTPUT 49 | cat $GITHUB_OUTPUT 50 | - name: Backup artifact permissions 51 | if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} 52 | run: cd dist && getfacl -R . > permissions-backup.acl 53 | continue-on-error: true 54 | - name: Upload artifact 55 | if: ${{ steps.git_remote.outputs.latest_commit == github.sha }} 56 | uses: actions/upload-artifact@v4.4.0 57 | with: 58 | name: build-artifact 59 | path: dist 60 | overwrite: true 61 | release_github: 62 | name: Publish to GitHub Releases 63 | needs: 64 | - release 65 | - release_npm 66 | runs-on: ubuntu-latest 67 | permissions: 68 | contents: write 69 | if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha 70 | steps: 71 | - uses: actions/setup-node@v4 72 | with: 73 | node-version: 18.x 74 | - name: Download build artifacts 75 | uses: actions/download-artifact@v4 76 | with: 77 | name: build-artifact 78 | path: dist 79 | - name: Restore build artifact permissions 80 | run: cd dist && setfacl --restore=permissions-backup.acl 81 | continue-on-error: true 82 | - name: Release 83 | env: 84 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 85 | GITHUB_REPOSITORY: ${{ github.repository }} 86 | GITHUB_REF: ${{ github.sha }} 87 | run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then cat $errout; exit $exitcode; fi 88 | release_npm: 89 | name: Publish to npm 90 | needs: release 91 | runs-on: ubuntu-latest 92 | permissions: 93 | id-token: write 94 | contents: read 95 | if: needs.release.outputs.tag_exists != 'true' && needs.release.outputs.latest_commit == github.sha 96 | steps: 97 | - uses: actions/setup-node@v4 98 | with: 99 | node-version: 18.x 100 | - name: Download build artifacts 101 | uses: actions/download-artifact@v4 102 | with: 103 | name: build-artifact 104 | path: dist 105 | - name: Restore build artifact permissions 106 | run: cd dist && setfacl --restore=permissions-backup.acl 107 | continue-on-error: true 108 | - name: Checkout 109 | uses: actions/checkout@v4 110 | with: 111 | path: .repo 112 | - name: Install Dependencies 113 | run: cd .repo && yarn install --check-files --frozen-lockfile 114 | - name: Extract build artifact 115 | run: tar --strip-components=1 -xzvf dist/js/*.tgz -C .repo 116 | - name: Move build artifact out of the way 117 | run: mv dist dist.old 118 | - name: Create js artifact 119 | run: cd .repo && npx projen package:js 120 | - name: Collect js artifact 121 | run: mv .repo/dist dist 122 | - name: Release 123 | env: 124 | NPM_DIST_TAG: latest 125 | NPM_REGISTRY: registry.npmjs.org 126 | NPM_CONFIG_PROVENANCE: "true" 127 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 128 | run: npx -p publib@latest publib-npm 129 | -------------------------------------------------------------------------------- /.github/workflows/upgrade-main.yml: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | name: upgrade-main 4 | on: 5 | workflow_dispatch: {} 6 | schedule: 7 | - cron: 0 0 * * * 8 | jobs: 9 | upgrade: 10 | name: Upgrade 11 | runs-on: ubuntu-latest 12 | permissions: 13 | contents: read 14 | outputs: 15 | patch_created: ${{ steps.create_patch.outputs.patch_created }} 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | ref: main 21 | - name: Setup Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: 18.x 25 | - name: Install dependencies 26 | run: yarn install --check-files --frozen-lockfile 27 | - name: Upgrade dependencies 28 | run: npx projen upgrade 29 | - name: Find mutations 30 | id: create_patch 31 | run: |- 32 | git add . 33 | git diff --staged --patch --exit-code > repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT 34 | working-directory: ./ 35 | - name: Upload patch 36 | if: steps.create_patch.outputs.patch_created 37 | uses: actions/upload-artifact@v4.4.0 38 | with: 39 | name: repo.patch 40 | path: repo.patch 41 | overwrite: true 42 | pr: 43 | name: Create Pull Request 44 | needs: upgrade 45 | runs-on: ubuntu-latest 46 | permissions: 47 | contents: read 48 | if: ${{ needs.upgrade.outputs.patch_created }} 49 | steps: 50 | - name: Checkout 51 | uses: actions/checkout@v4 52 | with: 53 | ref: main 54 | - name: Download patch 55 | uses: actions/download-artifact@v4 56 | with: 57 | name: repo.patch 58 | path: ${{ runner.temp }} 59 | - name: Apply patch 60 | run: '[ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping."' 61 | - name: Set git identity 62 | run: |- 63 | git config user.name "github-actions" 64 | git config user.email "github-actions@github.com" 65 | - name: Create Pull Request 66 | id: create-pr 67 | uses: peter-evans/create-pull-request@v6 68 | with: 69 | token: ${{ secrets.PROJEN_GITHUB_TOKEN }} 70 | commit-message: |- 71 | chore(deps): upgrade dependencies 72 | 73 | Upgrades project dependencies. See details in [workflow run]. 74 | 75 | [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} 76 | 77 | ------ 78 | 79 | *Automatically created by projen via the "upgrade-main" workflow* 80 | branch: github-actions/upgrade-main 81 | title: "chore(deps): upgrade dependencies" 82 | body: |- 83 | Upgrades project dependencies. See details in [workflow run]. 84 | 85 | [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} 86 | 87 | ------ 88 | 89 | *Automatically created by projen via the "upgrade-main" workflow* 90 | author: github-actions 91 | committer: github-actions 92 | signoff: true 93 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | !/.gitattributes 3 | !/.projen/tasks.json 4 | !/.projen/deps.json 5 | !/.projen/files.json 6 | !/.github/workflows/pull-request-lint.yml 7 | !/package.json 8 | !/LICENSE 9 | !/.npmignore 10 | logs 11 | *.log 12 | npm-debug.log* 13 | yarn-debug.log* 14 | yarn-error.log* 15 | lerna-debug.log* 16 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 17 | pids 18 | *.pid 19 | *.seed 20 | *.pid.lock 21 | lib-cov 22 | coverage 23 | *.lcov 24 | .nyc_output 25 | build/Release 26 | node_modules/ 27 | jspm_packages/ 28 | *.tsbuildinfo 29 | .eslintcache 30 | *.tgz 31 | .yarn-integrity 32 | .cache 33 | *.js 34 | *.d.ts 35 | !test/.*.snapshot/**/* 36 | .tmp 37 | /test-reports/ 38 | junit.xml 39 | /coverage/ 40 | !/.github/workflows/build.yml 41 | /dist/changelog.md 42 | /dist/version.txt 43 | !/.github/workflows/release.yml 44 | !/.mergify.yml 45 | !/.github/workflows/upgrade-main.yml 46 | !/.github/pull_request_template.md 47 | !/test/ 48 | !/tsconfig.dev.json 49 | !/src/ 50 | /lib 51 | /dist/ 52 | !/.eslintrc.json 53 | .jsii 54 | tsconfig.json 55 | !/API.md 56 | !/.projenrc.ts 57 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | 3 | queue_rules: 4 | - name: default 5 | update_method: merge 6 | conditions: 7 | - "#approved-reviews-by>=1" 8 | - -label~=(do-not-merge) 9 | - status-success=build 10 | - status-success=package-js 11 | pull_request_rules: 12 | - name: Automatic merge on approval and successful build 13 | actions: 14 | delete_head_branch: {} 15 | queue: 16 | method: squash 17 | name: default 18 | commit_message_template: |- 19 | {{ title }} (#{{ number }}) 20 | 21 | {{ body }} 22 | conditions: 23 | - "#approved-reviews-by>=1" 24 | - -label~=(do-not-merge) 25 | - status-success=build 26 | - status-success=package-js 27 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | /example/lambda/node_modules 3 | /example/lambda/.llrt 4 | /.projen/ 5 | /test-reports/ 6 | junit.xml 7 | /coverage/ 8 | permissions-backup.acl 9 | /dist/changelog.md 10 | /dist/version.txt 11 | /.mergify.yml 12 | /test/ 13 | /tsconfig.dev.json 14 | /src/ 15 | !/lib/ 16 | !/lib/**/*.js 17 | !/lib/**/*.d.ts 18 | dist 19 | /tsconfig.json 20 | /.github/ 21 | /.vscode/ 22 | /.idea/ 23 | /.projenrc.js 24 | tsconfig.tsbuildinfo 25 | /.eslintrc.json 26 | !.jsii 27 | .tmp 28 | /.gitattributes 29 | /.projenrc.ts 30 | /projenrc 31 | -------------------------------------------------------------------------------- /.projen/deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | { 4 | "name": "@aws-cdk/integ-runner", 5 | "version": "^2.159.0-alpha.0", 6 | "type": "build" 7 | }, 8 | { 9 | "name": "@aws-cdk/integ-tests-alpha", 10 | "version": "^2.159.0-alpha.0", 11 | "type": "build" 12 | }, 13 | { 14 | "name": "@types/jest", 15 | "type": "build" 16 | }, 17 | { 18 | "name": "@types/node", 19 | "version": "^18", 20 | "type": "build" 21 | }, 22 | { 23 | "name": "@typescript-eslint/eslint-plugin", 24 | "version": "^7", 25 | "type": "build" 26 | }, 27 | { 28 | "name": "@typescript-eslint/parser", 29 | "version": "^7", 30 | "type": "build" 31 | }, 32 | { 33 | "name": "aws-cdk", 34 | "type": "build" 35 | }, 36 | { 37 | "name": "aws-cdk-lib", 38 | "type": "build" 39 | }, 40 | { 41 | "name": "commit-and-tag-version", 42 | "version": "^12", 43 | "type": "build" 44 | }, 45 | { 46 | "name": "esbuild", 47 | "type": "build" 48 | }, 49 | { 50 | "name": "eslint-import-resolver-typescript", 51 | "type": "build" 52 | }, 53 | { 54 | "name": "eslint-plugin-import", 55 | "type": "build" 56 | }, 57 | { 58 | "name": "eslint", 59 | "version": "^8", 60 | "type": "build" 61 | }, 62 | { 63 | "name": "jest", 64 | "type": "build" 65 | }, 66 | { 67 | "name": "jest-junit", 68 | "version": "^15", 69 | "type": "build" 70 | }, 71 | { 72 | "name": "jsii-diff", 73 | "type": "build" 74 | }, 75 | { 76 | "name": "jsii-docgen", 77 | "version": "^10.5.0", 78 | "type": "build" 79 | }, 80 | { 81 | "name": "jsii-pacmak", 82 | "type": "build" 83 | }, 84 | { 85 | "name": "jsii-rosetta", 86 | "version": "~5.4.0", 87 | "type": "build" 88 | }, 89 | { 90 | "name": "jsii", 91 | "version": "~5.4.0", 92 | "type": "build" 93 | }, 94 | { 95 | "name": "projen", 96 | "type": "build" 97 | }, 98 | { 99 | "name": "ts-jest", 100 | "type": "build" 101 | }, 102 | { 103 | "name": "ts-node", 104 | "type": "build" 105 | }, 106 | { 107 | "name": "typescript", 108 | "type": "build" 109 | }, 110 | { 111 | "name": "aws-cdk-lib", 112 | "version": "^2.38.0", 113 | "type": "peer" 114 | }, 115 | { 116 | "name": "constructs", 117 | "version": "^10.0.5", 118 | "type": "peer" 119 | } 120 | ], 121 | "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." 122 | } 123 | -------------------------------------------------------------------------------- /.projen/files.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | ".eslintrc.json", 4 | ".gitattributes", 5 | ".github/pull_request_template.md", 6 | ".github/workflows/build.yml", 7 | ".github/workflows/pull-request-lint.yml", 8 | ".github/workflows/release.yml", 9 | ".github/workflows/upgrade-main.yml", 10 | ".gitignore", 11 | ".mergify.yml", 12 | ".projen/deps.json", 13 | ".projen/files.json", 14 | ".projen/tasks.json", 15 | "LICENSE", 16 | "tsconfig.dev.json" 17 | ], 18 | "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." 19 | } 20 | -------------------------------------------------------------------------------- /.projen/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "tasks": { 3 | "build": { 4 | "name": "build", 5 | "description": "Full release build", 6 | "steps": [ 7 | { 8 | "spawn": "default" 9 | }, 10 | { 11 | "spawn": "pre-compile" 12 | }, 13 | { 14 | "spawn": "compile" 15 | }, 16 | { 17 | "spawn": "post-compile" 18 | }, 19 | { 20 | "spawn": "test" 21 | }, 22 | { 23 | "spawn": "package" 24 | } 25 | ] 26 | }, 27 | "bump": { 28 | "name": "bump", 29 | "description": "Bumps version based on latest git tag and generates a changelog entry", 30 | "env": { 31 | "OUTFILE": "package.json", 32 | "CHANGELOG": "dist/changelog.md", 33 | "BUMPFILE": "dist/version.txt", 34 | "RELEASETAG": "dist/releasetag.txt", 35 | "RELEASE_TAG_PREFIX": "", 36 | "BUMP_PACKAGE": "commit-and-tag-version@^12" 37 | }, 38 | "steps": [ 39 | { 40 | "builtin": "release/bump-version" 41 | } 42 | ], 43 | "condition": "git log --oneline -1 | grep -qv \"chore(release):\"" 44 | }, 45 | "clobber": { 46 | "name": "clobber", 47 | "description": "hard resets to HEAD of origin and cleans the local repo", 48 | "env": { 49 | "BRANCH": "$(git branch --show-current)" 50 | }, 51 | "steps": [ 52 | { 53 | "exec": "git checkout -b scratch", 54 | "name": "save current HEAD in \"scratch\" branch" 55 | }, 56 | { 57 | "exec": "git checkout $BRANCH" 58 | }, 59 | { 60 | "exec": "git fetch origin", 61 | "name": "fetch latest changes from origin" 62 | }, 63 | { 64 | "exec": "git reset --hard origin/$BRANCH", 65 | "name": "hard reset to origin commit" 66 | }, 67 | { 68 | "exec": "git clean -fdx", 69 | "name": "clean all untracked files" 70 | }, 71 | { 72 | "say": "ready to rock! (unpushed commits are under the \"scratch\" branch)" 73 | } 74 | ], 75 | "condition": "git diff --exit-code > /dev/null" 76 | }, 77 | "compat": { 78 | "name": "compat", 79 | "description": "Perform API compatibility check against latest version", 80 | "steps": [ 81 | { 82 | "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" 83 | } 84 | ] 85 | }, 86 | "compile": { 87 | "name": "compile", 88 | "description": "Only compile", 89 | "steps": [ 90 | { 91 | "exec": "jsii --silence-warnings=reserved-word" 92 | } 93 | ] 94 | }, 95 | "default": { 96 | "name": "default", 97 | "description": "Synthesize project files", 98 | "steps": [ 99 | { 100 | "exec": "ts-node --project tsconfig.dev.json .projenrc.ts" 101 | } 102 | ] 103 | }, 104 | "docgen": { 105 | "name": "docgen", 106 | "description": "Generate API.md from .jsii manifest", 107 | "steps": [ 108 | { 109 | "exec": "jsii-docgen -o API.md" 110 | } 111 | ] 112 | }, 113 | "eject": { 114 | "name": "eject", 115 | "description": "Remove projen from the project", 116 | "env": { 117 | "PROJEN_EJECTING": "true" 118 | }, 119 | "steps": [ 120 | { 121 | "spawn": "default" 122 | } 123 | ] 124 | }, 125 | "eslint": { 126 | "name": "eslint", 127 | "description": "Runs eslint against the codebase", 128 | "steps": [ 129 | { 130 | "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern $@ test build-tools projenrc .projenrc.ts", 131 | "receiveArgs": true 132 | } 133 | ] 134 | }, 135 | "install": { 136 | "name": "install", 137 | "description": "Install project dependencies and update lockfile (non-frozen)", 138 | "steps": [ 139 | { 140 | "exec": "yarn install --check-files" 141 | } 142 | ] 143 | }, 144 | "install:ci": { 145 | "name": "install:ci", 146 | "description": "Install project dependencies using frozen lockfile", 147 | "steps": [ 148 | { 149 | "exec": "yarn install --check-files --frozen-lockfile" 150 | } 151 | ] 152 | }, 153 | "package": { 154 | "name": "package", 155 | "description": "Creates the distribution package", 156 | "steps": [ 157 | { 158 | "spawn": "package:js", 159 | "condition": "node -e \"if (!process.env.CI) process.exit(1)\"" 160 | }, 161 | { 162 | "spawn": "package-all", 163 | "condition": "node -e \"if (process.env.CI) process.exit(1)\"" 164 | } 165 | ] 166 | }, 167 | "package-all": { 168 | "name": "package-all", 169 | "description": "Packages artifacts for all target languages", 170 | "steps": [ 171 | { 172 | "spawn": "package:js" 173 | } 174 | ] 175 | }, 176 | "package:js": { 177 | "name": "package:js", 178 | "description": "Create js language bindings", 179 | "steps": [ 180 | { 181 | "exec": "jsii-pacmak -v --target js" 182 | } 183 | ] 184 | }, 185 | "post-compile": { 186 | "name": "post-compile", 187 | "description": "Runs after successful compilation", 188 | "steps": [ 189 | { 190 | "spawn": "docgen" 191 | } 192 | ] 193 | }, 194 | "post-upgrade": { 195 | "name": "post-upgrade", 196 | "description": "Runs after upgrading dependencies" 197 | }, 198 | "pre-compile": { 199 | "name": "pre-compile", 200 | "description": "Prepare the project for compilation" 201 | }, 202 | "release": { 203 | "name": "release", 204 | "description": "Prepare a release from \"main\" branch", 205 | "env": { 206 | "RELEASE": "true" 207 | }, 208 | "steps": [ 209 | { 210 | "exec": "rm -fr dist" 211 | }, 212 | { 213 | "spawn": "bump" 214 | }, 215 | { 216 | "spawn": "build" 217 | }, 218 | { 219 | "spawn": "unbump" 220 | }, 221 | { 222 | "exec": "git diff --ignore-space-at-eol --exit-code" 223 | } 224 | ] 225 | }, 226 | "test": { 227 | "name": "test", 228 | "description": "Run tests", 229 | "steps": [ 230 | { 231 | "exec": "jest --passWithNoTests --updateSnapshot", 232 | "receiveArgs": true 233 | }, 234 | { 235 | "spawn": "eslint" 236 | }, 237 | { 238 | "exec": "npm install", 239 | "cwd": "example/lambda" 240 | }, 241 | { 242 | "exec": "yarn tsc -p tsconfig.dev.json && yarn integ-runner" 243 | } 244 | ] 245 | }, 246 | "test:watch": { 247 | "name": "test:watch", 248 | "description": "Run jest in watch mode", 249 | "steps": [ 250 | { 251 | "exec": "jest --watch" 252 | } 253 | ] 254 | }, 255 | "unbump": { 256 | "name": "unbump", 257 | "description": "Restores version to 0.0.0", 258 | "env": { 259 | "OUTFILE": "package.json", 260 | "CHANGELOG": "dist/changelog.md", 261 | "BUMPFILE": "dist/version.txt", 262 | "RELEASETAG": "dist/releasetag.txt", 263 | "RELEASE_TAG_PREFIX": "", 264 | "BUMP_PACKAGE": "commit-and-tag-version@^12" 265 | }, 266 | "steps": [ 267 | { 268 | "builtin": "release/reset-version" 269 | } 270 | ] 271 | }, 272 | "upgrade": { 273 | "name": "upgrade", 274 | "description": "upgrade dependencies", 275 | "env": { 276 | "CI": "0" 277 | }, 278 | "steps": [ 279 | { 280 | "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@types/jest,aws-cdk,aws-cdk-lib,esbuild,eslint-import-resolver-typescript,eslint-plugin-import,jest,jsii-diff,jsii-pacmak,projen,ts-jest,ts-node,typescript" 281 | }, 282 | { 283 | "exec": "yarn install --check-files" 284 | }, 285 | { 286 | "exec": "yarn upgrade @aws-cdk/integ-runner @aws-cdk/integ-tests-alpha @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser aws-cdk aws-cdk-lib commit-and-tag-version esbuild eslint-import-resolver-typescript eslint-plugin-import eslint jest jest-junit jsii-diff jsii-docgen jsii-pacmak jsii-rosetta jsii projen ts-jest ts-node typescript constructs" 287 | }, 288 | { 289 | "exec": "npx projen" 290 | }, 291 | { 292 | "spawn": "post-upgrade" 293 | } 294 | ] 295 | }, 296 | "watch": { 297 | "name": "watch", 298 | "description": "Watch & compile in the background", 299 | "steps": [ 300 | { 301 | "exec": "jsii -w --silence-warnings=reserved-word" 302 | } 303 | ] 304 | } 305 | }, 306 | "env": { 307 | "PATH": "$(npx -c \"node --print process.env.PATH\")" 308 | }, 309 | "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." 310 | } 311 | -------------------------------------------------------------------------------- /.projenrc.ts: -------------------------------------------------------------------------------- 1 | import { join } from 'path'; 2 | import { awscdk } from 'projen'; 3 | const project = new awscdk.AwsCdkConstructLibrary({ 4 | author: 'tmokmss', 5 | authorAddress: 'tomookam@live.jp', 6 | // we don't strictly guarantee it works in older CDK (integ-runner runs on newer CDK), but hopefully it should. 7 | cdkVersion: '2.38.0', 8 | defaultReleaseBranch: 'main', 9 | jsiiVersion: '~5.4.0', 10 | name: 'cdk-lambda-llrt', 11 | projenrcTs: true, 12 | repositoryUrl: 'https://github.com/tmokmss/cdk-lambda-llrt.git', 13 | description: 'Deploy Lambda functions with LLRT (Low Latency Runtime)', 14 | eslintOptions: { 15 | dirs: [], 16 | ignorePatterns: ['example/**/*', 'test/assets/**/*', 'test/*.snapshot/**/*', '*.d.ts'], 17 | }, 18 | npmIgnoreOptions: { 19 | ignorePatterns: ['/example/lambda/node_modules', '/example/lambda/.llrt'], 20 | }, 21 | gitignore: ['*.js', '*.d.ts', '!test/.*.snapshot/**/*', '.tmp'], 22 | keywords: ['aws', 'cdk', 'lambda', 'aws-cdk'], 23 | tsconfigDev: { 24 | compilerOptions: {}, 25 | exclude: ['example', 'test/.*.snapshot'], 26 | }, 27 | devDeps: [ 28 | 'aws-cdk-lib', 29 | 'aws-cdk', 30 | 'constructs', 31 | '@aws-cdk/integ-runner@^2.159.0-alpha.0', 32 | '@aws-cdk/integ-tests-alpha@^2.159.0-alpha.0', 33 | 'esbuild', 34 | ], 35 | peerDependencyOptions: { 36 | pinnedDevDependency: false, 37 | }, 38 | }); 39 | 40 | project.addPackageIgnore('.tmp'); 41 | // required to run integ tests 42 | project.projectBuild.testTask.exec('npm install', { cwd: join('example', 'lambda') }); 43 | project.projectBuild.testTask.exec('yarn tsc -p tsconfig.dev.json && yarn integ-runner'); 44 | 45 | project.synth(); 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AWS CDK LLRT Function construct 2 | 3 | This is a CDK construct library that aims to accelerate your experiment on [LLRT](https://github.com/awslabs/llrt), a lightweight JavaScript runtime for AWS Lambda. 4 | 5 | ## Usage 6 | Install it via npm: 7 | 8 | ```sh 9 | npm install cdk-lambda-llrt 10 | ``` 11 | 12 | Then you can use `LlrtFunction` construct. Just set an entry point for the function. 13 | 14 | ```ts 15 | import { LlrtFunction } from 'cdk-lambda-llrt'; 16 | 17 | const handler = new LlrtFunction(this, 'Handler', { 18 | entry: 'lambda/index.ts', 19 | }); 20 | ``` 21 | 22 | If you are already using `NodejsFunction` construct, you should be able to just replace it to `LlrtFunction`. 23 | 24 | > [!WARNING] 25 | > LLRT is currently experimental and not fully compatible with Node.js. You should expect some trial and errors to use LLRT with your existing code. 26 | 27 | If you want to upgrade the LLRT version, remove the `.tmp` directory, which contains the cache of LLRT binary fetched from GitHub (only applicable when you set `llrtVersion` to `latest` (default)). 28 | 29 | ### Setting platform=browser 30 | 31 | In some cases, your code may run successfully on LLRT by setting bundle target platform to `browser`. You can configure it by the following code: 32 | 33 | ```ts 34 | import { LlrtFunction } from 'cdk-lambda-llrt'; 35 | 36 | const handler = new LlrtFunction(this, 'Handler', { 37 | entry: 'lambda/index.ts', 38 | bundling: { 39 | esbuildArgs: { '--platform': 'browser' }, 40 | } 41 | }); 42 | ``` 43 | 44 | ### Docker bundling 45 | In some environments, LlrtFunction's bundling steps will fail because the underlying `NodejsFunction` [sometimes runs the commands](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html#local-bundling) on your host machine, and your environment does not support these commands or syntax. To avoid this error, you can force docker bundling for these commands not to depend on your execution environment. 46 | 47 | ```ts 48 | new LlrtFunction(this, 'Handler', { 49 | entry: 'handler.ts', 50 | bundling: { 51 | forceDockerBundling: true, // Add this! 52 | }, 53 | }); 54 | ``` 55 | 56 | Note that we enable this flag automatically on Windows platform. 57 | 58 | ### LLRT Binary Types 59 | 60 | LLRT [publishes](https://github.com/awslabs/llrt/releases) several types of binaries with different sets of bundled SDKs: 61 | 62 | - `LlrtBinaryType.FULL_SDK`: Includes all AWS SDKs 63 | - `LlrtBinaryType.NO_SDK`: No AWS SDKs included 64 | - `LlrtBinaryType.STANDARD`: Standard bundle (default) 65 | 66 | You can specify the binary type when creating a new `LlrtFunction`: 67 | 68 | ```ts 69 | const handler = new LlrtFunction(this, 'Handler', { 70 | entry: 'lambda/index.ts', 71 | llrtBinaryType: LlrtBinaryType.FULL_SDK, 72 | }); 73 | ``` 74 | 75 | ### LLRT Binary Path 76 | 77 | By default, CDK Lambda LLRT downloads the LLRT bootstrap binary from LLRT's GitHub releases and caches this in the `.tmp` directory. 78 | If you have your own bootstrap binary you want to use, you can specify the relative path from the function's `projectRoot` directory with the `llrtBinaryPath` property. 79 | 80 | ```ts 81 | const handler = new LlrtFunction(this, 'Handler', { 82 | entry: 'lambda/index.ts', 83 | llrtBinaryPath: '.llrt/bootstrap' 84 | }); 85 | ``` 86 | 87 | ## Examples 88 | See [example](./example/README.md) for examples to use `LlrtFunction` construct. 89 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | cdk.out 2 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Example LLRT applications 2 | 3 | This sample project includes: 4 | 5 | * [Hono](https://hono.dev/) 6 | * Hono SSR with JSX 7 | * AWS SDK v3 (client-s3) 8 | * AWS SDK v3 (client-ecs, not bundled in LLRT) 9 | 10 | ## Usage 11 | To deploy the sample, run the following commands: 12 | 13 | ```sh 14 | cd lambda 15 | npm ci 16 | cd ../ 17 | 18 | npx cdk deploy 19 | ``` 20 | -------------------------------------------------------------------------------- /example/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "npx ts-node --prefer-ts-exts index.ts" 3 | } 4 | -------------------------------------------------------------------------------- /example/index.ts: -------------------------------------------------------------------------------- 1 | import { Stack, StackProps, App } from 'aws-cdk-lib'; 2 | import { Construct } from 'constructs'; 3 | import { LlrtBinaryType, LlrtFunction } from '../src/'; 4 | import { PolicyStatement } from 'aws-cdk-lib/aws-iam'; 5 | import { LambdaIntegration, RestApi } from 'aws-cdk-lib/aws-apigateway'; 6 | 7 | class LlrtFunctionTestStack extends Stack { 8 | constructor(scope: Construct, id: string, props: StackProps = {}) { 9 | super(scope, id, props); 10 | 11 | { 12 | const handler = new LlrtFunction(this, 'Handler', { 13 | entry: '../example/lambda/s3.ts', 14 | }); 15 | handler.addToRolePolicy( 16 | new PolicyStatement({ 17 | actions: ['s3:ListAllMyBuckets'], 18 | resources: ['*'], 19 | }) 20 | ); 21 | } 22 | 23 | { 24 | const handler = new LlrtFunction(this, 'EcsHandler', { 25 | entry: '../example/lambda/ecs.ts', 26 | bundling: { 27 | // bundle for browser platform when using aws sdk not bundled in LLRT. 28 | esbuildArgs: { '--platform': 'browser' }, 29 | }, 30 | }); 31 | handler.addToRolePolicy( 32 | new PolicyStatement({ 33 | actions: ['ecs:ListClusters'], 34 | resources: ['*'], 35 | }) 36 | ); 37 | } 38 | 39 | { 40 | const handler = new LlrtFunction(this, 'EcsHandlerFullSdk', { 41 | entry: '../example/lambda/ecs.ts', 42 | llrtBinaryType: LlrtBinaryType.FULL_SDK, 43 | }); 44 | handler.addToRolePolicy( 45 | new PolicyStatement({ 46 | actions: ['ecs:ListClusters'], 47 | resources: ['*'], 48 | }) 49 | ); 50 | } 51 | 52 | { 53 | const handler = new LlrtFunction(this, 'CustomBinary', { 54 | entry: 'lambda/s3.ts', 55 | llrtBinaryType: LlrtBinaryType.NO_SDK, 56 | llrtBinaryPath: '.llrt/llrt-x64-no-sdk-bootstrap', 57 | depsLockFilePath: 'lambda/package-lock.json', 58 | }); 59 | handler.addToRolePolicy( 60 | new PolicyStatement({ 61 | actions: ['s3:ListAllMyBuckets'], 62 | resources: ['*'], 63 | }) 64 | ); 65 | } 66 | 67 | const api = new RestApi(this, 'Api'); 68 | 69 | { 70 | const handler = new LlrtFunction(this, 'Hono', { 71 | entry: '../example/lambda/hono.ts', 72 | llrtBinaryType: LlrtBinaryType.NO_SDK, 73 | }); 74 | 75 | api.root.addMethod('GET', new LambdaIntegration(handler)); 76 | const resource = api.root.addResource('hono'); 77 | resource.addMethod('GET', new LambdaIntegration(handler)); 78 | } 79 | 80 | { 81 | const handler = new LlrtFunction(this, 'Ssr', { 82 | entry: '../example/lambda/ssr.tsx', 83 | bundling: { 84 | commandHooks: { 85 | beforeBundling: (_i, _o) => { 86 | return ['echo beforeBundling']; 87 | }, 88 | afterBundling: (_i, _o) => { 89 | return ['echo afterBundling']; 90 | }, 91 | beforeInstall: (_i, _o) => { 92 | return ['echo beforeInstall']; 93 | }, 94 | }, 95 | }, 96 | }); 97 | 98 | const resource = api.root.addResource('ssr'); 99 | resource.addMethod('GET', new LambdaIntegration(handler)); 100 | } 101 | } 102 | } 103 | 104 | class TestApp extends App { 105 | constructor() { 106 | super(); 107 | 108 | new LlrtFunctionTestStack(this, 'LlrtFunctionTestStack'); 109 | } 110 | } 111 | 112 | new TestApp().synth(); 113 | -------------------------------------------------------------------------------- /example/lambda/.llrt/llrt-x64-no-sdk-bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/example/lambda/.llrt/llrt-x64-no-sdk-bootstrap -------------------------------------------------------------------------------- /example/lambda/ecs.ts: -------------------------------------------------------------------------------- 1 | import { Handler } from 'aws-lambda'; 2 | // @aws-sdk/client-ecs is not bundled in LLRT. 3 | import { ECSClient, ListClustersCommand } from '@aws-sdk/client-ecs'; 4 | 5 | const ecs = new ECSClient({ 6 | // we need to explicitly pass credentials and region from environment variables 7 | // when aws-sdk is bundled for browser platform. 8 | credentials: { 9 | accessKeyId: process.env.AWS_ACCESS_KEY_ID!, 10 | secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!, 11 | sessionToken: process.env.AWS_SESSION_TOKEN!, 12 | }, 13 | region: process.env.AWS_REGION, 14 | }); 15 | 16 | export const handler: Handler = async (event, context) => { 17 | const list = await ecs.send(new ListClustersCommand({})); 18 | console.log(list); 19 | }; 20 | -------------------------------------------------------------------------------- /example/lambda/hono.ts: -------------------------------------------------------------------------------- 1 | import { Hono } from 'hono'; 2 | import { html, raw } from 'hono/html' 3 | import { handle } from 'hono/aws-lambda'; 4 | 5 | const app = new Hono(); 6 | 7 | app.get('/hono', (c) => { 8 | return c.text('Hello Hono!'); 9 | }); 10 | 11 | app.get('/', (c) => { 12 | return c.html( 13 | html` 14 |

Links

15 |

Hono Hello World

16 |

Hono JSX

17 | ` 18 | ) 19 | }); 20 | 21 | export const handler = handle(app); 22 | -------------------------------------------------------------------------------- /example/lambda/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lambda", 3 | "scripts": { 4 | "build": "esbuild s3.ts hono.ts ssr.tsx --platform=node --target=es2020 --outdir=dist --format=esm --bundle --minify --external:@aws-sdk --external:uuid", 5 | "test": "echo \"Error: no test specified\" && exit 1" 6 | }, 7 | "devDependencies": { 8 | "@types/aws-lambda": "^8.10.133", 9 | "esbuild": "^0.21.2" 10 | }, 11 | "dependencies": { 12 | "@aws-sdk/client-ecs": "^3.542.0", 13 | "@aws-sdk/client-s3": "^3.509.0", 14 | "hono": "^3.12.12" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/lambda/s3.ts: -------------------------------------------------------------------------------- 1 | import { Handler } from 'aws-lambda'; 2 | import { ListBucketsCommand, S3Client } from '@aws-sdk/client-s3'; 3 | 4 | const s3 = new S3Client({}); 5 | 6 | export const handler: Handler = async (event, context) => { 7 | const list = await s3.send(new ListBucketsCommand({})); 8 | console.log(list); 9 | }; 10 | -------------------------------------------------------------------------------- /example/lambda/ssr.tsx: -------------------------------------------------------------------------------- 1 | // @jsxRuntime automatic 2 | // @jsxImportSource hono/jsx 3 | // You can use JSX pragma to set the required configuration https://github.com/evanw/esbuild/pull/2349 4 | // Instead you can use tsconfig.json too 5 | 6 | import type { FC } from 'hono/jsx' 7 | import { Hono } from 'hono'; 8 | import { handle } from 'hono/aws-lambda'; 9 | 10 | const app = new Hono() 11 | const Layout: FC = (props) => { 12 | return ( 13 | 14 | {props.children} 15 | 16 | ) 17 | } 18 | 19 | const Top: FC<{ messages: string[] }> = (props: { messages: string[] }) => { 20 | return ( 21 | 22 |

Hello Hono!

23 |
    24 | {props.messages.map((message) => { 25 | return
  • {message}!!
  • 26 | })} 27 |
28 |
29 | ) 30 | } 31 | 32 | app.get('/ssr', (c) => { 33 | const messages = ['Good Morning', 'Good Evening', 'Good Night'] 34 | return c.html() 35 | }) 36 | 37 | export const handler = handle(app); 38 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cdk-lambda-llrt", 3 | "description": "Deploy Lambda functions with LLRT (Low Latency Runtime)", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/tmokmss/cdk-lambda-llrt.git" 7 | }, 8 | "scripts": { 9 | "build": "npx projen build", 10 | "bump": "npx projen bump", 11 | "clobber": "npx projen clobber", 12 | "compat": "npx projen compat", 13 | "compile": "npx projen compile", 14 | "default": "npx projen default", 15 | "docgen": "npx projen docgen", 16 | "eject": "npx projen eject", 17 | "eslint": "npx projen eslint", 18 | "package": "npx projen package", 19 | "package-all": "npx projen package-all", 20 | "package:js": "npx projen package:js", 21 | "post-compile": "npx projen post-compile", 22 | "post-upgrade": "npx projen post-upgrade", 23 | "pre-compile": "npx projen pre-compile", 24 | "release": "npx projen release", 25 | "test": "npx projen test", 26 | "test:watch": "npx projen test:watch", 27 | "unbump": "npx projen unbump", 28 | "upgrade": "npx projen upgrade", 29 | "watch": "npx projen watch", 30 | "projen": "npx projen" 31 | }, 32 | "author": { 33 | "name": "tmokmss", 34 | "email": "tomookam@live.jp", 35 | "organization": false 36 | }, 37 | "devDependencies": { 38 | "@aws-cdk/integ-runner": "^2.159.0-alpha.0", 39 | "@aws-cdk/integ-tests-alpha": "^2.159.0-alpha.0", 40 | "@types/jest": "^29.5.13", 41 | "@types/node": "^18", 42 | "@typescript-eslint/eslint-plugin": "^7", 43 | "@typescript-eslint/parser": "^7", 44 | "aws-cdk": "^2.159.0", 45 | "aws-cdk-lib": "^2.159.0", 46 | "commit-and-tag-version": "^12", 47 | "esbuild": "^0.23.1", 48 | "eslint": "^8", 49 | "eslint-import-resolver-typescript": "^3.6.3", 50 | "eslint-plugin-import": "^2.30.0", 51 | "jest": "^29.7.0", 52 | "jest-junit": "^15", 53 | "jsii": "~5.4.0", 54 | "jsii-diff": "^1.103.1", 55 | "jsii-docgen": "^10.5.0", 56 | "jsii-pacmak": "^1.103.1", 57 | "jsii-rosetta": "~5.4.0", 58 | "projen": "^0.87.4", 59 | "ts-jest": "^29.2.5", 60 | "ts-node": "^10.9.2", 61 | "typescript": "^5.6.2" 62 | }, 63 | "peerDependencies": { 64 | "aws-cdk-lib": "^2.38.0", 65 | "constructs": "^10.0.5" 66 | }, 67 | "keywords": [ 68 | "aws", 69 | "aws-cdk", 70 | "cdk", 71 | "lambda" 72 | ], 73 | "main": "lib/index.js", 74 | "license": "Apache-2.0", 75 | "publishConfig": { 76 | "access": "public" 77 | }, 78 | "version": "0.0.0", 79 | "jest": { 80 | "coverageProvider": "v8", 81 | "testMatch": [ 82 | "/@(src|test)/**/*(*.)@(spec|test).ts?(x)", 83 | "/@(src|test)/**/__tests__/**/*.ts?(x)", 84 | "/@(projenrc)/**/*(*.)@(spec|test).ts?(x)", 85 | "/@(projenrc)/**/__tests__/**/*.ts?(x)" 86 | ], 87 | "clearMocks": true, 88 | "collectCoverage": true, 89 | "coverageReporters": [ 90 | "json", 91 | "lcov", 92 | "clover", 93 | "cobertura", 94 | "text" 95 | ], 96 | "coverageDirectory": "coverage", 97 | "coveragePathIgnorePatterns": [ 98 | "/node_modules/" 99 | ], 100 | "testPathIgnorePatterns": [ 101 | "/node_modules/" 102 | ], 103 | "watchPathIgnorePatterns": [ 104 | "/node_modules/" 105 | ], 106 | "reporters": [ 107 | "default", 108 | [ 109 | "jest-junit", 110 | { 111 | "outputDirectory": "test-reports" 112 | } 113 | ] 114 | ], 115 | "transform": { 116 | "^.+\\.[t]sx?$": [ 117 | "ts-jest", 118 | { 119 | "tsconfig": "tsconfig.dev.json" 120 | } 121 | ] 122 | } 123 | }, 124 | "types": "lib/index.d.ts", 125 | "stability": "stable", 126 | "jsii": { 127 | "outdir": "dist", 128 | "targets": {}, 129 | "tsc": { 130 | "outDir": "lib", 131 | "rootDir": "src" 132 | } 133 | }, 134 | "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." 135 | } 136 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './llrt-function'; 2 | -------------------------------------------------------------------------------- /src/llrt-function.ts: -------------------------------------------------------------------------------- 1 | import { posix } from 'path'; 2 | import { CfnResource } from 'aws-cdk-lib'; 3 | import { Architecture, Runtime, RuntimeFamily } from 'aws-cdk-lib/aws-lambda'; 4 | import { ICommandHooks, NodejsFunction, NodejsFunctionProps, OutputFormat } from 'aws-cdk-lib/aws-lambda-nodejs'; 5 | import { Construct } from 'constructs'; 6 | 7 | /** 8 | * The type of LLRT binary to use. 9 | */ 10 | export enum LlrtBinaryType { 11 | /** 12 | * The LLRT bundle including full AWS SDK. 13 | */ 14 | FULL_SDK = 'full-sdk', 15 | 16 | /** 17 | * The LLRT bundle without AWS SDK. 18 | */ 19 | NO_SDK = 'no-sdk', 20 | 21 | /** 22 | * The standard LLRT bundle, including only major services of AWS SDK. 23 | */ 24 | STANDARD = 'standard', 25 | } 26 | 27 | export interface LlrtFunctionProps extends NodejsFunctionProps { 28 | /** 29 | * The version of LLRT. See https://github.com/awslabs/llrt/releases 30 | * 31 | * @default "latest" 32 | */ 33 | readonly llrtVersion?: string; 34 | 35 | /** 36 | * The type of LLRT bundle to use. 37 | * 38 | * @default LlrtBinaryType.STANDARD 39 | */ 40 | readonly llrtBinaryType?: LlrtBinaryType; 41 | 42 | /** 43 | * A custom relative path to use as a local LLRT bootstrap binary. 44 | * This path must be specified relative to the function's `projectRoot` directory. 45 | * 46 | * @default - If this option is not provided, the LLRT binary is downloaded from GitHub and cached in the .tmp directory. 47 | */ 48 | readonly llrtBinaryPath?: string; 49 | } 50 | 51 | export class LlrtFunction extends NodejsFunction { 52 | constructor(scope: Construct, id: string, props: LlrtFunctionProps) { 53 | const version = props.llrtVersion ?? 'latest'; 54 | const arch = props.architecture == Architecture.ARM_64 ? 'arm64' : 'x64'; 55 | const binaryType = props.llrtBinaryType ?? LlrtBinaryType.STANDARD; 56 | 57 | let binaryName: string; 58 | switch (binaryType) { 59 | case LlrtBinaryType.FULL_SDK: 60 | binaryName = `llrt-lambda-${arch}-full-sdk`; 61 | break; 62 | case LlrtBinaryType.NO_SDK: 63 | binaryName = `llrt-lambda-${arch}-no-sdk`; 64 | break; 65 | default: 66 | binaryName = `llrt-lambda-${arch}`; 67 | } 68 | 69 | // From LLRT v0.2.0-beta, ES2023 is supported: 70 | // https://github.com/awslabs/llrt/releases/tag/v0.2.0-beta 71 | // For esbuild, there is no difference between es2022 and es2023. But target==es2023 is 72 | // only recently supported and throws an error with older esbuild versions. 73 | // That is why we are using es2022 here instead. 74 | // https://github.com/evanw/esbuild/releases/tag/v0.21.2 75 | const target = version >= 'v0.2.0-beta' || version == 'latest' ? 'es2022' : 'es2020'; 76 | 77 | // we don't have to bundle these modules, depending on LLRT binary type. 78 | // https://github.com/awslabs/llrt?tab=readme-ov-file#using-aws-sdk-v3-with-llrt 79 | const externalModules = []; 80 | if (binaryType == LlrtBinaryType.FULL_SDK) { 81 | externalModules.push('@aws-sdk', '@aws-crypto', '@smithy'); 82 | } else if (binaryType == LlrtBinaryType.STANDARD) { 83 | externalModules.push( 84 | '@aws-sdk/client-cloudwatch-events', 85 | '@aws-sdk/client-cloudwatch-logs', 86 | '@aws-sdk/client-cognito-identity', 87 | '@aws-sdk/client-cognito-identity-provider', 88 | '@aws-sdk/client-dynamodb', 89 | '@aws-sdk/client-eventbridge', 90 | '@aws-sdk/client-kms', 91 | '@aws-sdk/client-lambda', 92 | '@aws-sdk/client-s3', 93 | '@aws-sdk/client-secrets-manager', 94 | '@aws-sdk/client-ses', 95 | '@aws-sdk/client-sfn', 96 | '@aws-sdk/client-sns', 97 | '@aws-sdk/client-sqs', 98 | '@aws-sdk/client-ssm', 99 | '@aws-sdk/client-sts', 100 | '@aws-sdk/client-xray', 101 | '@aws-sdk/credential-providers', 102 | '@aws-sdk/lib-dynamodb', 103 | '@aws-sdk/lib-storage', 104 | '@aws-sdk/s3-presigned-post', 105 | '@aws-sdk/s3-request-presigner', 106 | '@aws-sdk/util-dynamodb', 107 | '@aws-sdk/util-user-agent-browser', 108 | '@aws-crypto', 109 | '@smithy', 110 | ); 111 | } 112 | 113 | const binaryUrl = 114 | version == 'latest' 115 | ? `https://github.com/awslabs/llrt/releases/latest/download/${binaryName}.zip` 116 | : `https://github.com/awslabs/llrt/releases/download/${version}/${binaryName}.zip`; 117 | const cacheDir = `.tmp/llrt/${version}/${arch}/${binaryType}`; 118 | 119 | const { commandHooks: originalCommandHooks, ...otherBundlingProps } = props.bundling ?? {}; 120 | const afterBundlingCommandHook: ICommandHooks['afterBundling'] = (i, o) => !props.llrtBinaryPath ? [ 121 | // Download llrt binary from GitHub release and cache it 122 | `if [ ! -e ${posix.join(i, cacheDir, 'bootstrap')} ]; then 123 | mkdir -p ${posix.join(i, cacheDir)} 124 | cd ${posix.join(i, cacheDir)} 125 | curl -L -o llrt_temp.zip ${binaryUrl} 126 | unzip llrt_temp.zip 127 | rm -rf llrt_temp.zip 128 | cd - 129 | fi`, 130 | `cp ${posix.join(i, cacheDir, 'bootstrap')} ${o}`, 131 | ] : [`cp ${posix.join(i, props.llrtBinaryPath)} ${posix.join(o, 'bootstrap')}`]; 132 | 133 | super(scope, id, { 134 | // set this to remove an unnecessary environment variable. 135 | awsSdkConnectionReuse: false, 136 | // set this to remove a warning about runtime. we use al2023 runtime anyway. 137 | runtime: new Runtime('nodejs20.x', RuntimeFamily.NODEJS), 138 | ...props, 139 | bundling: { 140 | target, 141 | format: OutputFormat.ESM, 142 | minify: true, 143 | commandHooks: { 144 | beforeBundling: (i, o) => [...(originalCommandHooks?.beforeBundling(i, o) ?? [])], 145 | afterBundling: (i, o) => [...afterBundlingCommandHook(i, o), ...(originalCommandHooks?.afterBundling(i, o) ?? [])], 146 | beforeInstall: (i, o) => [...(originalCommandHooks?.beforeInstall(i, o) ?? [])], 147 | }, 148 | // set this because local bundling will not work on Windows 149 | forceDockerBundling: process.platform == 'win32' ? true : undefined, 150 | // Dependencies bundled in the runtime 151 | // https://github.com/awslabs/llrt?tab=readme-ov-file#using-aws-sdk-v3-with-llrt 152 | externalModules, 153 | ...otherBundlingProps, 154 | }, 155 | }); 156 | 157 | (this.node.defaultChild as CfnResource).addPropertyOverride('Runtime', 'provided.al2023'); 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "36.3.0", 3 | "files": { 4 | "358df072f638d226bc60515a98fa15305e91193108367a0fa01dc626fb9b07d6": { 5 | "source": { 6 | "path": "asset.358df072f638d226bc60515a98fa15305e91193108367a0fa01dc626fb9b07d6.bundle", 7 | "packaging": "zip" 8 | }, 9 | "destinations": { 10 | "current_account-current_region": { 11 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 12 | "objectKey": "358df072f638d226bc60515a98fa15305e91193108367a0fa01dc626fb9b07d6.zip", 13 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 14 | } 15 | } 16 | }, 17 | "bd3a698f8b7be9a74788d7a570d27e6c9dafdc37e931e5101b648aeccae676b5": { 18 | "source": { 19 | "path": "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.template.json", 20 | "packaging": "file" 21 | }, 22 | "destinations": { 23 | "current_account-current_region": { 24 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 25 | "objectKey": "bd3a698f8b7be9a74788d7a570d27e6c9dafdc37e931e5101b648aeccae676b5.json", 26 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 27 | } 28 | } 29 | } 30 | }, 31 | "dockerImages": {} 32 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Resources": { 3 | "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5": { 4 | "Type": "Custom::DeployAssert@SdkCallLambdainvoke", 5 | "Properties": { 6 | "ServiceToken": { 7 | "Fn::GetAtt": [ 8 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", 9 | "Arn" 10 | ] 11 | }, 12 | "service": "Lambda", 13 | "api": "invoke", 14 | "expected": "{\"$ObjectLike\":{\"StatusCode\":200}}", 15 | "parameters": { 16 | "FunctionName": { 17 | "Fn::Join": [ 18 | "", 19 | [ 20 | "\"", 21 | { 22 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefHandler886CB40BD176DC16" 23 | }, 24 | "\"" 25 | ] 26 | ] 27 | } 28 | }, 29 | "flattenResponse": "false", 30 | "salt": "1733200134878" 31 | }, 32 | "UpdateReplacePolicy": "Delete", 33 | "DeletionPolicy": "Delete" 34 | }, 35 | "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5Invoke30065BC0": { 36 | "Type": "AWS::Lambda::Permission", 37 | "Properties": { 38 | "Action": "lambda:InvokeFunction", 39 | "FunctionName": { 40 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefHandler886CB40BD176DC16" 41 | }, 42 | "Principal": { 43 | "Fn::GetAtt": [ 44 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 45 | "Arn" 46 | ] 47 | } 48 | } 49 | }, 50 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { 51 | "Type": "AWS::IAM::Role", 52 | "Properties": { 53 | "AssumeRolePolicyDocument": { 54 | "Version": "2012-10-17", 55 | "Statement": [ 56 | { 57 | "Action": "sts:AssumeRole", 58 | "Effect": "Allow", 59 | "Principal": { 60 | "Service": "lambda.amazonaws.com" 61 | } 62 | } 63 | ] 64 | }, 65 | "ManagedPolicyArns": [ 66 | { 67 | "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 68 | } 69 | ], 70 | "Policies": [ 71 | { 72 | "PolicyName": "Inline", 73 | "PolicyDocument": { 74 | "Version": "2012-10-17", 75 | "Statement": [ 76 | { 77 | "Action": [ 78 | "lambda:Invoke" 79 | ], 80 | "Effect": "Allow", 81 | "Resource": [ 82 | "*" 83 | ] 84 | }, 85 | { 86 | "Action": [ 87 | "lambda:InvokeFunction" 88 | ], 89 | "Effect": "Allow", 90 | "Resource": [ 91 | { 92 | "Fn::Join": [ 93 | "", 94 | [ 95 | "arn:", 96 | { 97 | "Ref": "AWS::Partition" 98 | }, 99 | ":lambda:", 100 | { 101 | "Ref": "AWS::Region" 102 | }, 103 | ":", 104 | { 105 | "Ref": "AWS::AccountId" 106 | }, 107 | ":function:", 108 | { 109 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefHandler886CB40BD176DC16" 110 | } 111 | ] 112 | ] 113 | } 114 | ] 115 | }, 116 | { 117 | "Action": [ 118 | "lambda:Invoke" 119 | ], 120 | "Effect": "Allow", 121 | "Resource": [ 122 | "*" 123 | ] 124 | }, 125 | { 126 | "Action": [ 127 | "lambda:InvokeFunction" 128 | ], 129 | "Effect": "Allow", 130 | "Resource": [ 131 | { 132 | "Fn::Join": [ 133 | "", 134 | [ 135 | "arn:", 136 | { 137 | "Ref": "AWS::Partition" 138 | }, 139 | ":lambda:", 140 | { 141 | "Ref": "AWS::Region" 142 | }, 143 | ":", 144 | { 145 | "Ref": "AWS::AccountId" 146 | }, 147 | ":function:", 148 | { 149 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefArmHandler7C85DE11EB97D217" 150 | } 151 | ] 152 | ] 153 | } 154 | ] 155 | }, 156 | { 157 | "Action": [ 158 | "lambda:Invoke" 159 | ], 160 | "Effect": "Allow", 161 | "Resource": [ 162 | "*" 163 | ] 164 | }, 165 | { 166 | "Action": [ 167 | "lambda:InvokeFunction" 168 | ], 169 | "Effect": "Allow", 170 | "Resource": [ 171 | { 172 | "Fn::Join": [ 173 | "", 174 | [ 175 | "arn:", 176 | { 177 | "Ref": "AWS::Partition" 178 | }, 179 | ":lambda:", 180 | { 181 | "Ref": "AWS::Region" 182 | }, 183 | ":", 184 | { 185 | "Ref": "AWS::AccountId" 186 | }, 187 | ":function:", 188 | { 189 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefFullBinaryHandler1600ED15CBD77B45" 190 | } 191 | ] 192 | ] 193 | } 194 | ] 195 | }, 196 | { 197 | "Action": [ 198 | "lambda:Invoke" 199 | ], 200 | "Effect": "Allow", 201 | "Resource": [ 202 | "*" 203 | ] 204 | }, 205 | { 206 | "Action": [ 207 | "lambda:InvokeFunction" 208 | ], 209 | "Effect": "Allow", 210 | "Resource": [ 211 | { 212 | "Fn::Join": [ 213 | "", 214 | [ 215 | "arn:", 216 | { 217 | "Ref": "AWS::Partition" 218 | }, 219 | ":lambda:", 220 | { 221 | "Ref": "AWS::Region" 222 | }, 223 | ":", 224 | { 225 | "Ref": "AWS::AccountId" 226 | }, 227 | ":function:", 228 | { 229 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A" 230 | } 231 | ] 232 | ] 233 | } 234 | ] 235 | }, 236 | { 237 | "Action": [ 238 | "lambda:Invoke" 239 | ], 240 | "Effect": "Allow", 241 | "Resource": [ 242 | "*" 243 | ] 244 | }, 245 | { 246 | "Action": [ 247 | "lambda:InvokeFunction" 248 | ], 249 | "Effect": "Allow", 250 | "Resource": [ 251 | { 252 | "Fn::Join": [ 253 | "", 254 | [ 255 | "arn:", 256 | { 257 | "Ref": "AWS::Partition" 258 | }, 259 | ":lambda:", 260 | { 261 | "Ref": "AWS::Region" 262 | }, 263 | ":", 264 | { 265 | "Ref": "AWS::AccountId" 266 | }, 267 | ":function:", 268 | { 269 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A" 270 | } 271 | ] 272 | ] 273 | } 274 | ] 275 | } 276 | ] 277 | } 278 | } 279 | ] 280 | } 281 | }, 282 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { 283 | "Type": "AWS::Lambda::Function", 284 | "Properties": { 285 | "Runtime": { 286 | "Fn::FindInMap": [ 287 | "LatestNodeRuntimeMap", 288 | { 289 | "Ref": "AWS::Region" 290 | }, 291 | "value" 292 | ] 293 | }, 294 | "Code": { 295 | "S3Bucket": { 296 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 297 | }, 298 | "S3Key": "358df072f638d226bc60515a98fa15305e91193108367a0fa01dc626fb9b07d6.zip" 299 | }, 300 | "Timeout": 120, 301 | "Handler": "index.handler", 302 | "Role": { 303 | "Fn::GetAtt": [ 304 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 305 | "Arn" 306 | ] 307 | } 308 | } 309 | }, 310 | "LambdaInvoke997059d943474e43661f387022a21092": { 311 | "Type": "Custom::DeployAssert@SdkCallLambdainvoke", 312 | "Properties": { 313 | "ServiceToken": { 314 | "Fn::GetAtt": [ 315 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", 316 | "Arn" 317 | ] 318 | }, 319 | "service": "Lambda", 320 | "api": "invoke", 321 | "expected": "{\"$ObjectLike\":{\"StatusCode\":200}}", 322 | "parameters": { 323 | "FunctionName": { 324 | "Fn::Join": [ 325 | "", 326 | [ 327 | "\"", 328 | { 329 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefArmHandler7C85DE11EB97D217" 330 | }, 331 | "\"" 332 | ] 333 | ] 334 | } 335 | }, 336 | "flattenResponse": "false", 337 | "salt": "1733200134880" 338 | }, 339 | "UpdateReplacePolicy": "Delete", 340 | "DeletionPolicy": "Delete" 341 | }, 342 | "LambdaInvoke997059d943474e43661f387022a21092InvokeCF9E49DC": { 343 | "Type": "AWS::Lambda::Permission", 344 | "Properties": { 345 | "Action": "lambda:InvokeFunction", 346 | "FunctionName": { 347 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefArmHandler7C85DE11EB97D217" 348 | }, 349 | "Principal": { 350 | "Fn::GetAtt": [ 351 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 352 | "Arn" 353 | ] 354 | } 355 | } 356 | }, 357 | "LambdaInvoke240c9f0a69de9952748e2df8d156da40": { 358 | "Type": "Custom::DeployAssert@SdkCallLambdainvoke", 359 | "Properties": { 360 | "ServiceToken": { 361 | "Fn::GetAtt": [ 362 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", 363 | "Arn" 364 | ] 365 | }, 366 | "service": "Lambda", 367 | "api": "invoke", 368 | "expected": "{\"$ObjectLike\":{\"StatusCode\":200}}", 369 | "parameters": { 370 | "FunctionName": { 371 | "Fn::Join": [ 372 | "", 373 | [ 374 | "\"", 375 | { 376 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefFullBinaryHandler1600ED15CBD77B45" 377 | }, 378 | "\"" 379 | ] 380 | ] 381 | } 382 | }, 383 | "flattenResponse": "false", 384 | "salt": "1733200134880" 385 | }, 386 | "UpdateReplacePolicy": "Delete", 387 | "DeletionPolicy": "Delete" 388 | }, 389 | "LambdaInvoke240c9f0a69de9952748e2df8d156da40InvokeCC25FC20": { 390 | "Type": "AWS::Lambda::Permission", 391 | "Properties": { 392 | "Action": "lambda:InvokeFunction", 393 | "FunctionName": { 394 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefFullBinaryHandler1600ED15CBD77B45" 395 | }, 396 | "Principal": { 397 | "Fn::GetAtt": [ 398 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 399 | "Arn" 400 | ] 401 | } 402 | } 403 | }, 404 | "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c": { 405 | "Type": "Custom::DeployAssert@SdkCallLambdainvoke", 406 | "Properties": { 407 | "ServiceToken": { 408 | "Fn::GetAtt": [ 409 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", 410 | "Arn" 411 | ] 412 | }, 413 | "service": "Lambda", 414 | "api": "invoke", 415 | "expected": "{\"$ObjectLike\":{\"StatusCode\":200}}", 416 | "parameters": { 417 | "FunctionName": { 418 | "Fn::Join": [ 419 | "", 420 | [ 421 | "\"", 422 | { 423 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A" 424 | }, 425 | "\"" 426 | ] 427 | ] 428 | } 429 | }, 430 | "flattenResponse": "false", 431 | "salt": "1733200134880" 432 | }, 433 | "UpdateReplacePolicy": "Delete", 434 | "DeletionPolicy": "Delete" 435 | }, 436 | "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9cInvoke0D7AD4ED": { 437 | "Type": "AWS::Lambda::Permission", 438 | "Properties": { 439 | "Action": "lambda:InvokeFunction", 440 | "FunctionName": { 441 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A" 442 | }, 443 | "Principal": { 444 | "Fn::GetAtt": [ 445 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 446 | "Arn" 447 | ] 448 | } 449 | } 450 | }, 451 | "LambdaInvoke69a3388d6e311c7b828bebf747d408cc": { 452 | "Type": "Custom::DeployAssert@SdkCallLambdainvoke", 453 | "Properties": { 454 | "ServiceToken": { 455 | "Fn::GetAtt": [ 456 | "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", 457 | "Arn" 458 | ] 459 | }, 460 | "service": "Lambda", 461 | "api": "invoke", 462 | "expected": "{\"$ObjectLike\":{\"StatusCode\":200}}", 463 | "parameters": { 464 | "FunctionName": { 465 | "Fn::Join": [ 466 | "", 467 | [ 468 | "\"", 469 | { 470 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A" 471 | }, 472 | "\"" 473 | ] 474 | ] 475 | } 476 | }, 477 | "flattenResponse": "false", 478 | "salt": "1733200134881" 479 | }, 480 | "UpdateReplacePolicy": "Delete", 481 | "DeletionPolicy": "Delete" 482 | }, 483 | "LambdaInvoke69a3388d6e311c7b828bebf747d408ccInvoke0D894BB7": { 484 | "Type": "AWS::Lambda::Permission", 485 | "Properties": { 486 | "Action": "lambda:InvokeFunction", 487 | "FunctionName": { 488 | "Fn::ImportValue": "LlrtFunctionIntegTestTarget:ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A" 489 | }, 490 | "Principal": { 491 | "Fn::GetAtt": [ 492 | "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", 493 | "Arn" 494 | ] 495 | } 496 | } 497 | } 498 | }, 499 | "Outputs": { 500 | "AssertionResultsLambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5": { 501 | "Value": { 502 | "Fn::GetAtt": [ 503 | "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5", 504 | "assertion" 505 | ] 506 | } 507 | }, 508 | "AssertionResultsLambdaInvoke997059d943474e43661f387022a21092": { 509 | "Value": { 510 | "Fn::GetAtt": [ 511 | "LambdaInvoke997059d943474e43661f387022a21092", 512 | "assertion" 513 | ] 514 | } 515 | }, 516 | "AssertionResultsLambdaInvoke240c9f0a69de9952748e2df8d156da40": { 517 | "Value": { 518 | "Fn::GetAtt": [ 519 | "LambdaInvoke240c9f0a69de9952748e2df8d156da40", 520 | "assertion" 521 | ] 522 | } 523 | }, 524 | "AssertionResultsLambdaInvokebff0124bbd4116de1f88fc631eeb9a9c": { 525 | "Value": { 526 | "Fn::GetAtt": [ 527 | "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c", 528 | "assertion" 529 | ] 530 | } 531 | }, 532 | "AssertionResultsLambdaInvoke69a3388d6e311c7b828bebf747d408cc": { 533 | "Value": { 534 | "Fn::GetAtt": [ 535 | "LambdaInvoke69a3388d6e311c7b828bebf747d408cc", 536 | "assertion" 537 | ] 538 | } 539 | } 540 | }, 541 | "Mappings": { 542 | "LatestNodeRuntimeMap": { 543 | "af-south-1": { 544 | "value": "nodejs20.x" 545 | }, 546 | "ap-east-1": { 547 | "value": "nodejs20.x" 548 | }, 549 | "ap-northeast-1": { 550 | "value": "nodejs20.x" 551 | }, 552 | "ap-northeast-2": { 553 | "value": "nodejs20.x" 554 | }, 555 | "ap-northeast-3": { 556 | "value": "nodejs20.x" 557 | }, 558 | "ap-south-1": { 559 | "value": "nodejs20.x" 560 | }, 561 | "ap-south-2": { 562 | "value": "nodejs20.x" 563 | }, 564 | "ap-southeast-1": { 565 | "value": "nodejs20.x" 566 | }, 567 | "ap-southeast-2": { 568 | "value": "nodejs20.x" 569 | }, 570 | "ap-southeast-3": { 571 | "value": "nodejs20.x" 572 | }, 573 | "ap-southeast-4": { 574 | "value": "nodejs20.x" 575 | }, 576 | "ap-southeast-5": { 577 | "value": "nodejs20.x" 578 | }, 579 | "ap-southeast-7": { 580 | "value": "nodejs20.x" 581 | }, 582 | "ca-central-1": { 583 | "value": "nodejs20.x" 584 | }, 585 | "ca-west-1": { 586 | "value": "nodejs20.x" 587 | }, 588 | "cn-north-1": { 589 | "value": "nodejs18.x" 590 | }, 591 | "cn-northwest-1": { 592 | "value": "nodejs18.x" 593 | }, 594 | "eu-central-1": { 595 | "value": "nodejs20.x" 596 | }, 597 | "eu-central-2": { 598 | "value": "nodejs20.x" 599 | }, 600 | "eu-isoe-west-1": { 601 | "value": "nodejs18.x" 602 | }, 603 | "eu-north-1": { 604 | "value": "nodejs20.x" 605 | }, 606 | "eu-south-1": { 607 | "value": "nodejs20.x" 608 | }, 609 | "eu-south-2": { 610 | "value": "nodejs20.x" 611 | }, 612 | "eu-west-1": { 613 | "value": "nodejs20.x" 614 | }, 615 | "eu-west-2": { 616 | "value": "nodejs20.x" 617 | }, 618 | "eu-west-3": { 619 | "value": "nodejs20.x" 620 | }, 621 | "il-central-1": { 622 | "value": "nodejs20.x" 623 | }, 624 | "me-central-1": { 625 | "value": "nodejs20.x" 626 | }, 627 | "me-south-1": { 628 | "value": "nodejs20.x" 629 | }, 630 | "mx-central-1": { 631 | "value": "nodejs20.x" 632 | }, 633 | "sa-east-1": { 634 | "value": "nodejs20.x" 635 | }, 636 | "us-east-1": { 637 | "value": "nodejs20.x" 638 | }, 639 | "us-east-2": { 640 | "value": "nodejs20.x" 641 | }, 642 | "us-gov-east-1": { 643 | "value": "nodejs18.x" 644 | }, 645 | "us-gov-west-1": { 646 | "value": "nodejs18.x" 647 | }, 648 | "us-iso-east-1": { 649 | "value": "nodejs18.x" 650 | }, 651 | "us-iso-west-1": { 652 | "value": "nodejs18.x" 653 | }, 654 | "us-isob-east-1": { 655 | "value": "nodejs18.x" 656 | }, 657 | "us-west-1": { 658 | "value": "nodejs20.x" 659 | }, 660 | "us-west-2": { 661 | "value": "nodejs20.x" 662 | } 663 | } 664 | }, 665 | "Parameters": { 666 | "BootstrapVersion": { 667 | "Type": "AWS::SSM::Parameter::Value", 668 | "Default": "/cdk-bootstrap/hnb659fds/version", 669 | "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" 670 | } 671 | }, 672 | "Rules": { 673 | "CheckBootstrapVersion": { 674 | "Assertions": [ 675 | { 676 | "Assert": { 677 | "Fn::Not": [ 678 | { 679 | "Fn::Contains": [ 680 | [ 681 | "1", 682 | "2", 683 | "3", 684 | "4", 685 | "5" 686 | ], 687 | { 688 | "Ref": "BootstrapVersion" 689 | } 690 | ] 691 | } 692 | ] 693 | }, 694 | "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." 695 | } 696 | ] 697 | } 698 | } 699 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/LlrtFunctionIntegTestTarget.assets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "36.3.0", 3 | "files": { 4 | "0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261": { 5 | "source": { 6 | "path": "asset.0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261", 7 | "packaging": "zip" 8 | }, 9 | "destinations": { 10 | "current_account-current_region": { 11 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 12 | "objectKey": "0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261.zip", 13 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 14 | } 15 | } 16 | }, 17 | "3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d": { 18 | "source": { 19 | "path": "asset.3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d", 20 | "packaging": "zip" 21 | }, 22 | "destinations": { 23 | "current_account-current_region": { 24 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 25 | "objectKey": "3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d.zip", 26 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 27 | } 28 | } 29 | }, 30 | "c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2": { 31 | "source": { 32 | "path": "asset.c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2", 33 | "packaging": "zip" 34 | }, 35 | "destinations": { 36 | "current_account-current_region": { 37 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 38 | "objectKey": "c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2.zip", 39 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 40 | } 41 | } 42 | }, 43 | "b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4": { 44 | "source": { 45 | "path": "asset.b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4", 46 | "packaging": "zip" 47 | }, 48 | "destinations": { 49 | "current_account-current_region": { 50 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 51 | "objectKey": "b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4.zip", 52 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 53 | } 54 | } 55 | }, 56 | "ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf": { 57 | "source": { 58 | "path": "asset.ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf", 59 | "packaging": "zip" 60 | }, 61 | "destinations": { 62 | "current_account-current_region": { 63 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 64 | "objectKey": "ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf.zip", 65 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 66 | } 67 | } 68 | }, 69 | "852e9de58b27372c5ca02bd2565917febdce238ff4e376d0c4adf2d1730fe421": { 70 | "source": { 71 | "path": "LlrtFunctionIntegTestTarget.template.json", 72 | "packaging": "file" 73 | }, 74 | "destinations": { 75 | "current_account-current_region": { 76 | "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", 77 | "objectKey": "852e9de58b27372c5ca02bd2565917febdce238ff4e376d0c4adf2d1730fe421.json", 78 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" 79 | } 80 | } 81 | } 82 | }, 83 | "dockerImages": {} 84 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/LlrtFunctionIntegTestTarget.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Resources": { 3 | "HandlerServiceRoleFCDC14AE": { 4 | "Type": "AWS::IAM::Role", 5 | "Properties": { 6 | "AssumeRolePolicyDocument": { 7 | "Statement": [ 8 | { 9 | "Action": "sts:AssumeRole", 10 | "Effect": "Allow", 11 | "Principal": { 12 | "Service": "lambda.amazonaws.com" 13 | } 14 | } 15 | ], 16 | "Version": "2012-10-17" 17 | }, 18 | "ManagedPolicyArns": [ 19 | { 20 | "Fn::Join": [ 21 | "", 22 | [ 23 | "arn:", 24 | { 25 | "Ref": "AWS::Partition" 26 | }, 27 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 28 | ] 29 | ] 30 | } 31 | ] 32 | } 33 | }, 34 | "HandlerServiceRoleDefaultPolicyCBD0CC91": { 35 | "Type": "AWS::IAM::Policy", 36 | "Properties": { 37 | "PolicyDocument": { 38 | "Statement": [ 39 | { 40 | "Action": "s3:ListAllMyBuckets", 41 | "Effect": "Allow", 42 | "Resource": "*" 43 | } 44 | ], 45 | "Version": "2012-10-17" 46 | }, 47 | "PolicyName": "HandlerServiceRoleDefaultPolicyCBD0CC91", 48 | "Roles": [ 49 | { 50 | "Ref": "HandlerServiceRoleFCDC14AE" 51 | } 52 | ] 53 | } 54 | }, 55 | "Handler886CB40B": { 56 | "Type": "AWS::Lambda::Function", 57 | "Properties": { 58 | "Code": { 59 | "S3Bucket": { 60 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 61 | }, 62 | "S3Key": "0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261.zip" 63 | }, 64 | "Handler": "index.handler", 65 | "Role": { 66 | "Fn::GetAtt": [ 67 | "HandlerServiceRoleFCDC14AE", 68 | "Arn" 69 | ] 70 | }, 71 | "Runtime": "provided.al2023" 72 | }, 73 | "DependsOn": [ 74 | "HandlerServiceRoleDefaultPolicyCBD0CC91", 75 | "HandlerServiceRoleFCDC14AE" 76 | ] 77 | }, 78 | "ArmHandlerServiceRole413AC94A": { 79 | "Type": "AWS::IAM::Role", 80 | "Properties": { 81 | "AssumeRolePolicyDocument": { 82 | "Statement": [ 83 | { 84 | "Action": "sts:AssumeRole", 85 | "Effect": "Allow", 86 | "Principal": { 87 | "Service": "lambda.amazonaws.com" 88 | } 89 | } 90 | ], 91 | "Version": "2012-10-17" 92 | }, 93 | "ManagedPolicyArns": [ 94 | { 95 | "Fn::Join": [ 96 | "", 97 | [ 98 | "arn:", 99 | { 100 | "Ref": "AWS::Partition" 101 | }, 102 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 103 | ] 104 | ] 105 | } 106 | ] 107 | } 108 | }, 109 | "ArmHandlerServiceRoleDefaultPolicyB9B1C47C": { 110 | "Type": "AWS::IAM::Policy", 111 | "Properties": { 112 | "PolicyDocument": { 113 | "Statement": [ 114 | { 115 | "Action": "s3:ListAllMyBuckets", 116 | "Effect": "Allow", 117 | "Resource": "*" 118 | } 119 | ], 120 | "Version": "2012-10-17" 121 | }, 122 | "PolicyName": "ArmHandlerServiceRoleDefaultPolicyB9B1C47C", 123 | "Roles": [ 124 | { 125 | "Ref": "ArmHandlerServiceRole413AC94A" 126 | } 127 | ] 128 | } 129 | }, 130 | "ArmHandler7C85DE11": { 131 | "Type": "AWS::Lambda::Function", 132 | "Properties": { 133 | "Architectures": [ 134 | "arm64" 135 | ], 136 | "Code": { 137 | "S3Bucket": { 138 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 139 | }, 140 | "S3Key": "3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d.zip" 141 | }, 142 | "Handler": "index.handler", 143 | "Role": { 144 | "Fn::GetAtt": [ 145 | "ArmHandlerServiceRole413AC94A", 146 | "Arn" 147 | ] 148 | }, 149 | "Runtime": "provided.al2023" 150 | }, 151 | "DependsOn": [ 152 | "ArmHandlerServiceRoleDefaultPolicyB9B1C47C", 153 | "ArmHandlerServiceRole413AC94A" 154 | ] 155 | }, 156 | "FullBinaryHandlerServiceRole27DAC75C": { 157 | "Type": "AWS::IAM::Role", 158 | "Properties": { 159 | "AssumeRolePolicyDocument": { 160 | "Statement": [ 161 | { 162 | "Action": "sts:AssumeRole", 163 | "Effect": "Allow", 164 | "Principal": { 165 | "Service": "lambda.amazonaws.com" 166 | } 167 | } 168 | ], 169 | "Version": "2012-10-17" 170 | }, 171 | "ManagedPolicyArns": [ 172 | { 173 | "Fn::Join": [ 174 | "", 175 | [ 176 | "arn:", 177 | { 178 | "Ref": "AWS::Partition" 179 | }, 180 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 181 | ] 182 | ] 183 | } 184 | ] 185 | } 186 | }, 187 | "FullBinaryHandlerServiceRoleDefaultPolicy6A254230": { 188 | "Type": "AWS::IAM::Policy", 189 | "Properties": { 190 | "PolicyDocument": { 191 | "Statement": [ 192 | { 193 | "Action": "s3:ListAllMyBuckets", 194 | "Effect": "Allow", 195 | "Resource": "*" 196 | } 197 | ], 198 | "Version": "2012-10-17" 199 | }, 200 | "PolicyName": "FullBinaryHandlerServiceRoleDefaultPolicy6A254230", 201 | "Roles": [ 202 | { 203 | "Ref": "FullBinaryHandlerServiceRole27DAC75C" 204 | } 205 | ] 206 | } 207 | }, 208 | "FullBinaryHandler1600ED15": { 209 | "Type": "AWS::Lambda::Function", 210 | "Properties": { 211 | "Code": { 212 | "S3Bucket": { 213 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 214 | }, 215 | "S3Key": "c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2.zip" 216 | }, 217 | "Handler": "index.handler", 218 | "Role": { 219 | "Fn::GetAtt": [ 220 | "FullBinaryHandlerServiceRole27DAC75C", 221 | "Arn" 222 | ] 223 | }, 224 | "Runtime": "provided.al2023" 225 | }, 226 | "DependsOn": [ 227 | "FullBinaryHandlerServiceRoleDefaultPolicy6A254230", 228 | "FullBinaryHandlerServiceRole27DAC75C" 229 | ] 230 | }, 231 | "NoSdkBinaryHandlerServiceRole8CABE201": { 232 | "Type": "AWS::IAM::Role", 233 | "Properties": { 234 | "AssumeRolePolicyDocument": { 235 | "Statement": [ 236 | { 237 | "Action": "sts:AssumeRole", 238 | "Effect": "Allow", 239 | "Principal": { 240 | "Service": "lambda.amazonaws.com" 241 | } 242 | } 243 | ], 244 | "Version": "2012-10-17" 245 | }, 246 | "ManagedPolicyArns": [ 247 | { 248 | "Fn::Join": [ 249 | "", 250 | [ 251 | "arn:", 252 | { 253 | "Ref": "AWS::Partition" 254 | }, 255 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 256 | ] 257 | ] 258 | } 259 | ] 260 | } 261 | }, 262 | "NoSdkBinaryHandlerServiceRoleDefaultPolicyDC9BBD8B": { 263 | "Type": "AWS::IAM::Policy", 264 | "Properties": { 265 | "PolicyDocument": { 266 | "Statement": [ 267 | { 268 | "Action": "s3:ListAllMyBuckets", 269 | "Effect": "Allow", 270 | "Resource": "*" 271 | } 272 | ], 273 | "Version": "2012-10-17" 274 | }, 275 | "PolicyName": "NoSdkBinaryHandlerServiceRoleDefaultPolicyDC9BBD8B", 276 | "Roles": [ 277 | { 278 | "Ref": "NoSdkBinaryHandlerServiceRole8CABE201" 279 | } 280 | ] 281 | } 282 | }, 283 | "NoSdkBinaryHandler3ED82436": { 284 | "Type": "AWS::Lambda::Function", 285 | "Properties": { 286 | "Code": { 287 | "S3Bucket": { 288 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 289 | }, 290 | "S3Key": "b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4.zip" 291 | }, 292 | "Handler": "index.handler", 293 | "Role": { 294 | "Fn::GetAtt": [ 295 | "NoSdkBinaryHandlerServiceRole8CABE201", 296 | "Arn" 297 | ] 298 | }, 299 | "Runtime": "provided.al2023" 300 | }, 301 | "DependsOn": [ 302 | "NoSdkBinaryHandlerServiceRoleDefaultPolicyDC9BBD8B", 303 | "NoSdkBinaryHandlerServiceRole8CABE201" 304 | ] 305 | }, 306 | "CustomBinaryHandlerServiceRoleCF90F487": { 307 | "Type": "AWS::IAM::Role", 308 | "Properties": { 309 | "AssumeRolePolicyDocument": { 310 | "Statement": [ 311 | { 312 | "Action": "sts:AssumeRole", 313 | "Effect": "Allow", 314 | "Principal": { 315 | "Service": "lambda.amazonaws.com" 316 | } 317 | } 318 | ], 319 | "Version": "2012-10-17" 320 | }, 321 | "ManagedPolicyArns": [ 322 | { 323 | "Fn::Join": [ 324 | "", 325 | [ 326 | "arn:", 327 | { 328 | "Ref": "AWS::Partition" 329 | }, 330 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 331 | ] 332 | ] 333 | } 334 | ] 335 | } 336 | }, 337 | "CustomBinaryHandlerServiceRoleDefaultPolicyED2FBAA6": { 338 | "Type": "AWS::IAM::Policy", 339 | "Properties": { 340 | "PolicyDocument": { 341 | "Statement": [ 342 | { 343 | "Action": "s3:ListAllMyBuckets", 344 | "Effect": "Allow", 345 | "Resource": "*" 346 | } 347 | ], 348 | "Version": "2012-10-17" 349 | }, 350 | "PolicyName": "CustomBinaryHandlerServiceRoleDefaultPolicyED2FBAA6", 351 | "Roles": [ 352 | { 353 | "Ref": "CustomBinaryHandlerServiceRoleCF90F487" 354 | } 355 | ] 356 | } 357 | }, 358 | "CustomBinaryHandler641A933E": { 359 | "Type": "AWS::Lambda::Function", 360 | "Properties": { 361 | "Code": { 362 | "S3Bucket": { 363 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 364 | }, 365 | "S3Key": "ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf.zip" 366 | }, 367 | "Handler": "index.handler", 368 | "Role": { 369 | "Fn::GetAtt": [ 370 | "CustomBinaryHandlerServiceRoleCF90F487", 371 | "Arn" 372 | ] 373 | }, 374 | "Runtime": "provided.al2023" 375 | }, 376 | "DependsOn": [ 377 | "CustomBinaryHandlerServiceRoleDefaultPolicyED2FBAA6", 378 | "CustomBinaryHandlerServiceRoleCF90F487" 379 | ] 380 | } 381 | }, 382 | "Outputs": { 383 | "ExportsOutputRefHandler886CB40BD176DC16": { 384 | "Value": { 385 | "Ref": "Handler886CB40B" 386 | }, 387 | "Export": { 388 | "Name": "LlrtFunctionIntegTestTarget:ExportsOutputRefHandler886CB40BD176DC16" 389 | } 390 | }, 391 | "ExportsOutputRefArmHandler7C85DE11EB97D217": { 392 | "Value": { 393 | "Ref": "ArmHandler7C85DE11" 394 | }, 395 | "Export": { 396 | "Name": "LlrtFunctionIntegTestTarget:ExportsOutputRefArmHandler7C85DE11EB97D217" 397 | } 398 | }, 399 | "ExportsOutputRefFullBinaryHandler1600ED15CBD77B45": { 400 | "Value": { 401 | "Ref": "FullBinaryHandler1600ED15" 402 | }, 403 | "Export": { 404 | "Name": "LlrtFunctionIntegTestTarget:ExportsOutputRefFullBinaryHandler1600ED15CBD77B45" 405 | } 406 | }, 407 | "ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A": { 408 | "Value": { 409 | "Ref": "NoSdkBinaryHandler3ED82436" 410 | }, 411 | "Export": { 412 | "Name": "LlrtFunctionIntegTestTarget:ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A" 413 | } 414 | }, 415 | "ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A": { 416 | "Value": { 417 | "Ref": "CustomBinaryHandler641A933E" 418 | }, 419 | "Export": { 420 | "Name": "LlrtFunctionIntegTestTarget:ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A" 421 | } 422 | } 423 | }, 424 | "Parameters": { 425 | "BootstrapVersion": { 426 | "Type": "AWS::SSM::Parameter::Value", 427 | "Default": "/cdk-bootstrap/hnb659fds/version", 428 | "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" 429 | } 430 | }, 431 | "Rules": { 432 | "CheckBootstrapVersion": { 433 | "Assertions": [ 434 | { 435 | "Assert": { 436 | "Fn::Not": [ 437 | { 438 | "Fn::Contains": [ 439 | [ 440 | "1", 441 | "2", 442 | "3", 443 | "4", 444 | "5" 445 | ], 446 | { 447 | "Ref": "BootstrapVersion" 448 | } 449 | ] 450 | } 451 | ] 452 | }, 453 | "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." 454 | } 455 | ] 456 | } 457 | } 458 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/test/integ.llrt-function.js.snapshot/asset.0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261/bootstrap -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261/index.mjs: -------------------------------------------------------------------------------- 1 | import{ListBucketsCommand as t,S3Client as e}from"@aws-sdk/client-s3";var o=new e({}),c=async(s,r)=>{let n=await o.send(new t({}));console.log(n)};export{c as handler}; 2 | -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/test/integ.llrt-function.js.snapshot/asset.3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d/bootstrap -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d/index.mjs: -------------------------------------------------------------------------------- 1 | import{ListBucketsCommand as t,S3Client as e}from"@aws-sdk/client-s3";var o=new e({}),c=async(s,r)=>{let n=await o.send(new t({}));console.log(n)};export{c as handler}; 2 | -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/test/integ.llrt-function.js.snapshot/asset.b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4/bootstrap -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/test/integ.llrt-function.js.snapshot/asset.c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2/bootstrap -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2/index.mjs: -------------------------------------------------------------------------------- 1 | import{ListBucketsCommand as t,S3Client as e}from"@aws-sdk/client-s3";var o=new e({}),c=async(s,r)=>{let n=await o.send(new t({}));console.log(n)};export{c as handler}; 2 | -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/asset.ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf/bootstrap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tmokmss/cdk-lambda-llrt/16bc734f2922a8c6f039a18b4e1c40e7cbf1af0b/test/integ.llrt-function.js.snapshot/asset.ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf/bootstrap -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/cdk.out: -------------------------------------------------------------------------------- 1 | {"version":"36.3.0"} -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/integ.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "36.3.0", 3 | "testCases": { 4 | "LlrtFunctionIntegTest/DefaultTest": { 5 | "stacks": [ 6 | "LlrtFunctionIntegTestTarget" 7 | ], 8 | "diffAssets": true, 9 | "assertionStack": "LlrtFunctionIntegTest/DefaultTest/DeployAssert", 10 | "assertionStackName": "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "36.0.24", 3 | "artifacts": { 4 | "LlrtFunctionIntegTestTarget.assets": { 5 | "type": "cdk:asset-manifest", 6 | "properties": { 7 | "file": "LlrtFunctionIntegTestTarget.assets.json", 8 | "requiresBootstrapStackVersion": 6, 9 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" 10 | } 11 | }, 12 | "LlrtFunctionIntegTestTarget": { 13 | "type": "aws:cloudformation:stack", 14 | "environment": "aws://unknown-account/unknown-region", 15 | "properties": { 16 | "templateFile": "LlrtFunctionIntegTestTarget.template.json", 17 | "terminationProtection": false, 18 | "validateOnSynth": false, 19 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", 20 | "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", 21 | "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/852e9de58b27372c5ca02bd2565917febdce238ff4e376d0c4adf2d1730fe421.json", 22 | "requiresBootstrapStackVersion": 6, 23 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", 24 | "additionalDependencies": [ 25 | "LlrtFunctionIntegTestTarget.assets" 26 | ], 27 | "lookupRole": { 28 | "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", 29 | "requiresBootstrapStackVersion": 8, 30 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" 31 | } 32 | }, 33 | "dependencies": [ 34 | "LlrtFunctionIntegTestTarget.assets" 35 | ], 36 | "metadata": { 37 | "/LlrtFunctionIntegTestTarget/Handler/ServiceRole/Resource": [ 38 | { 39 | "type": "aws:cdk:logicalId", 40 | "data": "HandlerServiceRoleFCDC14AE" 41 | } 42 | ], 43 | "/LlrtFunctionIntegTestTarget/Handler/ServiceRole/DefaultPolicy/Resource": [ 44 | { 45 | "type": "aws:cdk:logicalId", 46 | "data": "HandlerServiceRoleDefaultPolicyCBD0CC91" 47 | } 48 | ], 49 | "/LlrtFunctionIntegTestTarget/Handler/Resource": [ 50 | { 51 | "type": "aws:cdk:logicalId", 52 | "data": "Handler886CB40B" 53 | } 54 | ], 55 | "/LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/Resource": [ 56 | { 57 | "type": "aws:cdk:logicalId", 58 | "data": "ArmHandlerServiceRole413AC94A" 59 | } 60 | ], 61 | "/LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/DefaultPolicy/Resource": [ 62 | { 63 | "type": "aws:cdk:logicalId", 64 | "data": "ArmHandlerServiceRoleDefaultPolicyB9B1C47C" 65 | } 66 | ], 67 | "/LlrtFunctionIntegTestTarget/ArmHandler/Resource": [ 68 | { 69 | "type": "aws:cdk:logicalId", 70 | "data": "ArmHandler7C85DE11" 71 | } 72 | ], 73 | "/LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/Resource": [ 74 | { 75 | "type": "aws:cdk:logicalId", 76 | "data": "FullBinaryHandlerServiceRole27DAC75C" 77 | } 78 | ], 79 | "/LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/DefaultPolicy/Resource": [ 80 | { 81 | "type": "aws:cdk:logicalId", 82 | "data": "FullBinaryHandlerServiceRoleDefaultPolicy6A254230" 83 | } 84 | ], 85 | "/LlrtFunctionIntegTestTarget/FullBinaryHandler/Resource": [ 86 | { 87 | "type": "aws:cdk:logicalId", 88 | "data": "FullBinaryHandler1600ED15" 89 | } 90 | ], 91 | "/LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/Resource": [ 92 | { 93 | "type": "aws:cdk:logicalId", 94 | "data": "NoSdkBinaryHandlerServiceRole8CABE201" 95 | } 96 | ], 97 | "/LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/DefaultPolicy/Resource": [ 98 | { 99 | "type": "aws:cdk:logicalId", 100 | "data": "NoSdkBinaryHandlerServiceRoleDefaultPolicyDC9BBD8B" 101 | } 102 | ], 103 | "/LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/Resource": [ 104 | { 105 | "type": "aws:cdk:logicalId", 106 | "data": "NoSdkBinaryHandler3ED82436" 107 | } 108 | ], 109 | "/LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/Resource": [ 110 | { 111 | "type": "aws:cdk:logicalId", 112 | "data": "CustomBinaryHandlerServiceRoleCF90F487" 113 | } 114 | ], 115 | "/LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/DefaultPolicy/Resource": [ 116 | { 117 | "type": "aws:cdk:logicalId", 118 | "data": "CustomBinaryHandlerServiceRoleDefaultPolicyED2FBAA6" 119 | } 120 | ], 121 | "/LlrtFunctionIntegTestTarget/CustomBinaryHandler/Resource": [ 122 | { 123 | "type": "aws:cdk:logicalId", 124 | "data": "CustomBinaryHandler641A933E" 125 | } 126 | ], 127 | "/LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"Handler886CB40B\"}": [ 128 | { 129 | "type": "aws:cdk:logicalId", 130 | "data": "ExportsOutputRefHandler886CB40BD176DC16" 131 | } 132 | ], 133 | "/LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"ArmHandler7C85DE11\"}": [ 134 | { 135 | "type": "aws:cdk:logicalId", 136 | "data": "ExportsOutputRefArmHandler7C85DE11EB97D217" 137 | } 138 | ], 139 | "/LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"FullBinaryHandler1600ED15\"}": [ 140 | { 141 | "type": "aws:cdk:logicalId", 142 | "data": "ExportsOutputRefFullBinaryHandler1600ED15CBD77B45" 143 | } 144 | ], 145 | "/LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"NoSdkBinaryHandler3ED82436\"}": [ 146 | { 147 | "type": "aws:cdk:logicalId", 148 | "data": "ExportsOutputRefNoSdkBinaryHandler3ED82436DB24739A" 149 | } 150 | ], 151 | "/LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"CustomBinaryHandler641A933E\"}": [ 152 | { 153 | "type": "aws:cdk:logicalId", 154 | "data": "ExportsOutputRefCustomBinaryHandler641A933E54DF1A2A" 155 | } 156 | ], 157 | "/LlrtFunctionIntegTestTarget/BootstrapVersion": [ 158 | { 159 | "type": "aws:cdk:logicalId", 160 | "data": "BootstrapVersion" 161 | } 162 | ], 163 | "/LlrtFunctionIntegTestTarget/CheckBootstrapVersion": [ 164 | { 165 | "type": "aws:cdk:logicalId", 166 | "data": "CheckBootstrapVersion" 167 | } 168 | ] 169 | }, 170 | "displayName": "LlrtFunctionIntegTestTarget" 171 | }, 172 | "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets": { 173 | "type": "cdk:asset-manifest", 174 | "properties": { 175 | "file": "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets.json", 176 | "requiresBootstrapStackVersion": 6, 177 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" 178 | } 179 | }, 180 | "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976": { 181 | "type": "aws:cloudformation:stack", 182 | "environment": "aws://unknown-account/unknown-region", 183 | "properties": { 184 | "templateFile": "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.template.json", 185 | "terminationProtection": false, 186 | "validateOnSynth": false, 187 | "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", 188 | "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", 189 | "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/bd3a698f8b7be9a74788d7a570d27e6c9dafdc37e931e5101b648aeccae676b5.json", 190 | "requiresBootstrapStackVersion": 6, 191 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", 192 | "additionalDependencies": [ 193 | "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets" 194 | ], 195 | "lookupRole": { 196 | "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", 197 | "requiresBootstrapStackVersion": 8, 198 | "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" 199 | } 200 | }, 201 | "dependencies": [ 202 | "LlrtFunctionIntegTestTarget", 203 | "LlrtFunctionIntegTestDefaultTestDeployAssertF3D2B976.assets" 204 | ], 205 | "metadata": { 206 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/Default/Default": [ 207 | { 208 | "type": "aws:cdk:logicalId", 209 | "data": "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5" 210 | } 211 | ], 212 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/Invoke": [ 213 | { 214 | "type": "aws:cdk:logicalId", 215 | "data": "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5Invoke30065BC0" 216 | } 217 | ], 218 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/AssertionResults": [ 219 | { 220 | "type": "aws:cdk:logicalId", 221 | "data": "AssertionResultsLambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5" 222 | } 223 | ], 224 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ 225 | { 226 | "type": "aws:cdk:logicalId", 227 | "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" 228 | } 229 | ], 230 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ 231 | { 232 | "type": "aws:cdk:logicalId", 233 | "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" 234 | } 235 | ], 236 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LatestNodeRuntimeMap": [ 237 | { 238 | "type": "aws:cdk:logicalId", 239 | "data": "LatestNodeRuntimeMap" 240 | } 241 | ], 242 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/Default/Default": [ 243 | { 244 | "type": "aws:cdk:logicalId", 245 | "data": "LambdaInvoke997059d943474e43661f387022a21092" 246 | } 247 | ], 248 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/Invoke": [ 249 | { 250 | "type": "aws:cdk:logicalId", 251 | "data": "LambdaInvoke997059d943474e43661f387022a21092InvokeCF9E49DC" 252 | } 253 | ], 254 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/AssertionResults": [ 255 | { 256 | "type": "aws:cdk:logicalId", 257 | "data": "AssertionResultsLambdaInvoke997059d943474e43661f387022a21092" 258 | } 259 | ], 260 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/Default/Default": [ 261 | { 262 | "type": "aws:cdk:logicalId", 263 | "data": "LambdaInvoke240c9f0a69de9952748e2df8d156da40" 264 | } 265 | ], 266 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/Invoke": [ 267 | { 268 | "type": "aws:cdk:logicalId", 269 | "data": "LambdaInvoke240c9f0a69de9952748e2df8d156da40InvokeCC25FC20" 270 | } 271 | ], 272 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/AssertionResults": [ 273 | { 274 | "type": "aws:cdk:logicalId", 275 | "data": "AssertionResultsLambdaInvoke240c9f0a69de9952748e2df8d156da40" 276 | } 277 | ], 278 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/Default/Default": [ 279 | { 280 | "type": "aws:cdk:logicalId", 281 | "data": "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c" 282 | } 283 | ], 284 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/Invoke": [ 285 | { 286 | "type": "aws:cdk:logicalId", 287 | "data": "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9cInvoke0D7AD4ED" 288 | } 289 | ], 290 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/AssertionResults": [ 291 | { 292 | "type": "aws:cdk:logicalId", 293 | "data": "AssertionResultsLambdaInvokebff0124bbd4116de1f88fc631eeb9a9c" 294 | } 295 | ], 296 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/Default/Default": [ 297 | { 298 | "type": "aws:cdk:logicalId", 299 | "data": "LambdaInvoke69a3388d6e311c7b828bebf747d408cc" 300 | } 301 | ], 302 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/Invoke": [ 303 | { 304 | "type": "aws:cdk:logicalId", 305 | "data": "LambdaInvoke69a3388d6e311c7b828bebf747d408ccInvoke0D894BB7" 306 | } 307 | ], 308 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/AssertionResults": [ 309 | { 310 | "type": "aws:cdk:logicalId", 311 | "data": "AssertionResultsLambdaInvoke69a3388d6e311c7b828bebf747d408cc" 312 | } 313 | ], 314 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/BootstrapVersion": [ 315 | { 316 | "type": "aws:cdk:logicalId", 317 | "data": "BootstrapVersion" 318 | } 319 | ], 320 | "/LlrtFunctionIntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [ 321 | { 322 | "type": "aws:cdk:logicalId", 323 | "data": "CheckBootstrapVersion" 324 | } 325 | ] 326 | }, 327 | "displayName": "LlrtFunctionIntegTest/DefaultTest/DeployAssert" 328 | }, 329 | "Tree": { 330 | "type": "cdk:tree", 331 | "properties": { 332 | "file": "tree.json" 333 | } 334 | } 335 | } 336 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.js.snapshot/tree.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "tree-0.1", 3 | "tree": { 4 | "id": "App", 5 | "path": "", 6 | "children": { 7 | "LlrtFunctionIntegTestTarget": { 8 | "id": "LlrtFunctionIntegTestTarget", 9 | "path": "LlrtFunctionIntegTestTarget", 10 | "children": { 11 | "Handler": { 12 | "id": "Handler", 13 | "path": "LlrtFunctionIntegTestTarget/Handler", 14 | "children": { 15 | "ServiceRole": { 16 | "id": "ServiceRole", 17 | "path": "LlrtFunctionIntegTestTarget/Handler/ServiceRole", 18 | "children": { 19 | "ImportServiceRole": { 20 | "id": "ImportServiceRole", 21 | "path": "LlrtFunctionIntegTestTarget/Handler/ServiceRole/ImportServiceRole", 22 | "constructInfo": { 23 | "fqn": "aws-cdk-lib.Resource", 24 | "version": "2.159.0" 25 | } 26 | }, 27 | "Resource": { 28 | "id": "Resource", 29 | "path": "LlrtFunctionIntegTestTarget/Handler/ServiceRole/Resource", 30 | "attributes": { 31 | "aws:cdk:cloudformation:type": "AWS::IAM::Role", 32 | "aws:cdk:cloudformation:props": { 33 | "assumeRolePolicyDocument": { 34 | "Statement": [ 35 | { 36 | "Action": "sts:AssumeRole", 37 | "Effect": "Allow", 38 | "Principal": { 39 | "Service": "lambda.amazonaws.com" 40 | } 41 | } 42 | ], 43 | "Version": "2012-10-17" 44 | }, 45 | "managedPolicyArns": [ 46 | { 47 | "Fn::Join": [ 48 | "", 49 | [ 50 | "arn:", 51 | { 52 | "Ref": "AWS::Partition" 53 | }, 54 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 55 | ] 56 | ] 57 | } 58 | ] 59 | } 60 | }, 61 | "constructInfo": { 62 | "fqn": "aws-cdk-lib.aws_iam.CfnRole", 63 | "version": "2.159.0" 64 | } 65 | }, 66 | "DefaultPolicy": { 67 | "id": "DefaultPolicy", 68 | "path": "LlrtFunctionIntegTestTarget/Handler/ServiceRole/DefaultPolicy", 69 | "children": { 70 | "Resource": { 71 | "id": "Resource", 72 | "path": "LlrtFunctionIntegTestTarget/Handler/ServiceRole/DefaultPolicy/Resource", 73 | "attributes": { 74 | "aws:cdk:cloudformation:type": "AWS::IAM::Policy", 75 | "aws:cdk:cloudformation:props": { 76 | "policyDocument": { 77 | "Statement": [ 78 | { 79 | "Action": "s3:ListAllMyBuckets", 80 | "Effect": "Allow", 81 | "Resource": "*" 82 | } 83 | ], 84 | "Version": "2012-10-17" 85 | }, 86 | "policyName": "HandlerServiceRoleDefaultPolicyCBD0CC91", 87 | "roles": [ 88 | { 89 | "Ref": "HandlerServiceRoleFCDC14AE" 90 | } 91 | ] 92 | } 93 | }, 94 | "constructInfo": { 95 | "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", 96 | "version": "2.159.0" 97 | } 98 | } 99 | }, 100 | "constructInfo": { 101 | "fqn": "aws-cdk-lib.aws_iam.Policy", 102 | "version": "2.159.0" 103 | } 104 | } 105 | }, 106 | "constructInfo": { 107 | "fqn": "aws-cdk-lib.aws_iam.Role", 108 | "version": "2.159.0" 109 | } 110 | }, 111 | "Code": { 112 | "id": "Code", 113 | "path": "LlrtFunctionIntegTestTarget/Handler/Code", 114 | "children": { 115 | "Stage": { 116 | "id": "Stage", 117 | "path": "LlrtFunctionIntegTestTarget/Handler/Code/Stage", 118 | "constructInfo": { 119 | "fqn": "aws-cdk-lib.AssetStaging", 120 | "version": "2.159.0" 121 | } 122 | }, 123 | "AssetBucket": { 124 | "id": "AssetBucket", 125 | "path": "LlrtFunctionIntegTestTarget/Handler/Code/AssetBucket", 126 | "constructInfo": { 127 | "fqn": "aws-cdk-lib.aws_s3.BucketBase", 128 | "version": "2.159.0" 129 | } 130 | } 131 | }, 132 | "constructInfo": { 133 | "fqn": "aws-cdk-lib.aws_s3_assets.Asset", 134 | "version": "2.159.0" 135 | } 136 | }, 137 | "Resource": { 138 | "id": "Resource", 139 | "path": "LlrtFunctionIntegTestTarget/Handler/Resource", 140 | "attributes": { 141 | "aws:cdk:cloudformation:type": "AWS::Lambda::Function", 142 | "aws:cdk:cloudformation:props": { 143 | "code": { 144 | "s3Bucket": { 145 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 146 | }, 147 | "s3Key": "0d077c4f0f614ee0dabf2c844841f52bd406132de209b3a3b8770cb0cbece261.zip" 148 | }, 149 | "handler": "index.handler", 150 | "role": { 151 | "Fn::GetAtt": [ 152 | "HandlerServiceRoleFCDC14AE", 153 | "Arn" 154 | ] 155 | }, 156 | "runtime": "nodejs20.x" 157 | } 158 | }, 159 | "constructInfo": { 160 | "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", 161 | "version": "2.159.0" 162 | } 163 | } 164 | }, 165 | "constructInfo": { 166 | "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", 167 | "version": "2.159.0" 168 | } 169 | }, 170 | "ArmHandler": { 171 | "id": "ArmHandler", 172 | "path": "LlrtFunctionIntegTestTarget/ArmHandler", 173 | "children": { 174 | "ServiceRole": { 175 | "id": "ServiceRole", 176 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole", 177 | "children": { 178 | "ImportServiceRole": { 179 | "id": "ImportServiceRole", 180 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/ImportServiceRole", 181 | "constructInfo": { 182 | "fqn": "aws-cdk-lib.Resource", 183 | "version": "2.159.0" 184 | } 185 | }, 186 | "Resource": { 187 | "id": "Resource", 188 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/Resource", 189 | "attributes": { 190 | "aws:cdk:cloudformation:type": "AWS::IAM::Role", 191 | "aws:cdk:cloudformation:props": { 192 | "assumeRolePolicyDocument": { 193 | "Statement": [ 194 | { 195 | "Action": "sts:AssumeRole", 196 | "Effect": "Allow", 197 | "Principal": { 198 | "Service": "lambda.amazonaws.com" 199 | } 200 | } 201 | ], 202 | "Version": "2012-10-17" 203 | }, 204 | "managedPolicyArns": [ 205 | { 206 | "Fn::Join": [ 207 | "", 208 | [ 209 | "arn:", 210 | { 211 | "Ref": "AWS::Partition" 212 | }, 213 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 214 | ] 215 | ] 216 | } 217 | ] 218 | } 219 | }, 220 | "constructInfo": { 221 | "fqn": "aws-cdk-lib.aws_iam.CfnRole", 222 | "version": "2.159.0" 223 | } 224 | }, 225 | "DefaultPolicy": { 226 | "id": "DefaultPolicy", 227 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/DefaultPolicy", 228 | "children": { 229 | "Resource": { 230 | "id": "Resource", 231 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/ServiceRole/DefaultPolicy/Resource", 232 | "attributes": { 233 | "aws:cdk:cloudformation:type": "AWS::IAM::Policy", 234 | "aws:cdk:cloudformation:props": { 235 | "policyDocument": { 236 | "Statement": [ 237 | { 238 | "Action": "s3:ListAllMyBuckets", 239 | "Effect": "Allow", 240 | "Resource": "*" 241 | } 242 | ], 243 | "Version": "2012-10-17" 244 | }, 245 | "policyName": "ArmHandlerServiceRoleDefaultPolicyB9B1C47C", 246 | "roles": [ 247 | { 248 | "Ref": "ArmHandlerServiceRole413AC94A" 249 | } 250 | ] 251 | } 252 | }, 253 | "constructInfo": { 254 | "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", 255 | "version": "2.159.0" 256 | } 257 | } 258 | }, 259 | "constructInfo": { 260 | "fqn": "aws-cdk-lib.aws_iam.Policy", 261 | "version": "2.159.0" 262 | } 263 | } 264 | }, 265 | "constructInfo": { 266 | "fqn": "aws-cdk-lib.aws_iam.Role", 267 | "version": "2.159.0" 268 | } 269 | }, 270 | "Code": { 271 | "id": "Code", 272 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/Code", 273 | "children": { 274 | "Stage": { 275 | "id": "Stage", 276 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/Code/Stage", 277 | "constructInfo": { 278 | "fqn": "aws-cdk-lib.AssetStaging", 279 | "version": "2.159.0" 280 | } 281 | }, 282 | "AssetBucket": { 283 | "id": "AssetBucket", 284 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/Code/AssetBucket", 285 | "constructInfo": { 286 | "fqn": "aws-cdk-lib.aws_s3.BucketBase", 287 | "version": "2.159.0" 288 | } 289 | } 290 | }, 291 | "constructInfo": { 292 | "fqn": "aws-cdk-lib.aws_s3_assets.Asset", 293 | "version": "2.159.0" 294 | } 295 | }, 296 | "Resource": { 297 | "id": "Resource", 298 | "path": "LlrtFunctionIntegTestTarget/ArmHandler/Resource", 299 | "attributes": { 300 | "aws:cdk:cloudformation:type": "AWS::Lambda::Function", 301 | "aws:cdk:cloudformation:props": { 302 | "architectures": [ 303 | "arm64" 304 | ], 305 | "code": { 306 | "s3Bucket": { 307 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 308 | }, 309 | "s3Key": "3f0df07c5f0a1a9557efff2713b8a732630ff0c9c6bc561edf6fd42d2777d26d.zip" 310 | }, 311 | "handler": "index.handler", 312 | "role": { 313 | "Fn::GetAtt": [ 314 | "ArmHandlerServiceRole413AC94A", 315 | "Arn" 316 | ] 317 | }, 318 | "runtime": "nodejs20.x" 319 | } 320 | }, 321 | "constructInfo": { 322 | "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", 323 | "version": "2.159.0" 324 | } 325 | } 326 | }, 327 | "constructInfo": { 328 | "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", 329 | "version": "2.159.0" 330 | } 331 | }, 332 | "FullBinaryHandler": { 333 | "id": "FullBinaryHandler", 334 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler", 335 | "children": { 336 | "ServiceRole": { 337 | "id": "ServiceRole", 338 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole", 339 | "children": { 340 | "ImportServiceRole": { 341 | "id": "ImportServiceRole", 342 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/ImportServiceRole", 343 | "constructInfo": { 344 | "fqn": "aws-cdk-lib.Resource", 345 | "version": "2.159.0" 346 | } 347 | }, 348 | "Resource": { 349 | "id": "Resource", 350 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/Resource", 351 | "attributes": { 352 | "aws:cdk:cloudformation:type": "AWS::IAM::Role", 353 | "aws:cdk:cloudformation:props": { 354 | "assumeRolePolicyDocument": { 355 | "Statement": [ 356 | { 357 | "Action": "sts:AssumeRole", 358 | "Effect": "Allow", 359 | "Principal": { 360 | "Service": "lambda.amazonaws.com" 361 | } 362 | } 363 | ], 364 | "Version": "2012-10-17" 365 | }, 366 | "managedPolicyArns": [ 367 | { 368 | "Fn::Join": [ 369 | "", 370 | [ 371 | "arn:", 372 | { 373 | "Ref": "AWS::Partition" 374 | }, 375 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 376 | ] 377 | ] 378 | } 379 | ] 380 | } 381 | }, 382 | "constructInfo": { 383 | "fqn": "aws-cdk-lib.aws_iam.CfnRole", 384 | "version": "2.159.0" 385 | } 386 | }, 387 | "DefaultPolicy": { 388 | "id": "DefaultPolicy", 389 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/DefaultPolicy", 390 | "children": { 391 | "Resource": { 392 | "id": "Resource", 393 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/ServiceRole/DefaultPolicy/Resource", 394 | "attributes": { 395 | "aws:cdk:cloudformation:type": "AWS::IAM::Policy", 396 | "aws:cdk:cloudformation:props": { 397 | "policyDocument": { 398 | "Statement": [ 399 | { 400 | "Action": "s3:ListAllMyBuckets", 401 | "Effect": "Allow", 402 | "Resource": "*" 403 | } 404 | ], 405 | "Version": "2012-10-17" 406 | }, 407 | "policyName": "FullBinaryHandlerServiceRoleDefaultPolicy6A254230", 408 | "roles": [ 409 | { 410 | "Ref": "FullBinaryHandlerServiceRole27DAC75C" 411 | } 412 | ] 413 | } 414 | }, 415 | "constructInfo": { 416 | "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", 417 | "version": "2.159.0" 418 | } 419 | } 420 | }, 421 | "constructInfo": { 422 | "fqn": "aws-cdk-lib.aws_iam.Policy", 423 | "version": "2.159.0" 424 | } 425 | } 426 | }, 427 | "constructInfo": { 428 | "fqn": "aws-cdk-lib.aws_iam.Role", 429 | "version": "2.159.0" 430 | } 431 | }, 432 | "Code": { 433 | "id": "Code", 434 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/Code", 435 | "children": { 436 | "Stage": { 437 | "id": "Stage", 438 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/Code/Stage", 439 | "constructInfo": { 440 | "fqn": "aws-cdk-lib.AssetStaging", 441 | "version": "2.159.0" 442 | } 443 | }, 444 | "AssetBucket": { 445 | "id": "AssetBucket", 446 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/Code/AssetBucket", 447 | "constructInfo": { 448 | "fqn": "aws-cdk-lib.aws_s3.BucketBase", 449 | "version": "2.159.0" 450 | } 451 | } 452 | }, 453 | "constructInfo": { 454 | "fqn": "aws-cdk-lib.aws_s3_assets.Asset", 455 | "version": "2.159.0" 456 | } 457 | }, 458 | "Resource": { 459 | "id": "Resource", 460 | "path": "LlrtFunctionIntegTestTarget/FullBinaryHandler/Resource", 461 | "attributes": { 462 | "aws:cdk:cloudformation:type": "AWS::Lambda::Function", 463 | "aws:cdk:cloudformation:props": { 464 | "code": { 465 | "s3Bucket": { 466 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 467 | }, 468 | "s3Key": "c9fcdd092984e282b07b3ddcf6becfb1a639caa786e54270dac65ba7f97fdce2.zip" 469 | }, 470 | "handler": "index.handler", 471 | "role": { 472 | "Fn::GetAtt": [ 473 | "FullBinaryHandlerServiceRole27DAC75C", 474 | "Arn" 475 | ] 476 | }, 477 | "runtime": "nodejs20.x" 478 | } 479 | }, 480 | "constructInfo": { 481 | "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", 482 | "version": "2.159.0" 483 | } 484 | } 485 | }, 486 | "constructInfo": { 487 | "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", 488 | "version": "2.159.0" 489 | } 490 | }, 491 | "NoSdkBinaryHandler": { 492 | "id": "NoSdkBinaryHandler", 493 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler", 494 | "children": { 495 | "ServiceRole": { 496 | "id": "ServiceRole", 497 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole", 498 | "children": { 499 | "ImportServiceRole": { 500 | "id": "ImportServiceRole", 501 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/ImportServiceRole", 502 | "constructInfo": { 503 | "fqn": "aws-cdk-lib.Resource", 504 | "version": "2.159.0" 505 | } 506 | }, 507 | "Resource": { 508 | "id": "Resource", 509 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/Resource", 510 | "attributes": { 511 | "aws:cdk:cloudformation:type": "AWS::IAM::Role", 512 | "aws:cdk:cloudformation:props": { 513 | "assumeRolePolicyDocument": { 514 | "Statement": [ 515 | { 516 | "Action": "sts:AssumeRole", 517 | "Effect": "Allow", 518 | "Principal": { 519 | "Service": "lambda.amazonaws.com" 520 | } 521 | } 522 | ], 523 | "Version": "2012-10-17" 524 | }, 525 | "managedPolicyArns": [ 526 | { 527 | "Fn::Join": [ 528 | "", 529 | [ 530 | "arn:", 531 | { 532 | "Ref": "AWS::Partition" 533 | }, 534 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 535 | ] 536 | ] 537 | } 538 | ] 539 | } 540 | }, 541 | "constructInfo": { 542 | "fqn": "aws-cdk-lib.aws_iam.CfnRole", 543 | "version": "2.159.0" 544 | } 545 | }, 546 | "DefaultPolicy": { 547 | "id": "DefaultPolicy", 548 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/DefaultPolicy", 549 | "children": { 550 | "Resource": { 551 | "id": "Resource", 552 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/ServiceRole/DefaultPolicy/Resource", 553 | "attributes": { 554 | "aws:cdk:cloudformation:type": "AWS::IAM::Policy", 555 | "aws:cdk:cloudformation:props": { 556 | "policyDocument": { 557 | "Statement": [ 558 | { 559 | "Action": "s3:ListAllMyBuckets", 560 | "Effect": "Allow", 561 | "Resource": "*" 562 | } 563 | ], 564 | "Version": "2012-10-17" 565 | }, 566 | "policyName": "NoSdkBinaryHandlerServiceRoleDefaultPolicyDC9BBD8B", 567 | "roles": [ 568 | { 569 | "Ref": "NoSdkBinaryHandlerServiceRole8CABE201" 570 | } 571 | ] 572 | } 573 | }, 574 | "constructInfo": { 575 | "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", 576 | "version": "2.159.0" 577 | } 578 | } 579 | }, 580 | "constructInfo": { 581 | "fqn": "aws-cdk-lib.aws_iam.Policy", 582 | "version": "2.159.0" 583 | } 584 | } 585 | }, 586 | "constructInfo": { 587 | "fqn": "aws-cdk-lib.aws_iam.Role", 588 | "version": "2.159.0" 589 | } 590 | }, 591 | "Code": { 592 | "id": "Code", 593 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/Code", 594 | "children": { 595 | "Stage": { 596 | "id": "Stage", 597 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/Code/Stage", 598 | "constructInfo": { 599 | "fqn": "aws-cdk-lib.AssetStaging", 600 | "version": "2.159.0" 601 | } 602 | }, 603 | "AssetBucket": { 604 | "id": "AssetBucket", 605 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/Code/AssetBucket", 606 | "constructInfo": { 607 | "fqn": "aws-cdk-lib.aws_s3.BucketBase", 608 | "version": "2.159.0" 609 | } 610 | } 611 | }, 612 | "constructInfo": { 613 | "fqn": "aws-cdk-lib.aws_s3_assets.Asset", 614 | "version": "2.159.0" 615 | } 616 | }, 617 | "Resource": { 618 | "id": "Resource", 619 | "path": "LlrtFunctionIntegTestTarget/NoSdkBinaryHandler/Resource", 620 | "attributes": { 621 | "aws:cdk:cloudformation:type": "AWS::Lambda::Function", 622 | "aws:cdk:cloudformation:props": { 623 | "code": { 624 | "s3Bucket": { 625 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 626 | }, 627 | "s3Key": "b30dc86bf68ac6edce8bfe3f4a1c24c672dbd5ead67163db43756e529aa913f4.zip" 628 | }, 629 | "handler": "index.handler", 630 | "role": { 631 | "Fn::GetAtt": [ 632 | "NoSdkBinaryHandlerServiceRole8CABE201", 633 | "Arn" 634 | ] 635 | }, 636 | "runtime": "nodejs20.x" 637 | } 638 | }, 639 | "constructInfo": { 640 | "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", 641 | "version": "2.159.0" 642 | } 643 | } 644 | }, 645 | "constructInfo": { 646 | "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", 647 | "version": "2.159.0" 648 | } 649 | }, 650 | "CustomBinaryHandler": { 651 | "id": "CustomBinaryHandler", 652 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler", 653 | "children": { 654 | "ServiceRole": { 655 | "id": "ServiceRole", 656 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole", 657 | "children": { 658 | "ImportServiceRole": { 659 | "id": "ImportServiceRole", 660 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/ImportServiceRole", 661 | "constructInfo": { 662 | "fqn": "aws-cdk-lib.Resource", 663 | "version": "2.159.0" 664 | } 665 | }, 666 | "Resource": { 667 | "id": "Resource", 668 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/Resource", 669 | "attributes": { 670 | "aws:cdk:cloudformation:type": "AWS::IAM::Role", 671 | "aws:cdk:cloudformation:props": { 672 | "assumeRolePolicyDocument": { 673 | "Statement": [ 674 | { 675 | "Action": "sts:AssumeRole", 676 | "Effect": "Allow", 677 | "Principal": { 678 | "Service": "lambda.amazonaws.com" 679 | } 680 | } 681 | ], 682 | "Version": "2012-10-17" 683 | }, 684 | "managedPolicyArns": [ 685 | { 686 | "Fn::Join": [ 687 | "", 688 | [ 689 | "arn:", 690 | { 691 | "Ref": "AWS::Partition" 692 | }, 693 | ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" 694 | ] 695 | ] 696 | } 697 | ] 698 | } 699 | }, 700 | "constructInfo": { 701 | "fqn": "aws-cdk-lib.aws_iam.CfnRole", 702 | "version": "2.159.0" 703 | } 704 | }, 705 | "DefaultPolicy": { 706 | "id": "DefaultPolicy", 707 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/DefaultPolicy", 708 | "children": { 709 | "Resource": { 710 | "id": "Resource", 711 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/ServiceRole/DefaultPolicy/Resource", 712 | "attributes": { 713 | "aws:cdk:cloudformation:type": "AWS::IAM::Policy", 714 | "aws:cdk:cloudformation:props": { 715 | "policyDocument": { 716 | "Statement": [ 717 | { 718 | "Action": "s3:ListAllMyBuckets", 719 | "Effect": "Allow", 720 | "Resource": "*" 721 | } 722 | ], 723 | "Version": "2012-10-17" 724 | }, 725 | "policyName": "CustomBinaryHandlerServiceRoleDefaultPolicyED2FBAA6", 726 | "roles": [ 727 | { 728 | "Ref": "CustomBinaryHandlerServiceRoleCF90F487" 729 | } 730 | ] 731 | } 732 | }, 733 | "constructInfo": { 734 | "fqn": "aws-cdk-lib.aws_iam.CfnPolicy", 735 | "version": "2.159.0" 736 | } 737 | } 738 | }, 739 | "constructInfo": { 740 | "fqn": "aws-cdk-lib.aws_iam.Policy", 741 | "version": "2.159.0" 742 | } 743 | } 744 | }, 745 | "constructInfo": { 746 | "fqn": "aws-cdk-lib.aws_iam.Role", 747 | "version": "2.159.0" 748 | } 749 | }, 750 | "Code": { 751 | "id": "Code", 752 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/Code", 753 | "children": { 754 | "Stage": { 755 | "id": "Stage", 756 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/Code/Stage", 757 | "constructInfo": { 758 | "fqn": "aws-cdk-lib.AssetStaging", 759 | "version": "2.159.0" 760 | } 761 | }, 762 | "AssetBucket": { 763 | "id": "AssetBucket", 764 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/Code/AssetBucket", 765 | "constructInfo": { 766 | "fqn": "aws-cdk-lib.aws_s3.BucketBase", 767 | "version": "2.159.0" 768 | } 769 | } 770 | }, 771 | "constructInfo": { 772 | "fqn": "aws-cdk-lib.aws_s3_assets.Asset", 773 | "version": "2.159.0" 774 | } 775 | }, 776 | "Resource": { 777 | "id": "Resource", 778 | "path": "LlrtFunctionIntegTestTarget/CustomBinaryHandler/Resource", 779 | "attributes": { 780 | "aws:cdk:cloudformation:type": "AWS::Lambda::Function", 781 | "aws:cdk:cloudformation:props": { 782 | "code": { 783 | "s3Bucket": { 784 | "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" 785 | }, 786 | "s3Key": "ca6b96daba04d69ad843da425b485f310a2ac068a6864b4892995ebdcadabecf.zip" 787 | }, 788 | "handler": "index.handler", 789 | "role": { 790 | "Fn::GetAtt": [ 791 | "CustomBinaryHandlerServiceRoleCF90F487", 792 | "Arn" 793 | ] 794 | }, 795 | "runtime": "nodejs20.x" 796 | } 797 | }, 798 | "constructInfo": { 799 | "fqn": "aws-cdk-lib.aws_lambda.CfnFunction", 800 | "version": "2.159.0" 801 | } 802 | } 803 | }, 804 | "constructInfo": { 805 | "fqn": "aws-cdk-lib.aws_lambda_nodejs.NodejsFunction", 806 | "version": "2.159.0" 807 | } 808 | }, 809 | "Exports": { 810 | "id": "Exports", 811 | "path": "LlrtFunctionIntegTestTarget/Exports", 812 | "children": { 813 | "Output{\"Ref\":\"Handler886CB40B\"}": { 814 | "id": "Output{\"Ref\":\"Handler886CB40B\"}", 815 | "path": "LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"Handler886CB40B\"}", 816 | "constructInfo": { 817 | "fqn": "aws-cdk-lib.CfnOutput", 818 | "version": "2.159.0" 819 | } 820 | }, 821 | "Output{\"Ref\":\"ArmHandler7C85DE11\"}": { 822 | "id": "Output{\"Ref\":\"ArmHandler7C85DE11\"}", 823 | "path": "LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"ArmHandler7C85DE11\"}", 824 | "constructInfo": { 825 | "fqn": "aws-cdk-lib.CfnOutput", 826 | "version": "2.159.0" 827 | } 828 | }, 829 | "Output{\"Ref\":\"FullBinaryHandler1600ED15\"}": { 830 | "id": "Output{\"Ref\":\"FullBinaryHandler1600ED15\"}", 831 | "path": "LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"FullBinaryHandler1600ED15\"}", 832 | "constructInfo": { 833 | "fqn": "aws-cdk-lib.CfnOutput", 834 | "version": "2.159.0" 835 | } 836 | }, 837 | "Output{\"Ref\":\"NoSdkBinaryHandler3ED82436\"}": { 838 | "id": "Output{\"Ref\":\"NoSdkBinaryHandler3ED82436\"}", 839 | "path": "LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"NoSdkBinaryHandler3ED82436\"}", 840 | "constructInfo": { 841 | "fqn": "aws-cdk-lib.CfnOutput", 842 | "version": "2.159.0" 843 | } 844 | }, 845 | "Output{\"Ref\":\"CustomBinaryHandler641A933E\"}": { 846 | "id": "Output{\"Ref\":\"CustomBinaryHandler641A933E\"}", 847 | "path": "LlrtFunctionIntegTestTarget/Exports/Output{\"Ref\":\"CustomBinaryHandler641A933E\"}", 848 | "constructInfo": { 849 | "fqn": "aws-cdk-lib.CfnOutput", 850 | "version": "2.159.0" 851 | } 852 | } 853 | }, 854 | "constructInfo": { 855 | "fqn": "constructs.Construct", 856 | "version": "10.3.0" 857 | } 858 | }, 859 | "BootstrapVersion": { 860 | "id": "BootstrapVersion", 861 | "path": "LlrtFunctionIntegTestTarget/BootstrapVersion", 862 | "constructInfo": { 863 | "fqn": "aws-cdk-lib.CfnParameter", 864 | "version": "2.159.0" 865 | } 866 | }, 867 | "CheckBootstrapVersion": { 868 | "id": "CheckBootstrapVersion", 869 | "path": "LlrtFunctionIntegTestTarget/CheckBootstrapVersion", 870 | "constructInfo": { 871 | "fqn": "aws-cdk-lib.CfnRule", 872 | "version": "2.159.0" 873 | } 874 | } 875 | }, 876 | "constructInfo": { 877 | "fqn": "aws-cdk-lib.Stack", 878 | "version": "2.159.0" 879 | } 880 | }, 881 | "LlrtFunctionIntegTest": { 882 | "id": "LlrtFunctionIntegTest", 883 | "path": "LlrtFunctionIntegTest", 884 | "children": { 885 | "DefaultTest": { 886 | "id": "DefaultTest", 887 | "path": "LlrtFunctionIntegTest/DefaultTest", 888 | "children": { 889 | "Default": { 890 | "id": "Default", 891 | "path": "LlrtFunctionIntegTest/DefaultTest/Default", 892 | "constructInfo": { 893 | "fqn": "constructs.Construct", 894 | "version": "10.3.0" 895 | } 896 | }, 897 | "DeployAssert": { 898 | "id": "DeployAssert", 899 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert", 900 | "children": { 901 | "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5": { 902 | "id": "LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5", 903 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5", 904 | "children": { 905 | "SdkProvider": { 906 | "id": "SdkProvider", 907 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/SdkProvider", 908 | "children": { 909 | "AssertionsProvider": { 910 | "id": "AssertionsProvider", 911 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/SdkProvider/AssertionsProvider", 912 | "constructInfo": { 913 | "fqn": "constructs.Construct", 914 | "version": "10.3.0" 915 | } 916 | } 917 | }, 918 | "constructInfo": { 919 | "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", 920 | "version": "2.159.0-alpha.0" 921 | } 922 | }, 923 | "Default": { 924 | "id": "Default", 925 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/Default", 926 | "children": { 927 | "Default": { 928 | "id": "Default", 929 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/Default/Default", 930 | "constructInfo": { 931 | "fqn": "aws-cdk-lib.CfnResource", 932 | "version": "2.159.0" 933 | } 934 | } 935 | }, 936 | "constructInfo": { 937 | "fqn": "aws-cdk-lib.CustomResource", 938 | "version": "2.159.0" 939 | } 940 | }, 941 | "Invoke": { 942 | "id": "Invoke", 943 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/Invoke", 944 | "constructInfo": { 945 | "fqn": "aws-cdk-lib.CfnResource", 946 | "version": "2.159.0" 947 | } 948 | }, 949 | "AssertionResults": { 950 | "id": "AssertionResults", 951 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke35ae3a38b93bc81e7b95e90f43eeaec5/AssertionResults", 952 | "constructInfo": { 953 | "fqn": "aws-cdk-lib.CfnOutput", 954 | "version": "2.159.0" 955 | } 956 | } 957 | }, 958 | "constructInfo": { 959 | "fqn": "@aws-cdk/integ-tests-alpha.LambdaInvokeFunction", 960 | "version": "2.159.0-alpha.0" 961 | } 962 | }, 963 | "SingletonFunction1488541a7b23466481b69b4408076b81": { 964 | "id": "SingletonFunction1488541a7b23466481b69b4408076b81", 965 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", 966 | "children": { 967 | "Staging": { 968 | "id": "Staging", 969 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", 970 | "constructInfo": { 971 | "fqn": "aws-cdk-lib.AssetStaging", 972 | "version": "2.159.0" 973 | } 974 | }, 975 | "Role": { 976 | "id": "Role", 977 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", 978 | "constructInfo": { 979 | "fqn": "aws-cdk-lib.CfnResource", 980 | "version": "2.159.0" 981 | } 982 | }, 983 | "Handler": { 984 | "id": "Handler", 985 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", 986 | "constructInfo": { 987 | "fqn": "aws-cdk-lib.CfnResource", 988 | "version": "2.159.0" 989 | } 990 | } 991 | }, 992 | "constructInfo": { 993 | "fqn": "constructs.Construct", 994 | "version": "10.3.0" 995 | } 996 | }, 997 | "LatestNodeRuntimeMap": { 998 | "id": "LatestNodeRuntimeMap", 999 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LatestNodeRuntimeMap", 1000 | "constructInfo": { 1001 | "fqn": "aws-cdk-lib.CfnMapping", 1002 | "version": "2.159.0" 1003 | } 1004 | }, 1005 | "LambdaInvoke997059d943474e43661f387022a21092": { 1006 | "id": "LambdaInvoke997059d943474e43661f387022a21092", 1007 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092", 1008 | "children": { 1009 | "SdkProvider": { 1010 | "id": "SdkProvider", 1011 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/SdkProvider", 1012 | "children": { 1013 | "AssertionsProvider": { 1014 | "id": "AssertionsProvider", 1015 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/SdkProvider/AssertionsProvider", 1016 | "constructInfo": { 1017 | "fqn": "constructs.Construct", 1018 | "version": "10.3.0" 1019 | } 1020 | } 1021 | }, 1022 | "constructInfo": { 1023 | "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", 1024 | "version": "2.159.0-alpha.0" 1025 | } 1026 | }, 1027 | "Default": { 1028 | "id": "Default", 1029 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/Default", 1030 | "children": { 1031 | "Default": { 1032 | "id": "Default", 1033 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/Default/Default", 1034 | "constructInfo": { 1035 | "fqn": "aws-cdk-lib.CfnResource", 1036 | "version": "2.159.0" 1037 | } 1038 | } 1039 | }, 1040 | "constructInfo": { 1041 | "fqn": "aws-cdk-lib.CustomResource", 1042 | "version": "2.159.0" 1043 | } 1044 | }, 1045 | "Invoke": { 1046 | "id": "Invoke", 1047 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/Invoke", 1048 | "constructInfo": { 1049 | "fqn": "aws-cdk-lib.CfnResource", 1050 | "version": "2.159.0" 1051 | } 1052 | }, 1053 | "AssertionResults": { 1054 | "id": "AssertionResults", 1055 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke997059d943474e43661f387022a21092/AssertionResults", 1056 | "constructInfo": { 1057 | "fqn": "aws-cdk-lib.CfnOutput", 1058 | "version": "2.159.0" 1059 | } 1060 | } 1061 | }, 1062 | "constructInfo": { 1063 | "fqn": "@aws-cdk/integ-tests-alpha.LambdaInvokeFunction", 1064 | "version": "2.159.0-alpha.0" 1065 | } 1066 | }, 1067 | "LambdaInvoke240c9f0a69de9952748e2df8d156da40": { 1068 | "id": "LambdaInvoke240c9f0a69de9952748e2df8d156da40", 1069 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40", 1070 | "children": { 1071 | "SdkProvider": { 1072 | "id": "SdkProvider", 1073 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/SdkProvider", 1074 | "children": { 1075 | "AssertionsProvider": { 1076 | "id": "AssertionsProvider", 1077 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/SdkProvider/AssertionsProvider", 1078 | "constructInfo": { 1079 | "fqn": "constructs.Construct", 1080 | "version": "10.3.0" 1081 | } 1082 | } 1083 | }, 1084 | "constructInfo": { 1085 | "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", 1086 | "version": "2.159.0-alpha.0" 1087 | } 1088 | }, 1089 | "Default": { 1090 | "id": "Default", 1091 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/Default", 1092 | "children": { 1093 | "Default": { 1094 | "id": "Default", 1095 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/Default/Default", 1096 | "constructInfo": { 1097 | "fqn": "aws-cdk-lib.CfnResource", 1098 | "version": "2.159.0" 1099 | } 1100 | } 1101 | }, 1102 | "constructInfo": { 1103 | "fqn": "aws-cdk-lib.CustomResource", 1104 | "version": "2.159.0" 1105 | } 1106 | }, 1107 | "Invoke": { 1108 | "id": "Invoke", 1109 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/Invoke", 1110 | "constructInfo": { 1111 | "fqn": "aws-cdk-lib.CfnResource", 1112 | "version": "2.159.0" 1113 | } 1114 | }, 1115 | "AssertionResults": { 1116 | "id": "AssertionResults", 1117 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke240c9f0a69de9952748e2df8d156da40/AssertionResults", 1118 | "constructInfo": { 1119 | "fqn": "aws-cdk-lib.CfnOutput", 1120 | "version": "2.159.0" 1121 | } 1122 | } 1123 | }, 1124 | "constructInfo": { 1125 | "fqn": "@aws-cdk/integ-tests-alpha.LambdaInvokeFunction", 1126 | "version": "2.159.0-alpha.0" 1127 | } 1128 | }, 1129 | "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c": { 1130 | "id": "LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c", 1131 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c", 1132 | "children": { 1133 | "SdkProvider": { 1134 | "id": "SdkProvider", 1135 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/SdkProvider", 1136 | "children": { 1137 | "AssertionsProvider": { 1138 | "id": "AssertionsProvider", 1139 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/SdkProvider/AssertionsProvider", 1140 | "constructInfo": { 1141 | "fqn": "constructs.Construct", 1142 | "version": "10.3.0" 1143 | } 1144 | } 1145 | }, 1146 | "constructInfo": { 1147 | "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", 1148 | "version": "2.159.0-alpha.0" 1149 | } 1150 | }, 1151 | "Default": { 1152 | "id": "Default", 1153 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/Default", 1154 | "children": { 1155 | "Default": { 1156 | "id": "Default", 1157 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/Default/Default", 1158 | "constructInfo": { 1159 | "fqn": "aws-cdk-lib.CfnResource", 1160 | "version": "2.159.0" 1161 | } 1162 | } 1163 | }, 1164 | "constructInfo": { 1165 | "fqn": "aws-cdk-lib.CustomResource", 1166 | "version": "2.159.0" 1167 | } 1168 | }, 1169 | "Invoke": { 1170 | "id": "Invoke", 1171 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/Invoke", 1172 | "constructInfo": { 1173 | "fqn": "aws-cdk-lib.CfnResource", 1174 | "version": "2.159.0" 1175 | } 1176 | }, 1177 | "AssertionResults": { 1178 | "id": "AssertionResults", 1179 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvokebff0124bbd4116de1f88fc631eeb9a9c/AssertionResults", 1180 | "constructInfo": { 1181 | "fqn": "aws-cdk-lib.CfnOutput", 1182 | "version": "2.159.0" 1183 | } 1184 | } 1185 | }, 1186 | "constructInfo": { 1187 | "fqn": "@aws-cdk/integ-tests-alpha.LambdaInvokeFunction", 1188 | "version": "2.159.0-alpha.0" 1189 | } 1190 | }, 1191 | "LambdaInvoke69a3388d6e311c7b828bebf747d408cc": { 1192 | "id": "LambdaInvoke69a3388d6e311c7b828bebf747d408cc", 1193 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc", 1194 | "children": { 1195 | "SdkProvider": { 1196 | "id": "SdkProvider", 1197 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/SdkProvider", 1198 | "children": { 1199 | "AssertionsProvider": { 1200 | "id": "AssertionsProvider", 1201 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/SdkProvider/AssertionsProvider", 1202 | "constructInfo": { 1203 | "fqn": "constructs.Construct", 1204 | "version": "10.3.0" 1205 | } 1206 | } 1207 | }, 1208 | "constructInfo": { 1209 | "fqn": "@aws-cdk/integ-tests-alpha.AssertionsProvider", 1210 | "version": "2.159.0-alpha.0" 1211 | } 1212 | }, 1213 | "Default": { 1214 | "id": "Default", 1215 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/Default", 1216 | "children": { 1217 | "Default": { 1218 | "id": "Default", 1219 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/Default/Default", 1220 | "constructInfo": { 1221 | "fqn": "aws-cdk-lib.CfnResource", 1222 | "version": "2.159.0" 1223 | } 1224 | } 1225 | }, 1226 | "constructInfo": { 1227 | "fqn": "aws-cdk-lib.CustomResource", 1228 | "version": "2.159.0" 1229 | } 1230 | }, 1231 | "Invoke": { 1232 | "id": "Invoke", 1233 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/Invoke", 1234 | "constructInfo": { 1235 | "fqn": "aws-cdk-lib.CfnResource", 1236 | "version": "2.159.0" 1237 | } 1238 | }, 1239 | "AssertionResults": { 1240 | "id": "AssertionResults", 1241 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/LambdaInvoke69a3388d6e311c7b828bebf747d408cc/AssertionResults", 1242 | "constructInfo": { 1243 | "fqn": "aws-cdk-lib.CfnOutput", 1244 | "version": "2.159.0" 1245 | } 1246 | } 1247 | }, 1248 | "constructInfo": { 1249 | "fqn": "@aws-cdk/integ-tests-alpha.LambdaInvokeFunction", 1250 | "version": "2.159.0-alpha.0" 1251 | } 1252 | }, 1253 | "BootstrapVersion": { 1254 | "id": "BootstrapVersion", 1255 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/BootstrapVersion", 1256 | "constructInfo": { 1257 | "fqn": "aws-cdk-lib.CfnParameter", 1258 | "version": "2.159.0" 1259 | } 1260 | }, 1261 | "CheckBootstrapVersion": { 1262 | "id": "CheckBootstrapVersion", 1263 | "path": "LlrtFunctionIntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion", 1264 | "constructInfo": { 1265 | "fqn": "aws-cdk-lib.CfnRule", 1266 | "version": "2.159.0" 1267 | } 1268 | } 1269 | }, 1270 | "constructInfo": { 1271 | "fqn": "aws-cdk-lib.Stack", 1272 | "version": "2.159.0" 1273 | } 1274 | } 1275 | }, 1276 | "constructInfo": { 1277 | "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", 1278 | "version": "2.159.0-alpha.0" 1279 | } 1280 | } 1281 | }, 1282 | "constructInfo": { 1283 | "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", 1284 | "version": "2.159.0-alpha.0" 1285 | } 1286 | }, 1287 | "Tree": { 1288 | "id": "Tree", 1289 | "path": "Tree", 1290 | "constructInfo": { 1291 | "fqn": "constructs.Construct", 1292 | "version": "10.3.0" 1293 | } 1294 | } 1295 | }, 1296 | "constructInfo": { 1297 | "fqn": "aws-cdk-lib.App", 1298 | "version": "2.159.0" 1299 | } 1300 | } 1301 | } -------------------------------------------------------------------------------- /test/integ.llrt-function.ts: -------------------------------------------------------------------------------- 1 | import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests-alpha'; 2 | import { Stack, StackProps, App } from 'aws-cdk-lib'; 3 | import { PolicyStatement } from 'aws-cdk-lib/aws-iam'; 4 | import { Architecture } from 'aws-cdk-lib/aws-lambda'; 5 | import { Construct } from 'constructs'; 6 | import { LlrtBinaryType, LlrtFunction } from '../src/llrt-function'; 7 | 8 | const app = new App(); 9 | 10 | class TestStack extends Stack { 11 | public handlers: LlrtFunction[] = []; 12 | 13 | constructor(scope: Construct, id: string, props: StackProps = {}) { 14 | super(scope, id, props); 15 | 16 | { 17 | const handler = new LlrtFunction(this, 'Handler', { 18 | entry: '../example/lambda/s3.ts', 19 | llrtVersion: 'v0.2.2-beta', 20 | bundling: { 21 | commandHooks: { 22 | beforeBundling: (_i, _o) => { 23 | return ['echo beforeBundling']; 24 | }, 25 | afterBundling: (_i, _o) => { 26 | return ['echo afterBundling']; 27 | }, 28 | beforeInstall: (_i, _o) => { 29 | return ['echo beforeInstall']; 30 | }, 31 | }, 32 | }, 33 | }); 34 | handler.addToRolePolicy( 35 | new PolicyStatement({ 36 | actions: ['s3:ListAllMyBuckets'], 37 | resources: ['*'], 38 | }), 39 | ); 40 | this.handlers.push(handler); 41 | } 42 | 43 | { 44 | const handler = new LlrtFunction(this, 'ArmHandler', { 45 | entry: '../example/lambda/s3.ts', 46 | architecture: Architecture.ARM_64, 47 | llrtVersion: 'v0.2.2-beta', 48 | }); 49 | handler.addToRolePolicy( 50 | new PolicyStatement({ 51 | actions: ['s3:ListAllMyBuckets'], 52 | resources: ['*'], 53 | }), 54 | ); 55 | this.handlers.push(handler); 56 | } 57 | 58 | { 59 | const handler = new LlrtFunction(this, 'FullBinaryHandler', { 60 | entry: '../example/lambda/s3.ts', 61 | llrtBinaryType: LlrtBinaryType.FULL_SDK, 62 | llrtVersion: 'v0.2.2-beta', 63 | }); 64 | handler.addToRolePolicy( 65 | new PolicyStatement({ 66 | actions: ['s3:ListAllMyBuckets'], 67 | resources: ['*'], 68 | }), 69 | ); 70 | this.handlers.push(handler); 71 | } 72 | 73 | { 74 | const handler = new LlrtFunction(this, 'NoSdkBinaryHandler', { 75 | entry: '../example/lambda/s3.ts', 76 | llrtBinaryType: LlrtBinaryType.NO_SDK, 77 | llrtVersion: 'v0.2.2-beta', 78 | }); 79 | handler.addToRolePolicy( 80 | new PolicyStatement({ 81 | actions: ['s3:ListAllMyBuckets'], 82 | resources: ['*'], 83 | }), 84 | ); 85 | this.handlers.push(handler); 86 | } 87 | 88 | { 89 | const handler = new LlrtFunction(this, 'CustomBinaryHandler', { 90 | entry: '../example/lambda/s3.ts', 91 | llrtBinaryType: LlrtBinaryType.NO_SDK, 92 | llrtBinaryPath: '.llrt/llrt-x64-no-sdk-bootstrap', 93 | depsLockFilePath: '../example/lambda/package-lock.json', 94 | }); 95 | handler.addToRolePolicy( 96 | new PolicyStatement({ 97 | actions: ['s3:ListAllMyBuckets'], 98 | resources: ['*'], 99 | }), 100 | ); 101 | this.handlers.push(handler); 102 | } 103 | } 104 | } 105 | 106 | const stack = new TestStack(app, 'LlrtFunctionIntegTestTarget'); 107 | 108 | const integ = new IntegTest(app, 'LlrtFunctionIntegTest', { 109 | testCases: [stack], 110 | diffAssets: true, 111 | }); 112 | 113 | stack.handlers.forEach((handler) => { 114 | const assertion = integ.assertions.invokeFunction({ 115 | functionName: handler.functionName, 116 | }); 117 | // https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html#API_Invoke_ResponseElements 118 | assertion.expect(ExpectedResult.objectLike({ StatusCode: 200 })); 119 | }); 120 | -------------------------------------------------------------------------------- /tsconfig.dev.json: -------------------------------------------------------------------------------- 1 | // ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". 2 | { 3 | "compilerOptions": { 4 | "alwaysStrict": true, 5 | "declaration": true, 6 | "esModuleInterop": true, 7 | "experimentalDecorators": true, 8 | "inlineSourceMap": true, 9 | "inlineSources": true, 10 | "lib": [ 11 | "es2019" 12 | ], 13 | "module": "CommonJS", 14 | "noEmitOnError": false, 15 | "noFallthroughCasesInSwitch": true, 16 | "noImplicitAny": true, 17 | "noImplicitReturns": true, 18 | "noImplicitThis": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "resolveJsonModule": true, 22 | "strict": true, 23 | "strictNullChecks": true, 24 | "strictPropertyInitialization": true, 25 | "stripInternal": true, 26 | "target": "ES2019" 27 | }, 28 | "include": [ 29 | "src/**/*.ts", 30 | "test/**/*.ts", 31 | ".projenrc.ts", 32 | "projenrc/**/*.ts" 33 | ], 34 | "exclude": [ 35 | "node_modules", 36 | "example", 37 | "test/.*.snapshot" 38 | ] 39 | } 40 | --------------------------------------------------------------------------------