FunctionAttributes

class aws_cdk.aws_lambda.FunctionAttributes(*, function_arn, role=None, security_group=None, security_group_id=None)

Bases: object

__init__(*, function_arn, role=None, security_group=None, security_group_id=None)

Represents a Lambda function defined outside of this stack.

Parameters
  • function_arn (str) – The ARN of the Lambda function. Format: arn::lambda:::function:

  • role (Optional[IRole]) – The IAM execution role associated with this function. If the role is not specified, any role-related operations will no-op.

  • security_group (Optional[ISecurityGroup]) – The security group of this Lambda, if in a VPC. This needs to be given in order to support allowing connections to this Lambda.

  • security_group_id (Optional[str]) – Id of the security group of this Lambda, if in a VPC. This needs to be given in order to support allowing connections to this Lambda.

Attributes

function_arn

The ARN of the Lambda function.

Format: arn::lambda:::function:

Return type

str

role

The IAM execution role associated with this function.

If the role is not specified, any role-related operations will no-op.

Return type

Optional[IRole]

security_group

The security group of this Lambda, if in a VPC.

This needs to be given in order to support allowing connections to this Lambda.

Return type

Optional[ISecurityGroup]

security_group_id

Id of the security group of this Lambda, if in a VPC.

This needs to be given in order to support allowing connections to this Lambda.

deprecated :deprecated: use securityGroup instead

stability :stability: deprecated

Return type

Optional[str]