interface ProductStackProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Servicecatalog.ProductStackProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsservicecatalog#ProductStackProps |
Java | software.amazon.awscdk.services.servicecatalog.ProductStackProps |
Python | aws_cdk.aws_servicecatalog.ProductStackProps |
TypeScript (source) | aws-cdk-lib » aws_servicecatalog » ProductStackProps |
Product stack props.
Example
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as cdk from 'aws-cdk-lib';
import { Bucket } from "aws-cdk-lib/aws-s3";
class LambdaProduct extends servicecatalog.ProductStack {
constructor(scope: Construct, id: string, props: servicecatalog.ProductStackProps) {
super(scope, id, props);
new lambda.Function(this, 'LambdaProduct', {
runtime: lambda.Runtime.PYTHON_3_9,
code: lambda.Code.fromAsset("./assets"),
handler: 'index.handler'
});
}
}
const userDefinedBucket = new Bucket(this, `UserDefinedBucket`, {
bucketName: 'user-defined-bucket-for-product-stack-assets',
});
const product = new servicecatalog.CloudFormationProduct(this, 'Product', {
productName: "My Product",
owner: "Product Owner",
productVersions: [
{
productVersionName: "v1",
cloudFormationTemplate: servicecatalog.CloudFormationTemplate.fromProductStack(new LambdaProduct(this, 'LambdaFunctionProduct', {
assetBucket: userDefinedBucket,
})),
},
],
});
Properties
Name | Type | Description |
---|---|---|
asset | IBucket | A Bucket can be passed to store assets, enabling ProductStack Asset support. |
memory | number | The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket. |
server | Server | A ServerSideEncryption can be enabled to encrypt assets that are put into assetBucket. |
server | string | For AWS_KMS ServerSideEncryption a KMS KeyId must be provided which will be used to encrypt assets. |
assetBucket?
Type:
IBucket
(optional, default: No Bucket provided and Assets will not be supported.)
A Bucket can be passed to store assets, enabling ProductStack Asset support.
memoryLimit?
Type:
number
(optional, default: 128)
The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.
If you are deploying large files, you will need to increase this number accordingly.
serverSideEncryption?
Type:
Server
(optional, default: No encryption is used)
A ServerSideEncryption can be enabled to encrypt assets that are put into assetBucket.
serverSideEncryptionAwsKmsKeyId?
Type:
string
(optional, default: No KMS KeyId and SSE_KMS encryption cannot be used)
For AWS_KMS ServerSideEncryption a KMS KeyId must be provided which will be used to encrypt assets.