Interface IPythonFunctionProps
(experimental) Properties for a PythonFunction.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda.Python.Alpha
Assembly: Amazon.CDK.AWS.Lambda.Python.Alpha.dll
Syntax (csharp)
public interface IPythonFunctionProps : IFunctionOptions, IEventInvokeConfigOptions
Syntax (vb)
Public Interface IPythonFunctionProps
Inherits IFunctionOptions, IEventInvokeConfigOptions
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var entry = "/path/to/function";
var image = DockerImage.FromBuild(entry);
new PythonFunction(this, "function", new PythonFunctionProps {
Entry = entry,
Runtime = Runtime.PYTHON_3_8,
Bundling = new BundlingOptions {
BuildArgs = new Dictionary<string, string> { { "PIP_INDEX_URL", "https://your.index.url/simple/" }, { "PIP_EXTRA_INDEX_URL", "https://your.extra-index.url/simple/" } }
}
});
Synopsis
Properties
Bundling | (experimental) Bundling options to use for this function. |
Entry | (experimental) Path to the source of the function or the location for dependencies. |
Handler | (experimental) The name of the exported handler in the index file. |
Index | (experimental) The path (relative to entry) to the index file containing the exported handler. |
Runtime | (experimental) The runtime environment. |
Properties
Bundling
(experimental) Bundling options to use for this function.
virtual IBundlingOptions Bundling { get; }
Property Value
Remarks
Use this to specify custom bundling options like the bundling Docker image, asset hash type, custom hash, architecture, etc.
Default: - Use the default bundling Docker image, with x86_64 architecture.
Stability: Experimental
Entry
(experimental) Path to the source of the function or the location for dependencies.
string Entry { get; }
Property Value
System.
Remarks
Stability: Experimental
Handler
(experimental) The name of the exported handler in the index file.
virtual string Handler { get; }
Property Value
System.
Remarks
Default: handler
Stability: Experimental
Index
(experimental) The path (relative to entry) to the index file containing the exported handler.
virtual string Index { get; }
Property Value
System.
Remarks
Default: index.py
Stability: Experimental
Runtime
(experimental) The runtime environment.
Runtime Runtime { get; }
Property Value
Remarks
Only runtimes of the Python family are supported.
Stability: Experimental