{"id":301546,"date":"2021-07-16T13:00:00","date_gmt":"2021-07-16T10:00:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/object-tagging-cloudsavvy-it\/"},"modified":"2021-07-16T13:00:00","modified_gmt":"2021-07-16T10:00:00","slug":"object-tagging-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/object-tagging-cloudsavvy-it\/","title":{"rendered":"#Object Tagging \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a40727638a07\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a40727638a07\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/object-tagging-cloudsavvy-it\/#What_Is_Tagging_Used_for\" >What Is Tagging Used for?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/object-tagging-cloudsavvy-it\/#How_to_Set_and_Search_for_Tags\" >How to Set and Search for Tags<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/object-tagging-cloudsavvy-it\/#Enforcing_a_Tag_Policy\" >Enforcing a Tag Policy<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#Object Tagging \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage alignnone size-full wp-image-5269\" srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"AWS Logo\" width=\"700\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Tags are pretty simple\u2014they store a single key-value pair, and are used as metadata for AWS resources to help you stay organized. We\u2019ll show you how to use them, and how to set effective tagging policies for your organization.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Is_Tagging_Used_for\"><\/span>What Is Tagging Used for?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In a shared account with many AWS resources, it can be hard to sort through everything. You can physically separate environments by creating new AWS accounts, and link them under the same billing using AWS Organizations, but that\u2019s mostly meant for dev, testing, staging, and prod environments, and as such, is limited to four accounts.<\/p>\n<p>Tags present a quick and easy solution to most of these organizational problem. For example, say your organization is handling projects for many clients, all under the same AWS account. You might be running a couple EC2 servers per project, a few S3 buckets, etc. You can create a \u201cproject\u201d tag, and assign it to all of these resources based on the project name. Now, instead of your EC2 Management Console being crowded with many instances, you can filter quite easily based on the project tag:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"imgchk9 alignnone wp-image-3843 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/4236c681.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Filter based on the project tag.\" width=\"582\" height=\"220\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>While separating based on project is the simplest problem tagging fixes, there are many <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/aws.amazon.com\/answers\/account-management\/aws-tagging-strategies\/?tag=reviewgeek-20\">different tagging strategies you can employ.<\/a>\u00a0You can use them to distinguish between dev, testing, and staging resources (though you should likely use AWS Organizations to physically separate prod, for security reasons), filter based on version, or mark resources as needing special compliance or\u00a0confidentiality levels.<\/p>\n<p>It\u2019s really up to you what you use them for. Once you have a clear tagging policy in mind, you can set it in place using the AWS Organizations console. Resources that don\u2019t comply with the tagging policy will be flagged by the tag editor, and can be easily fixed.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Set_and_Search_for_Tags\"><\/span>How to Set and Search for Tags<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Going forward, you should be setting tags whenever resources are created (setting a tagging policy helps with that), but retroactively tagging resources is pretty easy. From the AWS Management Console, select \u201cResource Groups\u201d in the top menu bar, and open up the \u201cTag Editor.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-3829 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/628dfac6.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"open tag editor\" width=\"563\" height=\"201\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You can search for resources by region and type, or leave them blank for a list of everything. You cam also filter by existing tags.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-3830 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/af91fb9d.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"filter resources\" width=\"700\" height=\"328\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Once you select something to tag, you can click \u201cManage Tags Of Selected Resources\u201d to edit their tags.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" alignnone wp-image-3832 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/127d27e4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"select and edit tags\" width=\"700\" height=\"236\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Click \u201cAdd Tag\u201d to create a new tag, and <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>ly it to the selected resources. Select \u201cReview And Apply Changes,\u201d and the new tags should be set.<\/p>\n<p>You can also search by tags from the AWS CLI, using <code>get-resources<\/code>:<\/p>\n<pre>aws resourcegroupstaggingapi get-resources &#13;\n--tag-filters Key=Environment,Values=Production &#13;\n--tags-per-page 100<\/pre>\n<p>Most services will also let you modify resource tags from the CLI, using <code>add-tags-to-resource<\/code>\u00a0and the ARN:<\/p>\n<pre>aws rds add-tags-to-resource &#13;\n    --resource-name arn:aws:rds:us-east-1:123456789012:db:database-mysql &#13;\n    --tags \"[{\"Key\": \"Name\",\"Value\": \"MyDatabase\"},{\"Key\": \"Environment\",\"Value\": \"test\"}]\"<\/pre>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Enforcing_a_Tag_Policy\"><\/span>Enforcing a Tag Policy<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To prevent you from having to manually tag resources to stay organized, you can enforce an account-wide tagging policy that will apply to all new resources created in your account. This won\u2019t prevent users from creating resources without proper tags, so you\u2019ll still have to educate your employees on your tagging policy, but it will let you view which resources are non-compliant, and fix the problem quickly.<\/p>\n<p>To do so, you\u2019ll have to turn the feature on from the AWS Organizations console. Under \u201cOrganize Accounts,\u201d click on \u201cRoot,\u201d and enable \u201cTag Policies\u201d in the sidebar. You can actually set different tagging policies for different accounts, if you\u2019re separating out your dev and prod environments.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3835\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/f372a8df.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"organizations console\" width=\"700\" height=\"439\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Under the \u201cPolicies\u201d tab, you should now be able to click on \u201cTag Policies,\u201d and create a new policy.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3836\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/3ba76f70.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"add tagging policy\" width=\"700\" height=\"315\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Give it a name and description, and specify the tag key that you want to enforce. It\u2019s probably best to check \u201cUse the capitalization specified\u201d to prevent any errors. You can also set a list of allowed values for the tag.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3837\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/dd63227c.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"new tag policy\" width=\"700\" height=\"306\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>The last option, \u201cPrevent non-compliant operations for this tag,\u201d doesn\u2019t prevent the creation of new resources without the tag, but will prevent non-compliant tag updates.<\/p>\n<p>Click \u201cCreate.\u201d You\u2019ll have to attach\u00a0the policy before it will take effect. Click on your root account (or whatever you wish to apply it to), select \u201cTag Policies\u201d in the sidebar, and attach the newly created policy.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3838\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/a073618e.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"attach tag policy\" width=\"554\" height=\"269\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You\u2019ll also need to give the Tag Policies Console access to your organizational policies. Click on \u201cSettings,\u201d and scroll down to find \u201cTag Policies.\u201d Enable this.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3839 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/e0013614.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"enable tag policies\" width=\"700\" height=\"168\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Now, you should be able to view non-compliant resources from the tag editor, under Tag Policies &gt; This AWS Account.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3840\" src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/02\/62b55e24.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"tag compliance view\" width=\"700\" height=\"329\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Unfortunately, there\u2019s not an easy way to update the tags from this screen\u2014you\u2019ll have to search for them in the Tag Editor tab, or click on the resources and manually update the tags from that resource\u2019s management console.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/3828\/the-best-aws-feature-you-should-be-using-object-tagging\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#Object Tagging \u2013 CloudSavvy IT&#8221; Tags are pretty simple\u2014they store a single key-value pair, and are used as metadata for AWS resources to help you stay organized. We\u2019ll show you how to use them, and how to set effective tagging policies for your organization. What Is Tagging Used for? In a shared account with many&#8230;<\/p>\n","protected":false},"author":1,"featured_media":301547,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-301546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/301546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=301546"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/301546\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/301547"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=301546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=301546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=301546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}