-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EventBridgeRule
breaks with Fn::Sub
: "Name not defined for resource of type EventBridgeRule"
#3260
Comments
EventBridgeRule
breaks with Fn::Sub
: "Name not defined for resource of type EventBridgeRule"
It appears unfortunately that I made no mistake and this is yet again SAM getting horribly confused when I try to do anything interesting—that is, anything in real life that doesn't appear as an example in a tutorial. I commented out the MyFunction:
Type: AWS::Lambda::Function
Properties:
…
Events:
Trigger:
Type: EventBridgeRule
Properties:
#TODO bring back when https://github.com/aws/serverless-application-model/issues/3260 is fixed: Name: !Sub "${AWS::StackName}-my-rule"
EventBusName: !Ref MyEventBus
Pattern:
detail-type: ["FooBar"]
Target:
Id: !Ref MyFUnction (Funny, my SAM template is becoming full such lines: "bring back when bug XXX is fixed".) And that allowed it to deploy. Unfortunately, it looks like SAM won't let me use a simple People, seriously. I mean this is every day. I haven't even tried to do anything complicated with SAM yet! I want to be a team player. Why don't you hire me and let me help you fix all these problems? I'm serious. Completely serious. Bring me on board. I'll work with you to make it work. And not just work, but make it solid. |
Thanks for raising the issue. This seems to be SAM Transform issue. Transferring. |
It seems like you wanted to use |
That was a typo. I have now corrected the bug description.
I suppose you haven't tested it. |
Hi @garretwilson thanks for reporting this issue. Turns out it was an error in our docs. The property is called I tested with the following template and it deployed fine.
We'll be updating the docs asap. Let us know if this fixes your error or if it persists. Thanks again. |
Doc change merged, should be rolling out soon. Closing this ticket for now, please re-open if needed. |
I had a very straightforward CloudFormation template, containing a Lambda that listened to EventBridge events with the detail type "FooBar". It looked like this
"Use SAM," they said. "SAM will make things easier." So I converted it to SAM. I put the magic stuff at the top:
Then I "simplified" the function definition (except for the
CodeUri
stuff, which I had to turn into a kludge to work around #3264):We are truly far from rocket science at this point. But SAM doesn't like that. I do a
sam deploy
and get this:Please tell me this is not (again!) what I think it is. Please tell me I am making some mistake and I have screwed up the conversion. Please tell me I'm being slow this morning and have made a typo or something. Please tell me this is not SAM again making things "simple" for me and wasting my day to file bugs.
Please, I want the mistake to be mine. I would welcome it.
The text was updated successfully, but these errors were encountered: