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

AWS::Events::EventBusPolicy - Policy shown in CloudFormation but missing in the EventBus resource

Open
#2,074 0 comments 0 reactions 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::Events::EventBusPolicy

### Resource Name

_No response_

### Issue Description

Hi, I witnessed an odd behavior when deploying an EventBus with an attached policy.

I cannot reproduce the issue, but I'm reporting it because it happened to our production system, and I have no explanation.

The issue is:

* We deployed an EventBus with a valid policy attached to it via AWS CDK, and the policy existed and was shown in the AWS Console. We used this policy for cross-account access, so I know it has worked up to a certain point in the past.
* After an unknown time (days/weeks), the policy "disappeared," meaning the AWS Console showed no policy attached to the resource. However, the policy resource was still listed in the CloudFormation stack.

Running a CDK diff showed no changes to the `AWS::Events::EventBusPolicy` object, and when running a drift check, no changes were reported. Also, no policy was listed when fetching the EventBus object via the describe API call.

All that was returned in the description API call was:

```json
{
"Name": "my--awseventsbus",
"Arn": "arn:aws:events:us-east-2:xxxxxxxxx:event-bus/my--awseventsbus"
}
```

When I then updated the policy and altered a section of it, the diff correctly reported the change. On deployment, the policy was updated and shown in the AWS Console and the describe API call.

### Expected Behavior

We expected the policy not to disappear.

### Observed Behavior

The policy disappeared while still being listed in the CloudFormation stack.

### Test Cases

I'm unable to reproduce the issue.

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the AWS::Events::EventBusPolicy behavior alongside the AWS CDK deployment, CloudFormation stack and drift results, and the EventBus describe API response described here. The work is only complete when the disappearance can be reproduced or explained and the policy remains attached and visible without requiring an unrelated policy update.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.