lambda-live-debugger 0.0.90 → 0.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CNAME ADDED
@@ -0,0 +1 @@
1
+ www.lldebugger.com
package/README.md CHANGED
@@ -2,128 +2,128 @@
2
2
 
3
3
  ![Logo](logo.png)
4
4
 
5
- Lambda Live Debugger is indispensable tool that allows you to debug AWS Lambda from your computer althouw it is deplyoed on the cloud. It support Lambdas writen in JavaScript and TypeScript.
5
+ Lambda Live Debugger is an indispensable tool that allows you to debug AWS Lambda from your computer, although it is deployed on the cloud. It supports Lambdas written in JavaScript or TypeScript.
6
6
 
7
- It support the folowing frameworks:
7
+ This is essentially the same as offered by [SST](https://sst.dev/) and [Serverless Framework v4](https://www.serverless.com/blog/serverless-framework-v4-general-availability), except it supports an additional Obserability mode.
8
8
 
9
- - AWS CDK v2
10
- - Serverless Framework v3 (SLS)
11
- - AWS Serverless Application Model (SAM)
12
- - Terraform
13
- - an option to implement any framwrowk/seupt implementaiton via custom extension
14
- - ... (do you need any other framwwork suppor?)
9
+ It supports the following frameworks:
10
+
11
+ - AWS CDK v2,
12
+ - Serverless Framework v3 (SLS),
13
+ - AWS Serverless Application Model (SAM),
14
+ - Terraform,
15
+ - by implementing a simple function and option to support any framework or setup you might have,
16
+ - ... (if you need any other framework, let me know?)
15
17
 
16
18
  ## Early alpha state
17
19
 
18
- **Currently the project is in early alpha state. Please let me know if everyting works for you. Just a simple message would help a lot, so I know I am on the right track. I tested many secanrious, but there are numerus ways how peope can configure project and TypeScript configuration. Project is flexible enoug so setting can be twicked to adjust your setup, without code changes. Any other advice how to improve the project is also very welcome.**
20
+ **Currently, the project is in the early alpha state. Please let me know if everything works for you. A simple message would help a lot, so I know I am on the right track. I tested many scenarios, but there are numerous ways how people can configure projects and TypeScript configuration. The tool is flexible enough, so the settings can be tweaked to adjust your setup without implementing additional features. Any advice on how to improve the project is also very welcome.**
19
21
 
20
- Ways to contact me:
22
+ You can contact me by:
21
23
 
22
24
  - [Open GitHub issue](https://github.com/ServerlessLife/lambda-live-debugger/issues)
23
25
  - [LinkedIn](http://www.linkedin.com/in/marko-serverlesslife)
24
26
 
25
27
  ## The problem statement
26
28
 
27
- The Serverless is amazing and resolve mayn issues that regular stemns face. But developing can be a strugle. You write code, deploy run, fix deploy again. That process is extremly time consuming and tiresome. You can also use one of the tools for running code localy or use unit/interation tests for that, but that has many other issues and it does not mimic an actualy enviroment enoug.
28
-
29
- Tools like [SST](https://sst.dev/) and [Serverless Framework V4](https://www.serverless.com/blog/serverless-framework-v4-general-availability) has the exact same functionality (without Observability mode). But other tools do not have it.
29
+ The serverless is amazing and resolves many issues that regular systems face. But writing code can be a struggle. You write code, deploy, run, fix, deploy again. That process is time-consuming and tiresome. You can also use one of the tools for running code locally or use unit/integration tests for that, but that has many other issues, and it does not mimic an actual environment close enough.
30
30
 
31
31
  ## How does it work
32
32
 
33
- It connect to your deployed Lambda, send the request to your computer and the response back to Lambda. This way you can debug on your machine, but system begavous as code is running in the cloud with the same permissions.
33
+ It connects to your deployed Lambda, sends the request to your computer, and sends the response back to Lambda. This way, you can debug on your machine, but the system behaves as if the code is running in the cloud with the same permissions.
34
34
 
35
- Lambda Live Debugger attach Lambda Extensions (via Layer) to the Lambda to interecept calls and send them to AWS IoT. AWS IoT is used for transfering messages to your machine and back. Lambda Live Debugger running localy attach to the AWS IoT and excute the call localy. If Lambda is writem in TypeScript it transpile it to JavaScript. Calls are executed via Node Worker Threads.
35
+ Lambda Live Debugger attaches Lambda Extensions (via Layer) to the Lambda to intercept calls and send them to AWS IoT. AWS IoT is used to transfer messages to and from your machine. Lambda Live Debugger runs locally, connects to the AWS IoT, and executes the code locally. If Lambda is written in TypeScript, it is transpiled to JavaScript. Calls are executed via Node Worker Threads.
36
36
 
37
37
  ![Architecture](./architecture.drawio.png)
38
38
 
39
- Lambda Live Debugger makes the follwoing changes to your AWS infrastructureo:
39
+ Lambda Live Debugger makes the following changes to your AWS infrastructure:
40
40
 
41
41
  - Lambda excentions as a Layer
42
42
  - Attach Layer to each Lambda that you are debugging
43
43
  - Add policy to Lambda Role to use AWS IoT
44
44
 
45
- In case you do not want to add Layer to all functions you can limit to one the onest you need via configuration parameters.
45
+ In case you do not want to add Layer to all functions, you can limit to the ones you need via configuration parameters.
46
46
 
47
- While compiling it creates a lot of temporary files in folder `.lldebugger`, you can freely delete the folder once you are done dubbging, or simpler add `.lldebugger` to `.gitignore`. The wizard add that for you if you want.
47
+ While compiling, it creates many temporary files in the folder `.lldebugger`; you can freely delete the folder once you are done debugging or add `.lldebugger` to `.gitignore`. The wizard adds that for you if you want.
48
48
 
49
49
  ## Your developing process with Lambda Live Debugger
50
50
 
51
- Since you will be deplying code into actual AWS accound while developing it is mandatory that you use that enviroment only for yourself or better create a temporary enviroment for you or your featrue you are working om.
51
+ Since you will be deploying code into an actual AWS account while developing, you must use that environment only for yourself or create a temporary environment for you or for a feature you are working on.
52
52
 
53
- Unfortunately haveing a seperate AWS enviromonment is not always possible, becaouse of organization issues (it is 2024 and companies still do not uderstand how to work with serverless) or techincal (hard to dupklicate database or other parts of the system). For that perpuse there is an Observability Mode.
53
+ Unfortunately, having a separate AWS environment is not always possible because of organizational issues (it is 2024, and companies still do not understand how to work with serverless) or technical issues (it is hard to duplicate databases or other parts of the system). For that purpose, there is an Observability Mode.
54
54
 
55
55
  ## Observability Mode
56
56
 
57
- In Observability Mode Lambda Live Debugger via Lambda Extension just intercept the request received by Lambda and forward it to local enviroment, but it does not wait for the response. After that Lambda continue regular execution and ignores response from loca environement. The enviroment is not impacted and regular users can continue use it aswell as other develoers. You can run Observability Mode on development and testing eviroment. If you are adventures you can even run it in production. In observablitiy mode you do not get all Lambda requests. You only get one every 3 seconds. You can configure that interval via `interval` setting. This way the system is not overloaded if there are a lot of requests comming in.
57
+ In Observability Mode, Lambda Live Debugger via Lambda Extension just intercepts the request received by Lambda and forwards it to the local environment, but it does not wait for the response. After that, Lambda continues regular execution and ignores the response from the local environment. The system is not impacted, and regular users and other developers can continue to use it. You can run Observability Mode on the development or testing environment. If you are an adventurer, you can even run it in production. In observability mode, you do not get all Lambda requests. You only get one every 3 seconds. You can configure that interval via `interval` setting. This way, the system will not be overloaded if there are a lot of requests coming in.
58
58
 
59
59
  ## How to start
60
60
 
61
61
  ### Installation
62
62
 
63
- Install localy:
63
+ Install locally:
64
64
  `npm install lambda-live-debugger`
65
- or globaly
65
+ or globally
66
66
  `npm install lambda-live-debugger -g` (Linux, Mac: `sudo npm install lambda-live-debugger -g`)
67
67
 
68
68
  ### How to run
69
69
 
70
- If you use default profile, default region and other default setting than just run:
70
+ If you use the default profile, default region, and other default settings then just run:
71
71
 
72
- `npx lld` or `lld` (if installed globaly)
72
+ `lld` or `npx lld` (if installed locally)
73
73
 
74
- But you probably need to tweak some setting. You can do it via CLI parameters or better run a wizard. The configuration is saved to `lldebugger.config.ts`
74
+ But you probably need to tweak some settings. You can do it via CLI parameters or, better run a wizard. The configuration is saved to `lldebugger.config.ts`
75
75
 
76
- `npx lld -w` or `lld -w` (if installed globaly)
76
+ `npx lld -w` or `lld -w` (if installed globally)
77
77
 
78
78
  ### CLI parameters
79
79
 
80
80
  ```
81
- -V, --version output the version number
82
- -r, --remove [option] Remove Lambda Live Debugger infrastructure. Options: 'keep-layer' (default),
83
- 'remove-all'
84
- -w, --wizard Program interactivly ask for each parameter
85
- -v, --verbose Verbose logs
86
- -c, --context <context> AWS CDK context (default: [])
87
- -s, --stage <stage> Serverless Framework stage
88
- -f, --function <function name> Filter by function name
89
- -m, --subfolder <subfolder> Monorepo subfolder
90
- -o, --observable Observable mode
91
- -i --interval <interval> Observable mode interval (default: "3000")
92
- --config-env <evironment> SAM environment
93
- --profile <profile> AWS profile to use
94
- --region <region> AWS region to use
95
- --role <role> AWS role to use
96
- --framework <framework> Framework to use (cdk, sls, sam, terraform)
97
- --gitignore Add .lldebugger to .gitignore
98
- -h, --help display help for command
81
+ -V, --version output the version number
82
+ -r, --remove [option] Remove Lambda Live Debugger infrastructure. Options: 'keep-layer' (default),
83
+ 'remove-all'
84
+ -w, --wizard Program interactively asks for each parameter
85
+ -v, --verbose Verbose logs
86
+ -c, --context <context> AWS CDK context (default: [])
87
+ -s, --stage <stage> Serverless Framework stage
88
+ -f, --function <function name> Filter by function name
89
+ -m, --subfolder <subfolder> Monorepo subfolder
90
+ -o, --observable Observable mode
91
+ -i --interval <interval> Observable mode interval (default: "3000")
92
+ --config-env <evironment> SAM environment
93
+ --profile <profile> AWS profile to use
94
+ --region <region> AWS region to use
95
+ --role <role> AWS role to use
96
+ --framework <framework> Framework to use (cdk, sls, sam, terraform)
97
+ --gitignore Add .lldebugger to .gitignore
98
+ -h, --help display help for command
99
99
  ```
100
100
 
101
101
  ### Debugging
102
102
 
103
- You might want to configure you development tool for debugging. The wizard avutomaticaly copnfiguration for VsCode in `.vscode/launch.json`. Here is an example:
103
+ You might want to configure your development tool for debugging. The wizard automatically configures for VsCode in `.vscode/launch.json`. Here is an example:
104
104
 
105
105
  ```
106
106
  {
107
- "version": "0.2.0",
108
- "configurations": [
109
-
110
- {
111
- "name": "Lambda Live Debugger",
112
- "type": "node",
113
- "request": "launch",
114
- "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/lld",
115
- "runtimeArgs": [],
116
- "console": "integratedTerminal",
117
- "skipFiles": [
118
- "<node_internals>/**"
119
- ],
120
- "env": {}
121
- },
122
- ]
107
+ "version": "0.2.0",
108
+ "configurations": [
109
+
110
+ {
111
+ "name": "Lambda Live Debugger",
112
+ "type": "node",
113
+ "request": "launch",
114
+ "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/lld",
115
+ "runtimeArgs": [],
116
+ "console": "integratedTerminal",
117
+ "skipFiles": [
118
+ "<node_internals>/**"
119
+ ],
120
+ "env": {}
121
+ },
122
+ ]
123
123
  }
124
124
  ```
125
125
 
126
- If you are using another tool, please send me documantation so I can include it here. Especialy the instructions for WebStorm is needed.
126
+ If you are using another tool, please send me documentation so I can include it here. Especially the instruction for WebStorm is needed.
127
127
 
128
128
  ### Monorepo
129
129
 
@@ -141,28 +141,28 @@ getLambdas: async (foundLambdas) => {
141
141
  You can remove Lambda Live Debugger from your AWS account by running:
142
142
  `lld -r` (`npx lld -r` if installed locally)
143
143
 
144
- This will deatach Layer from your Lambda and remove the addtional IoT permission policy.
144
+ This will detach the Layer from your Lambda and remove the additional IoT permission policy.
145
145
 
146
- It will not remove the Layer as other might use it. You can everythign incliudng layer with:
146
+ It will not remove the Layer as others might use it. You can do everything, including Layer, with:
147
147
  `lld -r=all` (`npx lld -r=all` if installed locally)
148
148
 
149
149
  ## AWS CDK v2
150
150
 
151
- `context` is an additional setting for CDK. This a common way to pass varius variables to your code, most often the enviroment name.
151
+ `context` is an additional setting for CDK. This is a common way to pass various variables to your code, most often the environment name.
152
152
 
153
153
  ## Serverless Framework v3 (SLS)
154
154
 
155
- `stage` is an additional setting for SLS to pass the stage/enviroment name to SLS.
155
+ `stage` is an additional setting for SLS to pass the stage/environment name to SLS.
156
156
 
157
157
  ## AWS Serverless Application Model (SAM)
158
158
 
159
- `config-env` is an additional setting for SAM to pass the stage/enviroment name to SLS.
159
+ `config-env` is an additional setting for SAM to pass the stage/environment name to SLS.
160
160
 
161
161
  ## Terraform
162
162
 
163
- Only the most bacis setup for Terraform is supported. Check the test case [in](https://github.com/ServerlessLife/lambda-live-debugger/tree/main/test/terraform-basic).
163
+ Only the most basic setup for Terraform is supported. Check the test case [in](https://github.com/ServerlessLife/lambda-live-debugger/tree/main/test/terraform-basic).
164
164
 
165
- I am not a Terraform developer, so I only know basis. Please provide a project sample so I can build a better support.
165
+ I am not a Terraform developer, so I only know the basics. Please provide a project sample so I can build better support.
166
166
 
167
167
  ## Know issues
168
168
 
@@ -170,24 +170,24 @@ I am not a Terraform developer, so I only know basis. Please provide a project s
170
170
 
171
171
  Please check the open [issues](https://github.com/ServerlessLife/lambda-live-debugger/issues).
172
172
 
173
- The most importan missing feature is MFA authentication and more possible configuration for Terraform.
173
+ The most important missing feature is MFA authentication and the most possible configuration for Terraform.
174
174
 
175
175
  ## Reporting an issue
176
176
 
177
- - Make sure the bug is not already reported. Add +1 comment so I know there are multiple users strugling with the same issue. If possible add some additiona info.
178
- - Make a descriptive title with prefix "bug:", "help:", "feature:", "discussion:" to indicate if you find a bug, need help, propose feature... Please also add the matching label and if needed set priorit via label.
179
- - Turn on verbose logging and provide whole log.
180
- - Cerfully descript your setup, or even better provide a sample project.
177
+ - Make sure the bug is not already reported. Add +1 comment so I know there are multiple users struggling with the same issue. If possible, add some additional info.
178
+ - Make a descriptive title with the prefix "bug:", "help:", "feature:", "discussion:" to indicate if you find a bug, need help, propose a feature... Please also add the matching label and, if needed, set priority via label.
179
+ - Turn on verbose logging and provide the whole log.
180
+ - Carefully describe your setup, or even better, provide a sample project.
181
181
 
182
182
  ## Authors:
183
183
 
184
184
  - [Marko (ServerlessLife)](https://github.com/ServerlessLife)
185
- - ⭐⭐⭐ place for you for large code contibution ⭐⭐⭐
185
+ - place for you for large code contribution
186
186
 
187
187
  ## Contributors (alphabetical)
188
188
 
189
- - ⭐⭐⭐ place for you for smaller code/docuemntaiton contibution or sample project as a part of bug report ⭐⭐⭐
189
+ - place for you for smaller code/documentation contributions or a sample project as a part of a bug report
190
190
 
191
191
  ## Declarment
192
192
 
193
- Use this tool at your reposiblity ...
193
+ Use this tool at your responsibility...
package/_config.yml ADDED
@@ -0,0 +1 @@
1
+ theme: jekyll-theme-primer
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lambda-live-debugger",
3
- "version": "0.0.90",
3
+ "version": "0.0.91",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "lld": "dist/lldebugger.mjs"