Unable to set a lambda's role from CDK Question: I have the following code: EventbridgeToLambda( self, "Some", lambda_function_props=lambda_.FunctionProps( code=lambda_.InlineCode(lambda_code), handler="index.lambda_handler", runtime=lambda_.Runtime.PYTHON_3_8, # Set timeout to something other than 3 seconds timeout=Duration.seconds(45), layers=[lambdaLayer], environment={ "S3_BUCKET": "dev_environment_bucket", }, role=iam.Role.from_role_arn( self, id="x", role_arn="arn:aws:iam::numbers:path/rolename", mutable=True ), vpc=ec2.Vpc.from_lookup(self, "VPC", vpc_id="vpc-0hex"), allow_public_subnet=True, vpc_subnets=ec2.SubnetSelection( subnets=[ec2.Subnet.from_subnet_id(self, "Subnet", "subnet-0hex")] ), security_groups=[ec2.SecurityGroup.from_lookup_by_id(self, "SG", "sg-0hex")], ), …
Total answers: 1