aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[AWS::Lambda::EventInvokeConfig] - [BUG] - False-positive drift on `FunctionName` as ARN

Open
#2,571 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::Lambda::EventInvokeConfig

### Resource Name

_No response_

### Issue Description

Drift detection reports a false-positive drift on the `FunctionName` property of `AWS::Lambda::EventInvokeConfig` when using the `AWS::Lambda::Function` ARN:

```yaml
EventInvokeConfig:
Type: AWS::Lambda::EventInvokeConfig
Properties:
FunctionName: !GetAtt LambdaFunction.Arn
MaximumRetryAttempts: 0
Qualifier: $LATEST
```

Property | Change | Expected value | Current value
-- | -- | -- | --
FunctionName | NOT_EQUAL | arn:aws:lambda:\:\:function:\ | \

### Expected Behavior

The resource stays IN_SYNC since https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-lambda-eventinvokeconfig.html `FunctionName` **allows** ARNs:

```
FunctionName
The name of the Lambda function.
Minimum: 1
Maximum: 64
Pattern: ([a-zA-Z0-9-_]+)
Required: Yes
Type: String
Pattern: ^(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]+(-[a-z]+)+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST(\.PUBLISHED)?|[a-zA-Z0-9-_]+))?$
Update requires: Replacement
```

### Observed Behavior

Drift Detection for AWS::Lambda::EventInvokeConfig doesn't work properly

### Test Cases

```yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Test

Resources:
LambdaFunction:
Type: AWS::Lambda::Function
Properties:
Role: !GetAtt LambdaRole.Arn
Handler: index.lambda_handler
Runtime: python3.14
Code:
ZipFile: |
def lambda_handler(event, context):
print("Hello World")

EventInvokeConfig:
Type: AWS::Lambda::EventInvokeConfig
Properties:
FunctionName: !GetAtt LambdaFunction.Arn
MaximumRetryAttempts: 0
Qualifier: $LATEST
```

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the YAML test case in the issue and the linked AWS::Lambda::EventInvokeConfig documentation, then inspect how this resource's FunctionName is represented during drift detection. Reproduce the reported ARN-versus-name comparison and confirm that the resource remains IN_SYNC when an ARN is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.