I get this flycheck error pointing to the runtime=_lambda.. variable:
Argument of type "(cls: Runtime) -> Runtime" cannot be assigned to parameter "runtime" of type "Runtime" in function "__init__" Type "(cls: Runtime) -> Runtime" cannot be assigned to type "Runtime"
# create lambda function
# executed as root
function = _lambda.Function(self,
"lambda_function",
runtime=_lambda.Runtime.PYTHON_3_7,
handler="lambda_handler.main",
code=_lambda.Code.from_asset("./lambda"),
environment={
'EC2_INSTANCE_ID':
instance.instance_id,
'S3_OUTPUT':
output_s3.s3_url_for_object(),
'S3_INPUT':
input_s3.s3_url_for_object()
})
It's a rather cosmetic IDE issue, the code itself works