aws-cdk-lib.aws_codebuild.S3ArtifactsProps

interface S3ArtifactsProps

LanguageType name
.NETAmazon.CDK.AWS.CodeBuild.S3ArtifactsProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodebuild#S3ArtifactsProps
Javasoftware.amazon.awscdk.services.codebuild.S3ArtifactsProps
Pythonaws_cdk.aws_codebuild.S3ArtifactsProps
TypeScript (source)aws-cdk-lib » aws_codebuild » S3ArtifactsProps

Construction properties for S3Artifacts.

Example

declare const bucket: s3.Bucket;

const project = new codebuild.Project(this, 'MyProject', {
  buildSpec: codebuild.BuildSpec.fromObject({
    version: '0.2',
  }),
  artifacts: codebuild.Artifacts.s3({
      bucket,
      includeBuildId: false,
      packageZip: true,
      path: 'another/path',
      identifier: 'AddArtifact1',
    }),
});

Properties

NameTypeDescription
bucketIBucketThe name of the output bucket.
encryption?booleanIf this is false, build output will not be encrypted.
identifier?stringThe artifact identifier.
includeBuildId?booleanIndicates if the build ID should be included in the path.
name?stringThe name of the build output ZIP file or folder inside the bucket.
packageZip?booleanIf this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to /.
path?stringThe path inside of the bucket for the build output .zip file or folder. If a value is not specified, then build output will be stored at the root of the bucket (or under the <build-id> directory if includeBuildId is set to true).

bucket

Type: IBucket

The name of the output bucket.


encryption?

Type: boolean (optional, default: true - output will be encrypted)

If this is false, build output will not be encrypted.

This is useful if the artifact to publish a static website or sharing content with others


identifier?

Type: string (optional)

The artifact identifier.

This property is required on secondary artifacts.


includeBuildId?

Type: boolean (optional, default: true)

Indicates if the build ID should be included in the path.

If this is set to true, then the build artifact will be stored in "/<build-id>/".


name?

Type: string (optional, default: undefined, and use the name from the buildspec)

The name of the build output ZIP file or folder inside the bucket.

The full S3 object key will be "/<build-id>/" or "/" depending on whether includeBuildId is set to true.

If not set, overrideArtifactName will be set and the name from the buildspec will be used instead.


packageZip?

Type: boolean (optional, default: true - files will be archived)

If this is true, all build output will be packaged into a single .zip file. Otherwise, all files will be uploaded to /.


path?

Type: string (optional, default: the root of the bucket)

The path inside of the bucket for the build output .zip file or folder. If a value is not specified, then build output will be stored at the root of the bucket (or under the <build-id> directory if includeBuildId is set to true).