Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transfer : CopyStepDetailsProperty Wrong CloudFormation Mapping #28410

Open
Zahra-97 opened this issue Dec 18, 2023 · 1 comment
Open

transfer : CopyStepDetailsProperty Wrong CloudFormation Mapping #28410

Zahra-97 opened this issue Dec 18, 2023 · 1 comment
Labels
@aws-cdk/aws-transfer Related to AWS Transfer for SFTP bug This issue is a bug. effort/small Small work item – less than a day of effort jsii This issue originates in jsii, or this feature must be implemented in jsii. p3

Comments

@Zahra-97
Copy link

Describe the bug

AWS::Transfer::Workflow CopyStepDetails is generated with camel case. AWS API requires Properties in Pascal Case:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-transfer-workflow-copystepdetails.html
{
"DestinationFileLocation" : S3FileLocation,
"Name" : String,
"OverwriteExisting" : String,
"SourceFileLocation" : String
}

Python code:
Screenshot 2023-12-18 at 16 32 12

Expected Behavior

Json Template output with pascal case properties

Current Behavior

Json Template output with camel case properties.

Reproduction Steps

`

copy_step_details_property = transfer.CfnWorkflow.CopyStepDetailsProperty(
          destination_file_location=transfer.CfnWorkflow.S3FileLocationProperty(
              s3_file_location=transfer.CfnWorkflow.S3InputFileLocationProperty(
                  bucket=bucket.bucket_name,
                  key="csv"
              )
          ),
          name=cp_to_s3,
          overwrite_existing="TRUE",
          source_file_location="${original.file}"
      )
    
cfn_workflow = transfer.CfnWorkflow(
    self,
    "CopyToS3",
    steps=[
        transfer.CfnWorkflow.WorkflowStepProperty(
            copy_step_details=copy_step_details_property
            )
    ],
    description='copy_to_s3'
    
)

`

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.110.0

Framework Version

No response

Node.js Version

v21.3.0

OS

macOS Monterey Version 12.6

Language

Python

Language Version

Python (3.11)

Other information

Screenshot 2023-12-18 at 16 18 30 Screenshot 2023-12-18 at 16 19 32
@Zahra-97 Zahra-97 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2023
@github-actions github-actions bot added the @aws-cdk/aws-transfer Related to AWS Transfer for SFTP label Dec 18, 2023
@khushail khushail added jsii This issue originates in jsii, or this feature must be implemented in jsii. p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2023
@pahud pahud changed the title aws_transfer : CopyStepDetailsProperty Wrong CloudFormation Mapping transfer : CopyStepDetailsProperty Wrong CloudFormation Mapping Jun 3, 2024
@pahud
Copy link
Contributor

pahud commented Jun 3, 2024

https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_transfer/CfnWorkflow.html#aws_cdk.aws_transfer.CfnWorkflow.WorkflowStepProperty

All the properties are loosely typed as Any. You will need to define JSON for that.

e.g.

copy_step_details_property = {
  "DestinationFileLocation" : S3FileLocation,
  "Name" : String,
  "OverwriteExisting" : String,
  "SourceFileLocation" : String
}

related to #21767

@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-transfer Related to AWS Transfer for SFTP bug This issue is a bug. effort/small Small work item – less than a day of effort jsii This issue originates in jsii, or this feature must be implemented in jsii. p3
Projects
None yet
Development

No branches or pull requests

3 participants