Interface IAssetOptions
Inherited Members
Namespace: Amazon.CDK.AWS.S3.Assets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAssetOptions : IAssetOptions, IFileCopyOptions
Syntax (vb)
Public Interface IAssetOptions
Inherits IAssetOptions, IFileCopyOptions
Remarks
ExampleMetadata: infused
Examples
new Function(this, "Function", new FunctionProps {
Code = Code.FromAsset(Join(__dirname, "my-python-handler"), new AssetOptions {
Bundling = new BundlingOptions {
Image = Runtime.PYTHON_3_9.BundlingImage,
Command = new [] { "bash", "-c", "pip install -r requirements.txt -t /asset-output && cp -au . /asset-output" }
}
}),
Runtime = Runtime.PYTHON_3_9,
Handler = "index.handler"
});
Synopsis
Properties
Readers | A list of principals that should be able to read this asset from S3. |
Properties
Readers
A list of principals that should be able to read this asset from S3.
virtual IGrantable[] Readers { get; }
Property Value
Remarks
You can use asset.grantRead(principal)
to grant read permissions later.
Default: - No principals that can read file asset.