aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.65k stars 3.91k forks source link

(module name): Update @aws-cdk/aws-timestream to CDK v2 #19485

Closed overheat closed 2 years ago

overheat commented 2 years ago

Description

@aws-cdk/aws-timestream is still v1.x.x, which show error in CDK v2 application.

this: this
Argument of type 'this' is not assignable to parameter of type 'Construct'.
  Type 'Cdkv2SamLambdaRustStack' is missing the following properties from type 'Construct': onValidate, onPrepare, onSynthesize, validate, and 2 more.

Looks those onValidate, onPrepare, onSynthesize are deprecated API for CDK v2.

Use Case

Time series database.

Proposed Solution

Upgrade it.

Other information

No response

Acknowledge

kaizencc commented 2 years ago

Hi @overheat. The @aws-cdk/aws-timestream module is the v1 module. In v2, we have bundled all stable modules under aws-cdk-lib. Since timestream only has L1 constructs, you should find that you don't need any additional imports, and instead can find them under:

import * as ts from 'aws-cdk-lib/aws-timestream';

Let me know if that's not the case!

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.