As per the code, in the events section of the CfnFunction, the value for 'api_id' is referenced from the 'CfnHttpApi' defined above so this should resolve as per the cfn return value.
Expected Behavior
The event section should be resolving as below:
S3SignerLambda:
Type: AWS::Serverless::Function
Properties:
Description: test
Events:
S3Sign:
Properties:
Method: POST
Path: /s3-sign
ApiId:
Ref: HttpApiGateway
Type: HttpApi
Current Behavior
However, it is resolving as below where it is observed that it is completely omitting the 'ApiId' property.
S3SignerLambda:
Type: AWS::Serverless::Function
Properties:
Description: test
Events:
S3Sign:
Properties:
Method: POST
Path: /s3-sign
Type: HttpApi
Reproduction Steps
Added the code to replicate the same above.
Possible Solution
As a workaround, using raw overrides as below is resolving the concern but this should not be an ideal case.
Describe the bug
For sam.CfnFunction in the events section, 'api_id' is not getting recognised.
This is the below code:
As per the code, in the events section of the CfnFunction, the value for 'api_id' is referenced from the 'CfnHttpApi' defined above so this should resolve as per the cfn return value.
Expected Behavior
The event section should be resolving as below:
Current Behavior
However, it is resolving as below where it is observed that it is completely omitting the 'ApiId' property.
Reproduction Steps
Added the code to replicate the same above.
Possible Solution
As a workaround, using raw overrides as below is resolving the concern but this should not be an ideal case.
Additional Information/Context
No response
CDK CLI Version
2.96.2 and 2.103.0
Framework Version
No response
Node.js Version
v18.17.1
OS
macOS Ventura 13.5.2
Language
Python
Language Version
No response
Other information
No response