Skip to content
v2.276.0

BundlingFileAccess Enum ​

The access mechanism used to make source files available to the bundling container and to return the bundling output back to the host.

Example ​

ts
new go.GoFunction(this, 'GoFunction', {
 entry: 'app/cmd/api',
 bundling: {
      bundlingFileAccess: BundlingFileAccess.VOLUME_COPY,
  },
});
python
go.GoFunction(self, "GoFunction",
    entry="app/cmd/api",
    bundling=go.BundlingOptions(
        bundling_file_access=BundlingFileAccess.VOLUME_COPY
    )
)
java
GoFunction.Builder.create(this, "GoFunction")
        .entry("app/cmd/api")
        .bundling(BundlingOptions.builder()
                .bundlingFileAccess(BundlingFileAccess.VOLUME_COPY)
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new GoFunction(this, "GoFunction", new GoFunctionProps {
    Entry = "app/cmd/api",
    Bundling = new BundlingOptions {
        BundlingFileAccess = BundlingFileAccess.VOLUME_COPY
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
go.NewGoFunction(this, jsii.String("GoFunction"), &GoFunctionProps{
	Entry: jsii.String("app/cmd/api"),
	Bundling: &BundlingOptions{
		BundlingFileAccess: awscdk.BundlingFileAccess_VOLUME_COPY,
	},
})

Members ​

MemberDescription
VOLUME_COPYCreates temporary volumes and containers to copy files from the host to the bundling container and back.
BIND_MOUNTThe source and output folders will be mounted as bind mount from the host system This is faster and simpler, but less portable than VOLUME_COPY.

Referenced by ​

  • BundlingOptions.bundlingFileAccessbundling_file_accessbundlingFileAccessBundlingFileAccessBundlingFileAccess
  • BundlingOptions.bundlingFileAccessbundling_file_accessbundlingFileAccessBundlingFileAccessBundlingFileAccess
  • BundlingOptions.bundlingFileAccessbundling_file_accessbundlingFileAccessBundlingFileAccessBundlingFileAccess
  • BundlingOptions.bundlingFileAccessbundling_file_accessbundlingFileAccessBundlingFileAccessBundlingFileAccess