`stacker.util.ensure_s3_bucket` function does not tag S3 buckets created
See original GitHub issueCurrently S3 buckets created by stacker do not have any tags, even if that bucket is created on a stacker build run with a stacker config yaml defining tags. This is because the ensure_s3_bucket
function imported by base and aws_lambda do not submit tags to the function.
We should probably tag the S3 buckets. My concern is not the buckets storing the json templates, but the buckets created for uploads of serverless lambda functions as they could get big and actually have somewhat of an effect on a budget.
So I propose the following…
- We modify the function to tag S3 buckets based on the
tags
top level keyword - We create a new argument in the
aws_lambda.upload_lambda_functions
function to allow an override, in case an end-user wants to specify a different set of tags for the S3 bucket created by aws_lambda.py:493
I think this should cover all bases as to cost tags that may be required by businesses using stacker.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Using cost allocation S3 bucket tags - AWS Documentation
A cost allocation tag is a key-value pair that you associate with an S3 bucket. After you activate cost allocation tags, AWS uses...
Read more >Need help to deny S3 bucket creation without specific Tags
Therefore, it is not possible to restrict the CreateBucket command based on tags being specified with the command. Share.
Read more >Ensure S3 bucket has lock configuration enabled by default
Ensure that your Amazon S3 buckets have Object Lock feature enabled in order to prevent the objects they store from being deleted. Used...
Read more >How to Create S3 Buckets in AWS with CloudFormation
This includes — but is not limited to — enabling encryption and bucket access logging. The AWS::S3::Bucket resource is used to build an...
Read more >'AWS S3' Client Package - R Project
Can be empty (0 rows, 0 columns) if there are no buckets, otherwise ... Some utility functions for working with S3 objects and...
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
That sounds fine to me - I don’t think anything would be broken by adding tags. The bigger question is what it’s going to do for performance - I imagine you’d either update the tags every time, or you’d do a
get_bucket_tagging
call to see if anything should change first. My guess is that updating the tags is a single call that is probably just about as fast as a call to get_bucket_tagging, so calling each time makes sense.Thanks for offering to handle this @GarisonLotus, all for you knocking it out.
Definitely a different issue - just wanted to make sure we don’t make the same “mistake” here 😃