Subscription Filter not added to cloudformation stack
See original GitHub issue❓ Subscription Filter Object not create relative CloudFormation resources
The Question
Using SubscriptionFilter object, the relative resource are not created in cloudformation stack. Relative error are not showed. Synth and deploy command doesn’t return any error.
–>
Environment
- **CDK CLI Version:1.13.1
- **Module Version: aws-logs
- **OS: MacOSX
- **Language: Javascipt
Other information
Here is the code:
let cloudWatchGroup = cl_logs.LogGroup.fromLogGroupArn(this, 'lambda-log-group', res);
let filterPattern = cl_logs.FilterPattern.allEvents();
const subscriptionFilter = new cl_logs.SubscriptionFilter(this, 'elastic-search-subscription',{ destination: lambdaDestination, filterPattern: filterPattern, logGroup: cloudWatchGroup, });
`
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
AWS::Logs::SubscriptionFilter - AWS CloudFormation
Subscription filters allow you to subscribe to a real-time stream of log events and have them delivered to a specific destination.
Read more >Cannot set up a SubscriptionFilter with cloud formation
I have an issue regarding setting up a subscription filter with cloudformation. This is how my CF file looks like
Read more >AWS::Logs::SubscriptionFilter - Amazon CloudFormation
Subscription filters allow you to subscribe to a real-time stream of log events and have them delivered to a specific destination.
Read more >Datadog Forwarder
Find the datadog-forwarder (if you didn't rename it) CloudFormation stack. ... Manually migrate a few triggers (CloudWatch log group subscription filter and ...
Read more >Amazon CloudWatch Logs
Collect CloudWatch Logs using a CloudFormation Template ... SumoCWLogGroup, A log group that has a subscription filter ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Alright, I’ve found the issue. The template is being initialized with outdated
aws-cdk
and@aws-cdk/core
packages if yourcdk
CLI is outdated. Upgrading them solves the issue.I’m used to using local packages with
npx
, which is why mine is so old. Yours is probably more recent, but doesn’t have the recently merged #2821, which removed_references
fromConstructNode
.To upgrade your global CDK CLI version:
Not sure what we should do about this issue.
Hey @fedeBollo,
Trying to read your reproduction stack was a little hard, so here is what I came up with, tell me if I’m too far off your use-case:
When I run
cdk synth
, I get the following:Is this not what you are getting?
EDIT: I’ve edited my example to use a valid log group ARN, without it the
logGroupName
property wasn’t set.