Skip to content
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

Riff-raff yaml generation, can't have multiple lambdas with same region/stack/app? #2566

Open
Jakeii opened this issue Jan 23, 2025 · 3 comments

Comments

@Jakeii
Copy link
Member

Jakeii commented Jan 23, 2025

If multiple lambdas are defined with these values the same, only one deployment entry will be created in the riff-raff.yaml as subsequent ones will be overwritten.

Would it be better to use the function name instead of app for the keys here?

Or is it incorrect to share app between lambdas?

@akash1810
Copy link
Member

akash1810 commented Jan 24, 2025

Or is it incorrect to share app between lambdas?

👍🏽

The combined value of App and Stack identify a unique resource. More specifically the combination of AwsAccount, Region, Stack, App and Stage represent a globally unique resource.

This is further reinforced by Riff-Raff's lookupByTags property.

How are you naming your functions? If you named them <stack>-<app>-<stage> would this help your use-case?

The Stack, Stage and App tags are described in a little more detail in https://github.com/guardian/recommendations/blob/main/AWS.md too.

@adamnfish
Copy link

adamnfish commented Jan 24, 2025

As I understand it, we expect the trio of Stack / App / Stage to uniquely identify a running service. This is important for reporting, monitoring, cost analysis and so on. I think the behaviour you're seeing here reflects this assumption, but perhaps there's more we could do to flag this situation as an explicitly broken stack at compile time!

The Stack tag is used to group applications together into a single service so here I'd expect a different App tag for each lambda with a shared Stack tag that groups them together. This is without seeing what you're working on though, let us know if that doesn't make sense in your case?

@akash1810
Copy link
Member

perhaps there's more we could do to flag this situation as an explicitly broken stack at compile time!

💯 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants