Artifacts bucket - SoftupTechnologies/infrastructure-components GitHub Wiki
Path: /lib/artifacts-bucket/index.ts
Exports: ArtifactsBucket
Required construct packages: @aws-cdk/aws-s3
This construct will create a private bucket to store our service artifacts, backups, or other sensitive data.
Usage
import * as cdk from '@aws-cdk/core';
import { ArtifactsBucket } from './artifacts-bucket';
export class ServerlessInfrastructureCdkStack extends cdk.Stack {
constructor(scope: cdk.App, id: string, props: StackProps) {
super(scope, id);
const artifactsBucket = new ArtifactsBucket(this, 'ArtifactStorage', {
artifactBucketName: 'artifact-bucket',
tags: [{
key: 'Name',
value: 'Service Artifacts'
}]
});
}
}
Construct props
Name | Type | Required | Default | Description |
---|---|---|---|---|
artifactBucketName | string | true | undefined | Bucket name. |
tags | Tags { key: string, value: string }[] | false | undefined | Tags to add in the resource (Bucket). |
Properties
Name | Type | Description |
---|---|---|
bucketName | string | Bucket name. |
bucketId | string | Bucket id. |
bucket | s3.Bucket | Created bucket instance. |