diff --git a/README.md b/README.md index df398443..9d0ce53c 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ The official samples repository https://github.com/aws-samples/generative-ai-cdk # Operational Metrics Collection -Provided CDK constructs collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true. +Generative AI CDK Constructs may collect anonymous operational metrics, including: the region a construct is deployed, the name and version of the construct deployed, and related information. We may use the metrics to maintain, provide, develop, and improve the constructs and AWS services. # Roadmap diff --git a/apidocs/interfaces/BaseClassProps.md b/apidocs/interfaces/BaseClassProps.md index 81707a90..54fd540f 100644 --- a/apidocs/interfaces/BaseClassProps.md +++ b/apidocs/interfaces/BaseClassProps.md @@ -8,7 +8,6 @@ - [constructId](BaseClassProps.md#constructid) - [constructName](BaseClassProps.md#constructname) -- [enableOperationalMetric](BaseClassProps.md#enableoperationalmetric) - [observability](BaseClassProps.md#observability) - [stage](BaseClassProps.md#stage) @@ -30,25 +29,6 @@ name of the construct. ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the AWS Privacy Policy -(https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### observability • `Optional` `Readonly` **observability**: `boolean` diff --git a/apidocs/interfaces/ContentGenerationAppSyncLambdaProps.md b/apidocs/interfaces/ContentGenerationAppSyncLambdaProps.md index 8bd2069b..bc82cd43 100644 --- a/apidocs/interfaces/ContentGenerationAppSyncLambdaProps.md +++ b/apidocs/interfaces/ContentGenerationAppSyncLambdaProps.md @@ -10,7 +10,6 @@ The properties for the ContentGenerationAppSyncLambdaProps class. - [cognitoUserPool](ContentGenerationAppSyncLambdaProps.md#cognitouserpool) - [customDockerLambdaProps](ContentGenerationAppSyncLambdaProps.md#customdockerlambdaprops) -- [enableOperationalMetric](ContentGenerationAppSyncLambdaProps.md#enableoperationalmetric) - [existingBusInterface](ContentGenerationAppSyncLambdaProps.md#existingbusinterface) - [existingGeneratedAssetsBucketObj](ContentGenerationAppSyncLambdaProps.md#existinggeneratedassetsbucketobj) - [existingMergedApi](ContentGenerationAppSyncLambdaProps.md#existingmergedapi) @@ -47,25 +46,6 @@ and settings instead of the existing ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the AWS Privacy Policy -(https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### existingBusInterface • `Optional` `Readonly` **existingBusInterface**: `IEventBus` diff --git a/apidocs/interfaces/CustomSageMakerEndpointProps.md b/apidocs/interfaces/CustomSageMakerEndpointProps.md index a4d633c0..db6bd71a 100644 --- a/apidocs/interfaces/CustomSageMakerEndpointProps.md +++ b/apidocs/interfaces/CustomSageMakerEndpointProps.md @@ -7,7 +7,6 @@ ### Properties - [container](CustomSageMakerEndpointProps.md#container) -- [enableOperationalMetric](CustomSageMakerEndpointProps.md#enableoperationalmetric) - [endpointName](CustomSageMakerEndpointProps.md#endpointname) - [environment](CustomSageMakerEndpointProps.md#environment) - [instanceCount](CustomSageMakerEndpointProps.md#instancecount) @@ -28,12 +27,6 @@ ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -___ - ### endpointName • `Readonly` **endpointName**: `string` diff --git a/apidocs/interfaces/HuggingFaceSageMakerEndpointProps.md b/apidocs/interfaces/HuggingFaceSageMakerEndpointProps.md index 3f24f814..0d0a51af 100644 --- a/apidocs/interfaces/HuggingFaceSageMakerEndpointProps.md +++ b/apidocs/interfaces/HuggingFaceSageMakerEndpointProps.md @@ -7,7 +7,6 @@ ### Properties - [container](HuggingFaceSageMakerEndpointProps.md#container) -- [enableOperationalMetric](HuggingFaceSageMakerEndpointProps.md#enableoperationalmetric) - [endpointName](HuggingFaceSageMakerEndpointProps.md#endpointname) - [environment](HuggingFaceSageMakerEndpointProps.md#environment) - [instanceCount](HuggingFaceSageMakerEndpointProps.md#instancecount) @@ -25,12 +24,6 @@ ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -___ - ### endpointName • `Optional` `Readonly` **endpointName**: `string` diff --git a/apidocs/interfaces/JumpStartSageMakerEndpointProps.md b/apidocs/interfaces/JumpStartSageMakerEndpointProps.md index b48d3420..a45ae80f 100644 --- a/apidocs/interfaces/JumpStartSageMakerEndpointProps.md +++ b/apidocs/interfaces/JumpStartSageMakerEndpointProps.md @@ -7,7 +7,6 @@ ### Properties - [acceptEula](JumpStartSageMakerEndpointProps.md#accepteula) -- [enableOperationalMetric](JumpStartSageMakerEndpointProps.md#enableoperationalmetric) - [endpointName](JumpStartSageMakerEndpointProps.md#endpointname) - [environment](JumpStartSageMakerEndpointProps.md#environment) - [instanceCount](JumpStartSageMakerEndpointProps.md#instancecount) @@ -25,12 +24,6 @@ ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -___ - ### endpointName • `Readonly` **endpointName**: `string` diff --git a/apidocs/interfaces/QaAppsyncOpensearchProps.md b/apidocs/interfaces/QaAppsyncOpensearchProps.md index 8f7c17f9..36408dfe 100644 --- a/apidocs/interfaces/QaAppsyncOpensearchProps.md +++ b/apidocs/interfaces/QaAppsyncOpensearchProps.md @@ -11,7 +11,6 @@ The properties for the QaAppsyncOpensearchProps class. - [bucketInputsAssetsProps](QaAppsyncOpensearchProps.md#bucketinputsassetsprops) - [cognitoUserPool](QaAppsyncOpensearchProps.md#cognitouserpool) - [customDockerLambdaProps](QaAppsyncOpensearchProps.md#customdockerlambdaprops) -- [enableOperationalMetric](QaAppsyncOpensearchProps.md#enableoperationalmetric) - [existingBusInterface](QaAppsyncOpensearchProps.md#existingbusinterface) - [existingInputAssetsBucketObj](QaAppsyncOpensearchProps.md#existinginputassetsbucketobj) - [existingMergedApi](QaAppsyncOpensearchProps.md#existingmergedapi) @@ -66,25 +65,6 @@ and settings instead of the existing ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the AWS Privacy Policy -(https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### existingBusInterface • `Optional` `Readonly` **existingBusInterface**: `IEventBus` diff --git a/apidocs/interfaces/RagAppsyncStepfnOpensearchProps.md b/apidocs/interfaces/RagAppsyncStepfnOpensearchProps.md index a910c1ba..5ba42b76 100644 --- a/apidocs/interfaces/RagAppsyncStepfnOpensearchProps.md +++ b/apidocs/interfaces/RagAppsyncStepfnOpensearchProps.md @@ -14,7 +14,6 @@ The properties for the RagAppsyncStepfnOpensearchProps class. - [customEmbeddingsDockerLambdaProps](RagAppsyncStepfnOpensearchProps.md#customembeddingsdockerlambdaprops) - [customFileTransformerDockerLambdaProps](RagAppsyncStepfnOpensearchProps.md#customfiletransformerdockerlambdaprops) - [customInputValidationDockerLambdaProps](RagAppsyncStepfnOpensearchProps.md#custominputvalidationdockerlambdaprops) -- [enableOperationalMetric](RagAppsyncStepfnOpensearchProps.md#enableoperationalmetric) - [existingBusInterface](RagAppsyncStepfnOpensearchProps.md#existingbusinterface) - [existingInputAssetsBucketObj](RagAppsyncStepfnOpensearchProps.md#existinginputassetsbucketobj) - [existingMergedApi](RagAppsyncStepfnOpensearchProps.md#existingmergedapi) @@ -102,25 +101,6 @@ and settings instead of the existing ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the AWS Privacy Policy -(https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### existingBusInterface • `Optional` `Readonly` **existingBusInterface**: `IEventBus` diff --git a/apidocs/interfaces/SummarizationAppsyncStepfnProps.md b/apidocs/interfaces/SummarizationAppsyncStepfnProps.md index 6be0e0ba..054006b0 100644 --- a/apidocs/interfaces/SummarizationAppsyncStepfnProps.md +++ b/apidocs/interfaces/SummarizationAppsyncStepfnProps.md @@ -12,7 +12,6 @@ - [customDocumentReaderDockerLambdaProps](SummarizationAppsyncStepfnProps.md#customdocumentreaderdockerlambdaprops) - [customInputValidationDockerLambdaProps](SummarizationAppsyncStepfnProps.md#custominputvalidationdockerlambdaprops) - [customSummaryGeneratorDockerLambdaProps](SummarizationAppsyncStepfnProps.md#customsummarygeneratordockerlambdaprops) -- [enableOperationalMetric](SummarizationAppsyncStepfnProps.md#enableoperationalmetric) - [eventBusProps](SummarizationAppsyncStepfnProps.md#eventbusprops) - [existingBusInterface](SummarizationAppsyncStepfnProps.md#existingbusinterface) - [existingInputAssetsBucketObj](SummarizationAppsyncStepfnProps.md#existinginputassetsbucketobj) @@ -100,25 +99,6 @@ and settings instead of the existing ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the AWS Privacy Policy -(https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### eventBusProps • `Optional` `Readonly` **eventBusProps**: `EventBusProps` diff --git a/src/common/base-class/base-class.ts b/src/common/base-class/base-class.ts index 1ac4f7cb..9604dc16 100644 --- a/src/common/base-class/base-class.ts +++ b/src/common/base-class/base-class.ts @@ -27,19 +27,6 @@ export interface BaseClassProps { */ readonly stage?: string; - - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; - /** * name of the construct. * @@ -130,7 +117,6 @@ export class BaseClass extends Construct { } /* - * If enableOperationalMetric is set to true, * update template description with construct usage metric and * add AWS_SDK_UA_APP_ID to user agent on aws sdk. */ @@ -138,34 +124,28 @@ export class BaseClass extends Construct { ) { const solutionId = `genai_cdk_${version}/${props.constructName}/${props.constructId}`; - const enableOperationalMetric = - props.enableOperationalMetric !== undefined && - props.enableOperationalMetric !== null ? props.enableOperationalMetric : true; - - if (enableOperationalMetric) { - if (lambdaFunctions - && lambdaFunctions.length > 0) { - for (let lambdaFunction of lambdaFunctions) { - lambdaFunction.addEnvironment( - 'AWS_SDK_UA_APP_ID', solutionId, - ); - } + if (lambdaFunctions + && lambdaFunctions.length > 0) { + for (let lambdaFunction of lambdaFunctions) { + lambdaFunction.addEnvironment( + 'AWS_SDK_UA_APP_ID', solutionId, + ); } + } - if (props && BaseClass.usageMetricMap.hasOwnProperty(props.constructName)) { - BaseClass.usageMetricMap[props.constructName]=BaseClass.usageMetricMap[props.constructName]+1; - } else { - throw Error('construct name is not present in usageMetricMap '); - } + if (props && BaseClass.usageMetricMap.hasOwnProperty(props.constructName)) { + BaseClass.usageMetricMap[props.constructName]=BaseClass.usageMetricMap[props.constructName]+1; + } else { + throw Error('construct name is not present in usageMetricMap '); + } - const usageMetricMapSerialized = JSON.stringify(BaseClass.usageMetricMap).replace(/[{}]/g, '').replace(/"/g, ''); + const usageMetricMapSerialized = JSON.stringify(BaseClass.usageMetricMap).replace(/[{}]/g, '').replace(/"/g, ''); - // Description format :(usage id :uksb-1tupboc45)(version:0.0.0) (constructs :::{\"C1\":1,\"C2\":5,\"C3\":3,\"C4\":0,\"C5\":0,\"C6\":0,\"C7\":0,\"C8\":0}) ", - // where C1,C2, etc are mapped with construct-name-enum and the values shows the number of time stack created/deleted. - Stack.of(scope).templateOptions.description = - `Description: (${this.constructUsageMetric}) (version:${version}) (tag:${ usageMetricMapSerialized}) `; + // Description format :(usage id :uksb-1tupboc45)(version:0.0.0) (constructs :::{\"C1\":1,\"C2\":5,\"C3\":3,\"C4\":0,\"C5\":0,\"C6\":0,\"C7\":0,\"C8\":0}) ", + // where C1,C2, etc are mapped with construct-name-enum and the values shows the number of time stack created/deleted. + Stack.of(scope).templateOptions.description = + `Description: (${this.constructUsageMetric}) (version:${version}) (tag:${ usageMetricMapSerialized}) `; - }; } // observability diff --git a/src/patterns/gen-ai/aws-contentgen-appsync-lambda/README.md b/src/patterns/gen-ai/aws-contentgen-appsync-lambda/README.md index 1bfe50b5..9fda2943 100644 --- a/src/patterns/gen-ai/aws-contentgen-appsync-lambda/README.md +++ b/src/patterns/gen-ai/aws-contentgen-appsync-lambda/README.md @@ -246,7 +246,6 @@ Parameters | eventBusProps | [events.EventBusProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events.EventBusProps.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | A new custom event bus is created with provided props. Providing both ```existingBusInterface``` and ```eventBusProps``` will result in an error.| | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing Merged API instance. The Merged API provides a federated schema over source API schemas.| | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated costs with the services used. It is a best practice to enable by default. Defaults to true.| -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true.| | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name service. | | customDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide question answering custom lambda code and settings instead of the default construct implementation.| diff --git a/src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts b/src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts index a942f005..3b0ca750 100644 --- a/src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts +++ b/src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts @@ -100,19 +100,6 @@ export interface ContentGenerationAppSyncLambdaProps { * @default - true */ readonly observability?: boolean; - - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; - /** * Optional. Allows a user to configure * Lambda provisioned concurrency for consistent performance @@ -173,7 +160,6 @@ export class ContentGenerationAppSyncLambda extends BaseClass { const baseProps: BaseClassProps={ stage: props.stage, - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.AWSCONTENTGENAPPSYNCLAMBDA, constructId: id, observability: props.observability, diff --git a/src/patterns/gen-ai/aws-model-deployment-sagemaker/custom-sagemaker-endpoint.ts b/src/patterns/gen-ai/aws-model-deployment-sagemaker/custom-sagemaker-endpoint.ts index e19af9fa..03177e00 100644 --- a/src/patterns/gen-ai/aws-model-deployment-sagemaker/custom-sagemaker-endpoint.ts +++ b/src/patterns/gen-ai/aws-model-deployment-sagemaker/custom-sagemaker-endpoint.ts @@ -33,7 +33,6 @@ export interface CustomSageMakerEndpointProps { readonly volumeSizeInGb?: number | undefined; readonly vpcConfig?: sagemaker.CfnModel.VpcConfigProperty | undefined; readonly modelDataUrl: string; - readonly enableOperationalMetric?: boolean; } @@ -57,7 +56,6 @@ export class CustomSageMakerEndpoint extends SageMakerEndpointBase implements ia super(scope, id); const baseProps: BaseClassProps={ - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.CUSTOMSAGEMAKERENDPOINT, constructId: id, }; diff --git a/src/patterns/gen-ai/aws-model-deployment-sagemaker/huggingface-sagemaker-endpoint.ts b/src/patterns/gen-ai/aws-model-deployment-sagemaker/huggingface-sagemaker-endpoint.ts index b8d5e240..9ad1337f 100644 --- a/src/patterns/gen-ai/aws-model-deployment-sagemaker/huggingface-sagemaker-endpoint.ts +++ b/src/patterns/gen-ai/aws-model-deployment-sagemaker/huggingface-sagemaker-endpoint.ts @@ -30,7 +30,6 @@ export interface HuggingFaceSageMakerEndpointProps { readonly environment?: { [key: string]: string }; readonly startupHealthCheckTimeoutInSeconds?: number; readonly vpcConfig?: sagemaker.CfnModel.VpcConfigProperty | undefined; - readonly enableOperationalMetric?: boolean; } /** @@ -55,7 +54,6 @@ export class HuggingFaceSageMakerEndpoint extends SageMakerEndpointBase implemen super(scope, id); const baseProps: BaseClassProps={ - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.HUGGINGFACESAGEMAKERENDPOINT, constructId: id, }; diff --git a/src/patterns/gen-ai/aws-model-deployment-sagemaker/jumpstart-sagemaker-endpoint.ts b/src/patterns/gen-ai/aws-model-deployment-sagemaker/jumpstart-sagemaker-endpoint.ts index f3786002..effbb1f9 100644 --- a/src/patterns/gen-ai/aws-model-deployment-sagemaker/jumpstart-sagemaker-endpoint.ts +++ b/src/patterns/gen-ai/aws-model-deployment-sagemaker/jumpstart-sagemaker-endpoint.ts @@ -32,7 +32,6 @@ export interface JumpStartSageMakerEndpointProps { readonly environment?: { [key: string]: string }; readonly startupHealthCheckTimeoutInSeconds?: number; readonly acceptEula?: boolean; - readonly enableOperationalMetric?: boolean; } @@ -61,7 +60,6 @@ export class JumpStartSageMakerEndpoint extends SageMakerEndpointBase { super(scope, id); const baseProps: BaseClassProps={ - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.JUMPSTARTSAGEMAKERENDPOINT, constructId: id, }; diff --git a/src/patterns/gen-ai/aws-qa-appsync-opensearch/README.md b/src/patterns/gen-ai/aws-qa-appsync-opensearch/README.md index a8db28ab..d69802eb 100644 --- a/src/patterns/gen-ai/aws-qa-appsync-opensearch/README.md +++ b/src/patterns/gen-ai/aws-qa-appsync-opensearch/README.md @@ -278,7 +278,6 @@ Parameters | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name Service. | | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing Merged API instance. The Merged API provides a federated schema over source API schemas. | | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated cost with the services used. Best practice to enable by default. Defaults to true. | -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collects anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy ([https://aws.amazon.com/privacy/](https://aws.amazon.com/privacy/)). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true. | | lambdaProvisionedConcurrency | number | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows a user to configure Lambda provisioned concurrency for consistent performance | | customDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide question answering custom lambda code and settings instead of the default construct implementation. | diff --git a/src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts b/src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts index b4b9580b..336c11d1 100644 --- a/src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts +++ b/src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts @@ -129,19 +129,6 @@ export interface QaAppsyncOpensearchProps { * @default - true */ readonly observability?: boolean; - - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; - /** * Optional. Allows a user to configure * Lambda provisioned concurrency for consistent performance @@ -221,7 +208,6 @@ export class QaAppsyncOpensearch extends BaseClass { const baseProps: BaseClassProps={ stage: props.stage, - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.AWSQAAPPSYNCOPENSEARCH, constructId: id, observability: props.observability, diff --git a/src/patterns/gen-ai/aws-rag-appsync-stepfn-kendra/index.ts b/src/patterns/gen-ai/aws-rag-appsync-stepfn-kendra/index.ts index a0e78e12..4aadfd69 100644 --- a/src/patterns/gen-ai/aws-rag-appsync-stepfn-kendra/index.ts +++ b/src/patterns/gen-ai/aws-rag-appsync-stepfn-kendra/index.ts @@ -138,17 +138,6 @@ export interface RagAppsyncStepfnKendraProps { * and settings instead of the existing */ readonly updateKendraJobStatusLambdaProps?: DockerLambdaCustomProps | undefined; - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; } enum ServiceEndpointTypeEnum { @@ -210,7 +199,6 @@ export class RagAppsyncStepfnKendra extends BaseClass { const baseProps: BaseClassProps={ stage: props.stage, - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.AWSRAGAPPSYNCSTEPFNKENDRA, constructId: id, observability: props.observability, diff --git a/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/README.md b/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/README.md index dab1905b..54615b4e 100644 --- a/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/README.md +++ b/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/README.md @@ -245,7 +245,6 @@ Parameters | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name Service. | | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing merged api instance. The merge API provides a federated schema over source API schemas.| | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated cost with the services used. Best practice to enable by default. Defaults to true.| -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true.| | customEmbeddingsDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide Embeddings custom lambda code and settings instead of the default construct implementation.| | customInputValidationDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide input validation custom lambda code and settings instead of the default construct implementation.| | customFileTransformerDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide file transformation custom lambda code and settings instead of the default construct implementation.| diff --git a/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/index.ts b/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/index.ts index f788cd5e..95eb416c 100644 --- a/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/index.ts +++ b/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/index.ts @@ -153,19 +153,6 @@ export interface RagAppsyncStepfnOpensearchProps { * and settings instead of the existing */ readonly customFileTransformerDockerLambdaProps?: DockerLambdaCustomProps | undefined; - - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; - /** * Enable observability. Warning: associated cost with the services * used. Best practice to enable by default. @@ -248,7 +235,6 @@ export class RagAppsyncStepfnOpensearch extends BaseClass { const baseProps: BaseClassProps={ stage: props.stage, - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.AWSRAGAPPSYNCSTEPFNOPENSEARCH, constructId: id, observability: props.observability, diff --git a/src/patterns/gen-ai/aws-summarization-appsync-stepfn/README.md b/src/patterns/gen-ai/aws-summarization-appsync-stepfn/README.md index 5f1ce397..4eeb8b54 100644 --- a/src/patterns/gen-ai/aws-summarization-appsync-stepfn/README.md +++ b/src/patterns/gen-ai/aws-summarization-appsync-stepfn/README.md @@ -212,7 +212,6 @@ Parameters | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing Merged API instance. The Merged API provides a federated schema over source API schemas.| | summaryApiName | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | User-provided name for summary API on AppSync. A GraphQL API will be created with this name.| | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated costs with the services used. It is a best practice to enable by default. Defaults to true.| -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true.| | summaryChainType | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Chain type defines how to pass the document to the LLM. There are three chain types. Stuff: Simply "stuff" all your documents into a single prompt. Map-reduce: Summarize each document on its own in a "map" step and then "reduce" the summaries into a final summary. Refine: Loops over the input documents and iteratively updates its answer. | | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name service. | | customDocumentReaderDockerLambdaProps | [DockerLambdaCustomProps](../../../common/props/DockerLambdaCustomProps.ts) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows to provide document reading custom lambda code and settings instead of the default construct implementation.| diff --git a/src/patterns/gen-ai/aws-summarization-appsync-stepfn/index.ts b/src/patterns/gen-ai/aws-summarization-appsync-stepfn/index.ts index 80cf7eaa..ebe0472c 100644 --- a/src/patterns/gen-ai/aws-summarization-appsync-stepfn/index.ts +++ b/src/patterns/gen-ai/aws-summarization-appsync-stepfn/index.ts @@ -152,17 +152,6 @@ export interface SummarizationAppsyncStepfnProps { * @default - Stuff */ readonly summaryChainType?: string; - /** - * Optional.CDK constructs provided collects anonymous operational - * metrics to help AWS improve the quality and features of the - * constructs. Data collection is subject to the AWS Privacy Policy - * (https://aws.amazon.com/privacy/). To opt out of this feature, - * simply disable it by setting the construct property - * "enableOperationalMetric" to false for each construct used. - * - * @default - true - */ - readonly enableOperationalMetric?: boolean; /** * Value will be appended to resources name. * @@ -255,7 +244,6 @@ export class SummarizationAppsyncStepfn extends BaseClass { const baseProps: BaseClassProps={ stage: props.stage, - enableOperationalMetric: props.enableOperationalMetric, constructName: ConstructName.AWSSUMMARIZATIONAPPSYNCSTEPFN, constructId: id, observability: props.observability, diff --git a/website/docs/api/interfaces/QaAppsyncOpensearchProps.md b/website/docs/api/interfaces/QaAppsyncOpensearchProps.md index aeee19ea..d1080b43 100644 --- a/website/docs/api/interfaces/QaAppsyncOpensearchProps.md +++ b/website/docs/api/interfaces/QaAppsyncOpensearchProps.md @@ -35,24 +35,6 @@ Cognito user pool used for authentication. ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### existingBusInterface • `Optional` `Readonly` **existingBusInterface**: `IEventBus` diff --git a/website/docs/api/interfaces/RagAppsyncStepfnOpensearchProps.md b/website/docs/api/interfaces/RagAppsyncStepfnOpensearchProps.md index de83c60e..8f3db893 100644 --- a/website/docs/api/interfaces/RagAppsyncStepfnOpensearchProps.md +++ b/website/docs/api/interfaces/RagAppsyncStepfnOpensearchProps.md @@ -50,24 +50,6 @@ Cognito user pool used for authentication. ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### existingBusInterface • `Optional` `Readonly` **existingBusInterface**: `IEventBus` diff --git a/website/docs/api/interfaces/SummarizationAppsyncStepfnProps.md b/website/docs/api/interfaces/SummarizationAppsyncStepfnProps.md index 226f5c76..2de96885 100644 --- a/website/docs/api/interfaces/SummarizationAppsyncStepfnProps.md +++ b/website/docs/api/interfaces/SummarizationAppsyncStepfnProps.md @@ -69,24 +69,6 @@ Required. Cognito user pool used for authentication. ___ -### enableOperationalMetric - -• `Optional` `Readonly` **enableOperationalMetric**: `boolean` - -Optional.CDK constructs provided collects anonymous operational -metrics to help AWS improve the quality and features of the -constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, -simply disable it by setting the construct property -"enableOperationalMetric" to false for each construct used. - -**`Default`** - -```ts -- true -``` - -___ - ### eventBusProps • `Optional` `Readonly` **eventBusProps**: `EventBusProps` diff --git a/website/docs/patterns/aws-qa-appsync-opensearch/README.md b/website/docs/patterns/aws-qa-appsync-opensearch/README.md index d3caa16a..f04d616f 100644 --- a/website/docs/patterns/aws-qa-appsync-opensearch/README.md +++ b/website/docs/patterns/aws-qa-appsync-opensearch/README.md @@ -214,7 +214,6 @@ Parameters | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name Service. | | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing Merged API instance. The Merged API provides a federated schema over source API schemas.| | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated cost with the services used. Best practice to enable by default. Defaults to true.| -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collects anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true.| | lambdaProvisionedConcurrency | number | ![Optional](https://img.shields.io/badge/optional-4169E1) | Allows a user to configure Lambda provisioned concurrency for consistent performance| ## Pattern Properties diff --git a/website/docs/patterns/aws-rag-appsync-stepfn-opensearch/README.mdx b/website/docs/patterns/aws-rag-appsync-stepfn-opensearch/README.mdx index 4ccde54a..e73027a1 100644 --- a/website/docs/patterns/aws-rag-appsync-stepfn-opensearch/README.mdx +++ b/website/docs/patterns/aws-rag-appsync-stepfn-opensearch/README.mdx @@ -214,7 +214,6 @@ Parameters | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name Service. | | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing merged api instance. The merge API provides a federated schema over source API schemas.| | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated cost with the services used. Best practice to enable by default. Defaults to true.| -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the AWS Privacy Policy (https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true.| ## Pattern Properties diff --git a/website/docs/patterns/aws-summarization-appsync-stepfn/README.md b/website/docs/patterns/aws-summarization-appsync-stepfn/README.md index dfae31c4..0da90d35 100644 --- a/website/docs/patterns/aws-summarization-appsync-stepfn/README.md +++ b/website/docs/patterns/aws-summarization-appsync-stepfn/README.md @@ -215,7 +215,7 @@ Parameters | existingMergedApi | [appsync.CfnGraphQLApi](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.CfnGraphQLApi.html) | ![Optional](https://img.shields.io/badge/optional-4169E1) | Existing Merged API instance. The Merged API provides a federated schema over source API schemas. | | summaryApiName | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | User-provided name for summary API on AppSync. A GraphQL API will be created with this name. | | observability | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | Enables observability on all services used. Warning: associated costs with the services used. It is a best practice to enable by default. Defaults to true. | -| enableOperationalMetric | boolean | ![Optional](https://img.shields.io/badge/optional-4169E1) | CDK construct collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true. | + | summaryChainType | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Chain type defines how to pass the document to the LLM. There are three chain types. Stuff: Simply "stuff" all your documents into a single prompt. Map-reduce: Summarize each document on its own in a "map" step and then "reduce" the summaries into a final summary. Refine: Loops over the input documents and iteratively updates its answer. | | stage | string | ![Optional](https://img.shields.io/badge/optional-4169E1) | Value will be appended to resources name service. | diff --git a/website/docs/quick-start.mdx b/website/docs/quick-start.mdx index 4209cc8f..5677400c 100644 --- a/website/docs/quick-start.mdx +++ b/website/docs/quick-start.mdx @@ -110,7 +110,7 @@ The following constructs are available in the library: ## Operational Metrics Collection -Provided CDK constructs collect anonymous operational metrics to help AWS improve the quality and features of the constructs. Data collection is subject to the [AWS Privacy Policy](https://aws.amazon.com/privacy/). To opt out of this feature, simply disable it by setting the construct property "enableOperationalMetric" to false for each construct used. Defaults to true. +Generative AI CDK Constructs may collect anonymous operational metrics, including: the region a construct is deployed, the name and version of the construct deployed, and related information. We may use the metrics to maintain, provide, develop, and improve the constructs and AWS services. ## Roadmap