Skip to content
v2.277.0

S3LoggingOptions Struct ​

Information about logs built to an S3 bucket for a build project.

Example ​

ts
new codebuild.Project(this, 'Project', {
  logging: {
    s3: {
      bucket: new s3.Bucket(this, `LogBucket`)
    }
  },
})
python
codebuild.Project(self, "Project",
    logging=codebuild.LoggingOptions(
        s3=codebuild.S3LoggingOptions(
            bucket=s3.Bucket(self, "LogBucket")
        )
    )
)
java
Project.Builder.create(this, "Project")
        .logging(LoggingOptions.builder()
                .s3(S3LoggingOptions.builder()
                        .bucket(new Bucket(this, "LogBucket"))
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
new Project(this, "Project", new ProjectProps {
    Logging = new LoggingOptions {
        S3 = new S3LoggingOptions {
            Bucket = new Bucket(this, "LogBucket")
        }
    }
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
codebuild.NewProject(this, jsii.String("Project"), &ProjectProps{
	Logging: &LoggingOptions{
		S3: &S3LoggingOptions{
			Bucket: s3.NewBucket(this, jsii.String("LogBucket")),
		},
	},
})

Properties ​

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucketrequired#
The S3 Bucket to send logs to.
enabledoptionalbooleanenabledoptionalboolenabledoptionalBooleanEnabledoptionalboolEnabledoptional*bool= true#
The current status of the logs in Amazon CloudWatch Logs for a build project.
encryptedoptionalbooleanencryptedoptionalboolencryptedoptionalBooleanEncryptedoptionalboolEncryptedoptional*bool= true#
Encrypt the S3 build log output.
prefixoptionalstringprefixoptionalstrprefixoptionalStringPrefixoptionalstringPrefixoptional*string#
The path prefix for S3 logs.

Default: no prefix