Skip to content

Custom Resource Properties Keys Are Being Uppercased #7035

@chriscoombs

Description

@chriscoombs

The CustomResource type is currently uppercasing the first letter in each prop.properties key. There is no requirement in CloudFormation for the first letter to be uppercased. The CloudFormation documentation for Custom Resources shows properties with lowercase keys.

Uppercasing the properties prevents the porting of existing custom resources to CDK. Even when code changes to the backing Lambda function are possible, simple object destructuring is not.

Reproduction Steps

new cloudformation.CustomResource(this, 'Custom Resource', {
      provider: cloudformation.CustomResourceProvider.fromLambda(customResource),
      properties: {
        detail: {
          event: 'referenceCreated',
          repositoryName,
        }
      }
    })

Error Log

detail: {
          ...
        }

becomes

Detail: {
          ...
        }

Environment

  • CLI Version :
  • Framework Version:
  • OS :
  • Language :

Other

Fixed in pull request 7034.


This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

@aws-cdk/custom-resourcesRelated to AWS CDK Custom ResourcesbugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.p1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions