Skip to content

sam: cdk diff returns nothing when codeUri or events are changed #29185

@pahud

Description

@pahud

Describe the bug

cdk diff returns nothing when I change the codeUri or events prop of sam.CfnFunction

 new sam.CfnFunction(this,`MarkLogicErrAlertFunction`,{
      codeUri: 's3://my-bucket/HelloWorldLambda12345.zip',
      handler: 'index.handler',
      runtime: 'nodejs16.x',
      // timeout: 300,
      // functionName: mailerfunctionName,
      // events: {
      //   TaskServerError: {
      //     properties: TaskServerErrorProperties,
      //     type: 'CloudWatchLogs',
      //   },

Expected Behavior

cdk diff should return the change

Current Behavior

it returns nothing

Reproduction Steps

Just deploy this for the first time

 new sam.CfnFunction(this,`MarkLogicErrAlertFunction`,{
      codeUri: 's3://my-bucket/HelloWorldLambda12345.zip',
      handler: 'index.handler',
      runtime: 'nodejs16.x',
      // timeout: 300,
      // functionName: mailerfunctionName,
      // events: {
      //   TaskServerError: {
      //     properties: TaskServerErrorProperties,
      //     type: 'CloudWatchLogs',
      //   },

and then modify codeUri or events, run cdk diff again.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

v2.126.0

Framework Version

No response

Node.js Version

v18.16.0

OS

mac

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-samRelated to AWS Serverless Application ModelbugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions