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

Tag separate deployments to track all resource costs in individual deployments under same account #602

Open
nkay28 opened this issue Nov 7, 2024 · 2 comments

Comments

@nkay28
Copy link

nkay28 commented Nov 7, 2024

Hi,
Is there a current functionality to tag separate deployments of this tool/POC in order to track all/each resource costs associated with one deployment individually, under the same account?
I tried to use the CloudFormation default tagging options by activating them in my account. Not sure how to connect them to my existing deployment. I think I have to add it in the Cloud Formation template and make a new deployment with that change, as per the AWS best practices? Could this be a feature addition to the base repo? A tagging question under the step 5, 'npm run config' step?
One work around would be to have different deployments in different regions and filter the cost with that, from what I understand? Though not really scalable.

Thank you

@charles-marion
Copy link
Collaborator

Hi @nkay28 ,

CDK makes it easy to add Tags in bulk, see here: https://docs.aws.amazon.com/cdk/v2/guide/tagging.html#tagging-use
If the scope is the stack for example it should add the tag to itself and all its children.

You could try to add here (I have not tested this change)
https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/lib/aws-genai-llm-chatbot-stack.ts#L35

Tags.of(this).add('Project', props.config.prefix);

Note some resources would not be covered here. For example Bedrock on demand usage is not a Cloudformation resource and would not have a tag.

A possible option to isolate these different instances is to use multiple accounts:
https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/organizing-your-aws-environment.html

@nkay28
Copy link
Author

nkay28 commented Nov 19, 2024

I was able to separate out the CF deployment in billing using the prefix option at deployment.
Thanks for the suggestions. I will try them out as I get into further weeds.
For my use cases, I would want to keep them in the same account, for now at least.

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

No branches or pull requests

2 participants