Question: In aws\_cdk there are three different classes for creating lambdas:
`aws_cdk.aws_lambda.CfnFunction`  

`aws_cdk.aws_lambda.Function`  

`aws_cdk.aws_sam.CfnFunction`  

What are the differences and reasons for choosing one over the other?

Answer: 
For every AWS Resource that is supported by CloudFormation there are always two classes. The Cfn version maps directly to what you would normally do in YAML. The other version, in this case aws\_lambda.Function, is a higher level class that already sets useful default values to get up and running faster. e.g. memorySize and timeout.

I'm not completely sure about the aws\_sam thing, but I wouldn't recommend using it as the libary is not stable and you can achieve the same thing without this libary.

e.g. <https://github.com/aws-samples/aws-cdk-examples/tree/master/typescript/api-cors-lambda-crud-dynamodb>
Our documentation deals with this subject: <https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib>