awslabs / aws-solutions-constructs

The AWS Solutions Constructs Library is an open-source extension of the AWS Cloud Development Kit (AWS CDK) that provides multi-service, well-architected patterns for quickly defining solutions
https://docs.aws.amazon.com/solutions/latest/constructs/
Apache License 2.0
1.25k stars 249 forks source link

Deprecation warning for aws_stepfunctions.StateMachineProps #1231

Closed kandakji closed 3 weeks ago

kandakji commented 3 weeks ago

When using S3ToStepfunctions construct, the following deprecation warning is thrown

[WARNING] aws-cdk-lib.aws_stepfunctions.StateMachineProps#definition is deprecated.
  use definitionBody: DefinitionBody.fromChainable()
  This API will be removed in the next major release.

Reproduction Steps

Error Log

Environment

Other


This is :bug: Bug Report

kandakji commented 3 weeks ago

Solved, just needed to use definition_body instead of definition

s3ToStepfunction = S3ToStepfunctions(
            self,
            "step-function",
            state_machine_props=sfn.StateMachineProps(
                definition_body=sfn.DefinitionBody.from_chainable(

                ),
                tracing_enabled=True,
            ),
            existing_bucket_obj=input_bucket,
        )
biffgaut commented 3 weeks ago

Glad to hear you've got a resolution. We're aware of the issue with our docs and some integration tests and are slowly addressing both across the whole library. For instance, the integration tests for that construct have already been updated.