Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
> Run your CDK Stack's Lambda functions as if they were in a development environment.
cdk-watch
👀Run your CDK Stack's Lambda functions as if they were in a development environment.
cdkw "MyApp/MyApi/**"
NodejsFunction
with the WatchableNodejsFunction
constructSimply switch to use the WatchableNodejsFunction
rather than the NodejsFunction
.
- import {NodejsFunction} from '@aws-cdk/aws-lambda-nodejs';
+ import {WatchableNodejsFunction} from 'cdk-watch';
// ...
- const lambda = new NodejsFunction(this, 'Lambda', {
+ const lambda = new WatchableNodejsFunction(this, 'Lambda', {
entry: path.resolve(__dirname, '../src/my-lambda.ts'),
handler: 'handler',
});
# Run all Lambda functions
$ yarn cdkw "**"
# Run just your API Lambdas, for example
$ yarn cdkw "MyStack/API/**"
# Run without logs
$ yarn cdkw "MyStack/API/**" --no-logs
# Pass context to synth
$ yarn cdkw "MyStack/API/**" -c foo=bar -c hello=world
# If you are using npm
$ npm run cdkw "**"
Skip to the command reference.
cdk-watch
provides real-time logs over web-sockets to make the development
feedback-loop faster when debugging your lambdas. This is an additional feature
that requires opt-in, and you have two options for achieving this.
cdk-watch:forceRealTimeLoggingEnabled
to true
.WatchableNodejsFunction
: watchOptions.realTimeLoggingEnabled=true
.When deploying your stack the WatchableNodejsFunction
will include the
necessary infrastructure to support WebSockets via API Gateway. It'll also
assign a Lambda Layer Extension to wrap your lambda, the wrapper will patch the
console
and forward all logs to all API Gateway connections. If you have
multiple lambdas in your stack it'll only create the require infrastructure
once, and reuse it for all lambdas that need it.
CDK-Watch allows you to install your node-modules as a stand alone layer. This
means that when you deploy, cdk-watch
will install your modules in a separate
asset and install them as the lambda's layer. This is great for dev-performance
as the upload bundle will be much smaller. You can configure this using the
bundling.nodeModulesLayer
property:
bundling: {
// Install only "knex" as a standalone layer
nodeModulesLayer: {include: ['knex']}
}
OR:
bundling: {
// Install every module found in your package.json except "knex"
nodeModulesLayer: {exclude: ['knex']}
}
cdk-watch
will take a
couple of secondscdkw
will run cdk synth
WatchableNodejsFunction
construct will write a manifest
file including Lambda Logical IDs, their Stack names and their esbuild configwatch
mode for each LambdaupdateFunctionCode
SST runs your Lambda functions locally by mocking the deployed lambda with your
local environment. It comes with a number of performance benefits due to the
fact that it doesn't need to upload your function code every time it change.
That said, cdk-watch
does not come with a slow feedback loop, you can expect
1s-5s from the moment you save a file to the moment its available on AWS. The
upside of cdk-watch
is we deploy no extra infrastructure to facilitate the
development environment so there is less discrepancy between prod and pre-prod
environments.
For more info on each command add a --help
flag after any one of them.
cdkw "**"
watch your Lambda where the CDK construct path matches
the globcdkw ls "**"
lists all your available WatchableNodejsFunction
Constructs, a convenience command to help you get find paths you needcdkw once "**"
updates your lambda's once, rather than in watchcdkw logs "**"
just tails logs for each of the matching lambdas✈️ / planes.studio
FAQs
> Run your CDK Stack's Lambda functions as if they were in a development environment.
The npm package cdk-watch receives a total of 32 weekly downloads. As such, cdk-watch popularity was classified as not popular.
We found that cdk-watch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.