cron-inference/app.py [20:34]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            code=lambda_.InlineCode(handler_code),
            handler="index.lambda_handler",
            timeout=core.Duration.seconds(300),
            runtime=lambda_.Runtime.PYTHON_3_7,
            environment={"endpoint_name":endpoint_name, # CHANGE TO YOUR ENDPOINT NAME!!
                        "content_type":"text/csv",
                        "input_data":input_data,
                        "bucket":bucket,
                        "key":key}
        )

        # Add sagemaker role
        lambdaFn.add_to_role_policy(aws_iam.PolicyStatement(
            actions = ['sagemaker:InvokeEndpoint',],
            resources = ['arn:aws:sagemaker:{}:{}:endpoint/{}'.format(my_region,my_acc_id,endpoint_name),]))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



kinesis-inference/app.py [32:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            code=lambda_.InlineCode(handler_code),
            handler="index.lambda_handler",
            timeout=core.Duration.seconds(300),
            runtime=lambda_.Runtime.PYTHON_3_7,
            environment={"endpoint_name":endpoint_name, # CHANGE TO YOUR ENDPOINT NAME!!
                        "content_type":"text/csv",
                        "input_data":input_data,
                        "bucket":bucket,
                        "key":key}
        )

        lambdaFn.add_to_role_policy(aws_iam.PolicyStatement(
            actions = ['sagemaker:InvokeEndpoint',],
            resources = ['arn:aws:sagemaker:{}:{}:endpoint/{}'.format(my_region,my_acc_id,endpoint_name),]))
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



