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

Use JSONString for EventPattern property of AWS::Events::Archive resource

Open
#1,414 0 comments 0 reactions 0 assignees View on GitHub
enhancement
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::Archive

### Resource name

_No response_

### Description

Request to be able to use a JSON string value for the 'EventPattern' property of the AWS::Events::Archive resource[1].

Currently this property only accepts JSON objects, however please note that resource type AWS::Events::Rule also contains the 'EventPattern' property[2].
The 'EventPattern' property for rules can support the usage of JSON string values.

See sample:
```
{
"Resources": {
"EventRule": {
"Type": "AWS::Events::Rule",
"Properties": {
"Description": "EventRule",
"EventPattern": "{\"source\":[\"aws.ec2\"]}", //This creates the rule successfully
"State": "ENABLED",
}
},
"SampleArchive": {
"DependsOn": "EventRule",
"Type" : "AWS::Events::Archive",
"Properties" : {
"ArchiveName" : "MyArchive",
"Description" : "Archive for all EC2 events",
"EventPattern" : "{\"source\":[\"aws.ec2\"]}", //This will throw a validation error
"RetentionDays" : "10",
"SourceArn" : "arn:aws:events:us-east-1:123456789012:event-bus/default"
}
}
}
}
```

Request to implement functionality such that JSON string can also be used for the 'EventPattern' property of the AWS::Events::Archive resource.

### Other Details

References
=============
[1] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-archive.html#cfn-events-archive-eventpattern
[2] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-events-rule.html#cfn-events-rule-eventpattern

Contributor guide

Open the contributing guide

Research direction

Start with the linked AWS::Events::Archive and AWS::Events::Rule documentation, then compare how their EventPattern properties validate object and JSON string values. The repository provides no source files, tests, or entry points; done means confirming that AWS::Events::Archive accepts the JSON string form described in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.