Skip to content
v2.277.0

S3SourceProps Struct ​

Construction properties for S3Source.

Example ​

ts
const bucket = new s3.Bucket(this, 'MyBucket');

new codebuild.Project(this, 'MyProject', {
  source: codebuild.Source.s3({
    bucket: bucket,
    path: 'path/to/file.zip',
  }),
});
python
bucket = s3.Bucket(self, "MyBucket")

codebuild.Project(self, "MyProject",
    source=codebuild.Source.s3(
        bucket=bucket,
        path="path/to/file.zip"
    )
)
java
Bucket bucket = new Bucket(this, "MyBucket");

Project.Builder.create(this, "MyProject")
        .source(Source.s3(S3SourceProps.builder()
                .bucket(bucket)
                .path("path/to/file.zip")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var bucket = new Bucket(this, "MyBucket");

new Project(this, "MyProject", new ProjectProps {
    Source = Source.S3(new S3SourceProps {
        Bucket = bucket,
        Path = "path/to/file.zip"
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
bucket := s3.NewBucket(this, jsii.String("MyBucket"))

codebuild.NewProject(this, jsii.String("MyProject"), &ProjectProps{
	Source: codebuild.Source_S3(&S3SourceProps{
		Bucket: bucket,
		Path: jsii.String("path/to/file.zip"),
	}),
})

Properties ​

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucket required #
identifieroptionalstringidentifieroptionalstridentifieroptionalStringIdentifieroptionalstringIdentifieroptional*string #
The source identifier.

This property is required on secondary sources.

pathstringpathstrpathStringPathstringPath*string required #
versionoptionalstringversionoptionalstrversionoptionalStringVersionoptionalstringVersionoptional*string = latest #
The version ID of the object that represents the build input ZIP file to use.