Class NodejsFunction
A Node.js Lambda function bundled using esbuild.
Implements
IConstruct
IDependable
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda.Nodejs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NodejsFunction : Function, IFunction, IResource, IConnectable, IGrantable, IFunctionRef, IConstruct, IDependable, IEnvironmentAware, IClientVpnConnectionHandler
Syntax (vb)
Public Class NodejsFunction Inherits Function Implements IFunction, IResource, IConnectable, IGrantable, IFunctionRef, IConstruct, IDependable, IEnvironmentAware, IClientVpnConnectionHandler
Remarks
ExampleMetadata: infused
Examples
new NodejsFunction(this, "my-handler", new NodejsFunctionProps {
Bundling = new BundlingOptions {
Network = "host",
SecurityOpt = "no-new-privileges",
User = "user:group",
VolumesFrom = new [] { "777f7dc92da7" },
Volumes = new [] { new DockerVolume { HostPath = "/host-path", ContainerPath = "/container-path" } }
}
});
Synopsis
Constructors
| NodejsFunction(Construct, string, INodejsFunctionProps?) | A Node.js Lambda function bundled using esbuild. |
Constructors
NodejsFunction(Construct, string, INodejsFunctionProps?)
A Node.js Lambda function bundled using esbuild.
public NodejsFunction(Construct scope, string id, INodejsFunctionProps? props = null)
Parameters
- scope Construct
- id string
- props INodejsFunctionProps
Remarks
ExampleMetadata: infused
Examples
new NodejsFunction(this, "my-handler", new NodejsFunctionProps {
Bundling = new BundlingOptions {
Network = "host",
SecurityOpt = "no-new-privileges",
User = "user:group",
VolumesFrom = new [] { "777f7dc92da7" },
Volumes = new [] { new DockerVolume { HostPath = "/host-path", ContainerPath = "/container-path" } }
}
});
Implements
Constructs.IConstruct
Constructs.IDependable