(integ-tests-alpha): cannot assert awsApiCall
with @aws-sdk/client-api-gateway:TestInvokeMethodCommand
#32635
Labels
awsApiCall
with @aws-sdk/client-api-gateway:TestInvokeMethodCommand
#32635
Describe the bug
When defining an
awsApiCall
assertion on an API gateway resource using theTestInvokeMethodCommand
action, the assertion fails with a permissions error.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Expected the call to succeed
Current Behavior
Getting a permissions error. See how its looking for the
apigateway:POST
action to be present in the policy....is not authorized to perform: apigateway:POST on resource...
Reproduction Steps
Possible Solution
In this case, the policy should be derived from the
httpMethod
parameter, and not the API command. Its not great because it completely diverges from the regular code path and introduces very special handling.Additional Information/Context
No response
CDK CLI Version
2.173.2 (build f8e6207)
Framework Version
2.173.1
Node.js Version
v18.20.4
OS
Mac
Language
TypeScript
Language Version
5.7.2
Other information
No response
The text was updated successfully, but these errors were encountered: