<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nuwan Premaratne on Medium]]></title>
        <description><![CDATA[Stories by Nuwan Premaratne on Medium]]></description>
        <link>https://medium.com/@nuwan-premaratne?source=rss-112ddec7ff46------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4e3gn5sHD7398X2P3ybYtQ.jpeg</url>
            <title>Stories by Nuwan Premaratne on Medium</title>
            <link>https://medium.com/@nuwan-premaratne?source=rss-112ddec7ff46------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:05:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nuwan-premaratne/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI dependent vs AI assisted, walking in the fine line]]></title>
            <link>https://nuwan-premaratne.medium.com/ai-dependent-vs-ai-assisted-walking-in-the-fine-line-ebdabe1341b0?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebdabe1341b0</guid>
            <category><![CDATA[company-culture]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[responsible-ai-usage]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 07:18:28 GMT</pubDate>
            <atom:updated>2026-10-29T08:53:24.474Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding advantages and risk on our personal life as well as professional life</p><p>AI is a trend rather than a tool now. Everyone is trying to hop on to the bandwagon of AI with even the minute idea that they think of and integrating the AI onto it. This has even entered our personal life with concepts like, AI assistants, AIOS, Second Brain etc. Yes, some of these technologies actually help us, but all depends on how we actually use them regardless in our personal life or in our professional life.</p><h3>Professional Life</h3><p>Lets talk about professional life first as this is the place where most of us will be using AI, willingly or unwillingly. As AI becomes a trend, the companies starts subscribing to AI providers and assign individual subscriptions to all employees and asking them to speed up their work and “Be Efficient” with AI. Most of the time this happens without even providing a proper training to the employee. Then they start doing even the simplest thing using AI, for example converting a word document to PDF. What happens next is the AI cost increases due to this. AI providing companies have a very good financial system for the to make money and get you hooked on to their system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FDFpbFJBRP4rZqUD" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Obviously there are places you will see a better speed of doing some tasks using AI rather than by an human. Data analysis, writing a program, AI will do this quicker than a human as machines can do complex logic faster than a normal human mind. With this observation by the companies and the AI cost, what companies are doing now is cutting of their labor amount in other words employees and tunneling that budget to AI and buying more tokens. This does not stop here, goes another step ahead and start binding their core workflows and Systems with a AI. This creates a dependency on the AI, as the companies fire the actual people who did the work for years and replace them with an AI. So when the AI Companies increase the costs, the company has to follow and adjust their budget to accommodate it as they fear of going back to earlier method. This fear can be due to few reasons, fear of being behind, fear of thinking they might be seen as lack of competitive among other companies or may be fear of seen as a AI failed company. So they become AI Dependent not AI Assisted.</p><p>Next issue I have seen is companies forcing every employee to do everything. Lets take an IT company for an example. Developers should code, do infrastructure deployments, Data analytics and DevOps/Cloud Engineers should deploy infrastructure and actual application coding etc. This is just one small example. Even though they do not have base foundations, the companies are expecting this “everybody can blindly do everything nature”, which is actually bad especially if you are serving production applications. Yes, with AI now you can create your own app, this is good for personal experiments and prototyping but if you are using the same method to blindly create apps and push to Production without a proper evaluation or review, the future will not be good. One of the negative effect of this is developers who actually develop the code now no longer knows what is in the application. What the logic used, how it works. When a question like “What is the logic behind this functionality? Or where can I find the logic to the application feature?” asked from a developer nowadays, one of the most frequent answer is “Let me ask the Claude and tell you” or “You can ask Claude”. This is the Sad reality of our application development has come to. Recently I listened to a part of the podcast where they say in two or three years the modern developers will see Linux OS as a wonder of the world as how they wrote such an OS without having AI. Now I feel like this can actually be a true story in the future.</p><p>In my perspective, Companies should train people on how to use AI first, where to actually use it, how to effectively use it. AI should not be a replacement of Human, it should be an enhancement. Once the employee is educated on how to use the AI properly, he/she will be able to use AI effectively to manage the tedious tasks without handing over all tasks blindly. Human should retain the ability and think plan and design and AI should just be the workhorse/assistant on that. By this method, AI cost will be able to be managed as people will use AI effectively and where needed without blindly applying to everywhere even when its not needed. We do not need to make AI Provider companies rich right 😃. Then Companies can actually integrate AI where it actually needs without blindly replacing people with AI. Yes, there is a benefit of AI, but you should understand it properly on how and where should be integrated or not.</p><blockquote>AI is the Car and I am the Driver. I use my car to go where I want, the way I want. I don’t want my car to take me where it want by how it want.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NldCpws71aSknUaA" /><figcaption>Photo by <a href="https://unsplash.com/@oscrse?utm_source=medium&amp;utm_medium=referral">Oscar Nilsson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Personal Life</h3><p>In the personal life also now lots of people try to use AI for all the things in their life. Task Management, Finance Management, Investments, thinking ideas and personal life management are some of the tasks that people are involving AI with. The concepts/practices which I mentioned at the start in this article AIOS, Second Brain are some of the ways that involves with thinking and personal life management. There is a high risk on involving AI with your personal life. By default most of the AI subscriptions that we personally subscribe to, learn from our data for the model’s improvements. If you read their fine print on privacy and usage we can see it. Out of those personal subscriptions, some allows to opt-out your data from training but some do not. Google’s AI Paid subscription is one of these which do not allow you to opt-out even though you pay them. Only Enterprise subscriptions of Google you can opt-out your data from training of the model. So be mindful of how you configure the AI service you use and how you use it. Take sometime to understand before committing and go through the available settings and change them according to your preferences.</p><blockquote>Value Yourself and Privacy ….</blockquote><p>AIOS, Second Brain might help you to manage tasks but think and plan on how you use it and up to which level. If you take the driving seat and use these concepts to iron-out the fine details, yes that’s one of the good method. But if you without thinking just use those to do all the thinking, unfortunately unknowingly you might be loosing your thinking ability day by day. Our brain needs to work to be sharper and be good at something. Even a sharp iron nail, if kept unused will be rusted with time.</p><p>You can use AI to help you learn new skills as AI can be a good teacher as it can dumb down even very hard concepts to simple forms and you can chat and ask questions multiple times until you are clear on it. But use original sources and ground AI to those sources to get the accurate answers. Google’s NotebookLLM is one such good tool for learning. If you are using AI without grounding sources, make sure you check the sources AI used to give you the answers to. For personal life, lots of concerns and factors are on Security, but lets talk about them on another article.</p><p>This is my perspective on what is seen and from my experiences. Hope this article helped you to understand some realities that we are facing and how to navigating them.</p><p>At last, there is a famous quote I saw by Jerry Seinfeld in one of the Famous Family shows in YouTube “<a href="https://youtu.be/t0IJOxBX0BI?t=352">The Tonight Show Starring Jimmy Fallon</a>” on AI which I would like to share;</p><blockquote>We are Smart enough to invent AI, Dumb enough to need it and so Stupid that we can’t figure out whether we did the right thing.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5jLP9C-6x5goeSdh" /><figcaption>Photo by <a href="https://unsplash.com/@boliviainteligente?utm_source=medium&amp;utm_medium=referral">BoliviaInteligente</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>References</h4><p><a href="https://youtu.be/t0IJOxBX0BI?t=352">https://youtu.be/t0IJOxBX0BI?t=352</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebdabe1341b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CloudWatch Simple Automated Log Archival Solution with Low to None Costs]]></title>
            <link>https://aws.plainenglish.io/aws-cloudwatch-simple-automated-log-archival-solution-with-low-to-none-costs-4af2005942cd?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/4af2005942cd</guid>
            <category><![CDATA[aws-cloudwatch]]></category>
            <category><![CDATA[cloudwatch-logs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[logs]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Fri, 23 Jan 2026 11:08:30 GMT</pubDate>
            <atom:updated>2026-01-29T20:04:53.489Z</atom:updated>
            <content:encoded><![CDATA[<p>Logs are crucial, Lets Reduce the Cost by approximately 94% ~ 96% monthly or annually</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*dVxZyy3kLGI_tfZzMnawBw.png" /></figure><p>For any Production Application/Workload, having Logs are a necessity for Audits and when troubleshooting any issues that arise. But there are few issues that rise with it.</p><ol><li>How to identify the what to log?</li><li>How to identify when to log?</li><li>How to store them?</li><li>What’s the retention for active monitoring and insights purposes</li><li>Should I archive all logs or some ?</li><li>What is the cost for this and can I do this with a low cost?</li></ol><p>This post answers the the last question by providing one of the methods, which I personally used. But, please note that this this solution might not be for every use-case.</p><p>Lets Check the first few questions mentioned above;</p><p><strong>Q1 &amp; Q2) How to Identify What to Log and When to Log?</strong></p><p>This mainly depends on the application and your organization security policies. If the application is mission critical and security/financial related the amount of logs that needs will be higher compared to a traditional application. Exactly what required to log depends on the how the application is written and what it does. Also, the standards/frameworks and the any Industry Certifications you may be trying to adhere also plays a role in deciding what to log and when to log. Also, good point to keep in mind is that this is not a one-time activity. You will have to revisit your logging strategy from time to time as your application and the operations mature along the development/life span of the application.</p><p><strong>Q3 &amp; Q4) How to store and Active monitoring and insights</strong></p><p>Apart from storing Logs for the Audit requirements, it&#39;s also equally used for active monitoring solutions and predicted insights generation for the application. There are metric filters, log based evaluation rules that are normally created to be alerted when something abnormal happens to the system so that the relevant personal get notified such as system engineers, developers etc.</p><p>For example, we create a Metric Filter to capture AWS Console Logins without MFA authentication and send an alert to our security team. This is can be done only if we choose to store AWS CloudTrail Logs to AWS CloudWatch Logs. Above mentioned is just one tool that can do it there can be multiple other ways/tools, but still fundamental requirement is that you’ll have to choose to store and analyse them to capture the information.</p><p>When an application slows down abnormally and tends to give different results/outcomes than what was expected, the developers will have to go through the logs to identify what happened, what are the errors and how to fix them. Because the logs will contain all the outputs, errors and exceptions occurred. This information you want depends on the first question we discussed above on what to log.</p><p>With the advance of the technologies/solutions, logs are also used to analyze the past behavior (history) of our systems and based on that to predict the future requirements/features or optimizations that the system might need to cater customer requirements and avoid any possible security incidents as well. For example, you might see that you application is getting more than expected traffic but the legitimate users count does not reflect such amount of traffic. In this kind of scenario, you’ll have to analyze your WAF logs to identify what is the traffic and create additional or fine-tune existing WAF rules to protect your system from any attacks.</p><p><strong>Q5 &amp; Q6) Should I archive all logs Vs Cost</strong></p><p>What to archive and retain vs cost is a ongoing rivalry that comes from very beginning and will leads to the future as well. You do not need to archive/retain all the logs for longer periods. Some application related logs used for monitoring may be required for only 3 weeks or may be even lesser. Security related logs on the other hand will be required to store even for 7 to 10 years. So to identify which logs you need to archive/retain for longer periods depends on policies of your organization, standards or frameworks that you choose to comply. Therefore, to identify the correct logs to archive you will have to get insights from all the relevant teams and then formulate a plan accordingly.</p><p>The Cost depends on where you store them and for the duration. That’s why correctly deciding on what exactly you need matters. For example, if you want to application logs to create metric alerts and additional analysis, you will have to store them in AWS CloudWatch Logs. But if you want to store Security related logs for a longer time as a policy or standard requirement, storing it in a CloudWatch Logs is not good as it gives you two types of costs; storage costs and the ingestion costs. Therefore, in such scenario it&#39;s better to store them in a AWS S3 Bucket with one of Glacier Class enabled depending on the exact retrieval requirements.</p><p>I hope now you have at least a basic understanding on how you can navigate above questions successfully. Lets dive in to our Solution.</p><h3>AWS Log Archival Solution</h3><p>This solution might not cater everyone’s requirements. AWS provide multiple methods of Archiving logs.</p><ol><li>Directly store in AWS S3 using agents</li><li>Pipe to AWS S3 or other storage solution from the AWS CloudWatch using Kinesis Firehose and CloudWatch Subscription filters</li><li>Pipe to S3 or other storage solution using Subscription filter and AWS Lambda</li><li>Export to S3 using AWS CloudWatch Log Exports</li></ol><p>The first 3 options which are very good reliable options for real-time continuous log piping to your required destination. But all of those 3 options involve costs that will grow based on amount of logs you needs to transfer and then the time. So for some people it is not required. Specially if you just want to store logs for archival requirement with very low cost and do not need be real-time. The 4th option which is exporting the Logs to AWS S3 Bucket is a onetime natively and you can only run one export task at a time. So by it alone will not help you to put the logs to S3 continuously and manually starting the export task ones the earlier one finishes introduces an additional manual overhead that we do not want to have as humans tends to become the most unreliable link when comes to continuous tasks.</p><p>Below is a automated solution using AWS CloudWatch Log Export for store your logs in AWS CloudWatch Logs to AWS S3 Bucket of your choice.</p><p>Let&#39;s explore more….</p><h4>Solution Details</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHkujch8NXc3yS_QaVmBow.jpeg" /><figcaption>AWS Solution Diagram</figcaption></figure><p>This solution exports AWS CloudWatch Log Groups with prefix /ec2/ to AWS S3 Bucket daily retaining the ability to identify the logs relevant to the particular date. It also has error handling built-in. Below are the AWS Service that this solution uses.</p><ul><li>AWS Step Functions</li><li>AWS CloudWatch Log Export</li><li>AWS CloudWatch Alarms and Dashboards</li><li>AWS Lambda</li><li>AWS EventBridge</li><li>AWS IAM Roles and Policies</li></ul><p>This solution uses invoking AWS API calls capability via AWS Step Functions together with JSONata expressions. This solution on logs specific selected log groups. If your no of log groups and daily log amount are higher you might need to optimize this by including AWS DynamoDB for tracking purposes.</p><h4>Consideration of the Solution</h4><ul><li><strong>Storage Cost and the Transfer Costs</strong></li></ul><p>As we discussed above, logs that needs to be retained cannot be kept in the AWS CloudWatch Logs. Need to transfer it to a viable solution as S3 and using free service option such as CloudWatch Log Exports do not incur any additional costs.</p><ul><li><strong>Smart/Intelligent Waiting and Built-in error handling</strong></li></ul><p>Since AWS CloudWatch Log Exports has limits, needed to successfully navigate through those limitations by utilizing wait times and Step Function step built-in retry and with logical error handling.</p><ul><li><strong>Zero Manual Intervention and Full Visibility</strong></li></ul><p>This solution do not need any human intervention for the complete flow unless there is an error that was not able to recover by the error handling built-in to the solution. The Alarms and the execution logs/status from the Step Function Dashboard will give the required full visibility on each iteration of the solution.</p><h4>Solution Flow Diagram</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*ivS5_bvK-5OPm5KNL7dJlA.png" /><figcaption>Flow Chart of the Solution</figcaption></figure><h4>Solution</h4><p>You can find the complete released solution on below GitHub Repository.</p><p><a href="https://github.com/nuwanpofficial/aws-cloudwatch_log-archive_solution">GitHub - nuwanpofficial/aws-cloudwatch_log-archive_solution: Very Low Cost Continuous AWS CloudWatch Archive Solution</a></p><p>The first version of the solution has been released in the above repository which you can access via this <a href="https://github.com/nuwanpofficial/aws-cloudwatch_log-archive_solution/releases/tag/v1">link</a>.</p><p>The entire description of the solution is explained in the readme file of the repository with all the required code and IAM policies.</p><h4>Cost Analysis</h4><p>Lets consider that you have 300 GB worth of logs per month. If you keep this logs in the AWS CloudWatch, the cost per month will be as follows.</p><ul><li>CloudWatch Cost Per Month: USD 150</li><li>CloudWatch Cost Per Year: USD 1800</li></ul><p>But with this solution, you can reduce it up to USD 7.68 per month and USD 92.16 annually. This is around 94% cost reduction. If you use AWS S3 lifecycle policies, you may increase the cost savings up to 98%. Since this solution uses AWS Services which have always free tier capacities, the cost for the solution can be as low as USD 3 per month. But, if we assume that you have used up all your free tiers by other AWS resources that you are running, then the cost for this solution will be approximately USD 14 per month considering above mentioned amount of logs.</p><p>I hope this solution will help anyone who is looking to archive their logs at very low costs inside AWS itself but want to have a minimum to no manual overhead. If you have any questions please feel free to raise them as issues in the repository itself, I will try my best to answer them as soon as possible.</p><p>As always share this with anyone whom you may think will benefit from it and Good Luck with your Cloud Journey !!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4af2005942cd" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/aws-cloudwatch-simple-automated-log-archival-solution-with-low-to-none-costs-4af2005942cd">AWS CloudWatch Simple Automated Log Archival Solution with Low to None Costs</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generating Microsoft WSUS Server Update Status Report for Easy reference using PowerShell]]></title>
            <link>https://medium.com/codex/generating-microsoft-wsus-server-update-status-report-for-easy-reference-using-powershell-2ee4939b1dce?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ee4939b1dce</guid>
            <category><![CDATA[windows-server]]></category>
            <category><![CDATA[wsusupdate]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[windowsupdate]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Sat, 19 Oct 2024 12:52:30 GMT</pubDate>
            <atom:updated>2024-10-19T12:52:30.952Z</atom:updated>
            <content:encoded><![CDATA[<p>The Following article will explain a MS PowerShell Code that can be used to generate a CSV Report to get Windows Update status by PC through WSUS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8rYWoHDFPnSNrR4U" /><figcaption>Photo by <a href="https://unsplash.com/@andymant?utm_source=medium&amp;utm_medium=referral">Andrew M</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>WSUS Server is the central server that organizations use to securely and consistently update their Windows Servers in the organization. You can configure what sort of update is required to be downloaded and how they should be installed by configuring the WSUS server configurations and rules.</p><p>Also, WSUS server has internal tools to create a report on the update status. Though the report is detailed, it’s sometimes too long and hard to handle if you need to implement automation or have a at a glance look for the details as the report is going to have lots of excel sheets. But as engineers or for management, they need at a glance view and a method to easily sort and filter through the data sometimes. This is one of the use cases which will benefit from a CSV report, which provides both the above requirements.</p><p>Regardless of the method which you have connected the client PC to the WSUS server, you can use the above PowerShell script to gather and generate a update status report.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/632ed384b3445c74fc590bdb20ab1f35/href">https://medium.com/media/632ed384b3445c74fc590bdb20ab1f35/href</a></iframe><h3>Script Explanation</h3><p>For this script to work, you need the Microsoft PowerShell Module called “<strong>UpdateServices</strong>” to be imported first. In this script, we’ll be using the commandlets from the module as well as the few iUpdate .Net API Interface methods. You can learn about the Module more in detail <a href="https://learn.microsoft.com/en-us/powershell/module/updateservices/?view=windowsserver2022-ps">here</a> and regarding the interface from <a href="https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms752700(v=vs.85)">here</a>.</p><ul><li>The start and end date variables are used to filter the date range where we need the updates for. You can change this according to the time range which you need this report to be generated. This script takes the approach from the PC side by taking the inventory of PCs connected to the WSUS server and then gathering the updates installed per PC.</li><li>In this script, it only takes two WSUS computer groups for the report named “test10” and “test_w10”. But you can any number of your own groups to here by using “or” operator as shown in line no 11. In the line, we get the Computer Group objects which are mentioned two groups and save them in another PowerShell object named “computertgs”.</li><li>Next, we get the individual computers which belongs to the groups mentioned and save them in another PowerShell Object variable called “computers”. This is shown in line no 13.</li><li>The section from line 19 to 44 handles the log file rotation of the script execution and the csv report generation backup part. It checks for existing log files and csv reports generated from the previous executions of the script and backup or delete them based on your choice.</li><li>The next section from lines no 47 to 82 is where the actual report is being formatted and created. In here we use PowerShell foreach loop to get through each computer item present in the “computers” object variable and get the Information of each installed update in the particular computer and save it in a variable named “updateInstallationInfo”. Line 50 gets this information. In line 51 I have added a small print statement that will show which host is this script being gathering the information, so that we can see that the script is being executed. If you don’t need this, you may comment out this line.</li><li>The next foreach section from line 53 to 81, we are going to iterate through each update information item in the “updateInstallationInfo” variable and get the detailed information on each update. In here we have used a try-catch block to capture any errors and save them in a update error log file. Log file is created with month appended in the name.</li><li>From line 61 to 79, we check whether the update arrival date is greater than the start date we want to generate the report. Because those are the updates that we want to be reflected in the report. Inside the “IF” statement, we get each information that we need to be in the report and add them to a PowerShell Custom Object name “reportItem”.</li><li>After the “IF” statement execution, the “reportItem” custom object is added to the “report” array we defined earlier. This above section is executed for each update inside each computer.</li><li>Once all the objects are added to the array, a csv report is generated using the “Export-Csv” PowerShell utility.</li></ul><h3>Limitations</h3><p>This script is good to view lots of information in a consolidate manner with the ability to filter through the details as it generates a csv report. Also, you can use various querying tools to analyze the data using the report. But this report generation will take time especially since there is more than 1000 updates to be filtered through in your WSUS server. So, the efficiency of this script partially lies on how well and efficiently your WSUS server is configured.</p><h3>Disclaimer</h3><p>This script is by no means the most optimal way to get the report. This is just one of the ways that I have used to get such data. If you know or find a better method, please do share so we all can learn from each other. I hope this script will help some of you in your daily sysadmin tasks.</p><p>Kindly do share this article with anyone you may feel that will help them in their life. If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa?source=post_page-----76f8540d8ce4--------------------------------">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ee4939b1dce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/generating-microsoft-wsus-server-update-status-report-for-easy-reference-using-powershell-2ee4939b1dce">Generating Microsoft WSUS Server Update Status Report for Easy reference using PowerShell</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick Guide on How AWS Service Control Policy Inheritance Work]]></title>
            <link>https://aws.plainenglish.io/quick-guide-on-how-aws-service-control-policy-inheritance-work-76f8540d8ce4?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/76f8540d8ce4</guid>
            <category><![CDATA[aws-scp]]></category>
            <category><![CDATA[aws-governance]]></category>
            <category><![CDATA[aws-security]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 16:43:56 GMT</pubDate>
            <atom:updated>2024-10-12T16:43:56.992Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS SCP inheritance work slightly different than other policies</p><p>AWS Service Control Policies (SCP) are higher level of policies which you can deploy through the AWS Organization to control the AWS Services in your AWS Accounts. It gives a central control over permissions otherwise provisioned through the AWS IAM. AWS SCP will be having explicit actions on your account either Allow or Deny based on the method of how you need to enforce control over your AWS Accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bm-rTiYLG0Ua4rn_UMcsag.png" /><figcaption>AWS Service Control Policies</figcaption></figure><h3>SCP Inheritance with Allow vs Deny Policies</h3><p>How AWS Service Control Policies work with Inheritance differs depending on whether it&#39;s an allow or deny policy.</p><h4>Allow SCP</h4><p>If the SCP is an allow policy, the allowed policy should be attached/mentioned in every level of the path to the AWS account including the account itself. If a particular allowed service is not mentioned in a certain level, in the AWS Account hierarchy, that service will not be allowed.</p><p>Let’s see an example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h_7a-3JgMHyq_AFyjo5K6Q.jpeg" /><figcaption>AWS Organization Structure with Allow SCPs attached</figcaption></figure><p>In the diagram you can see 5 SCPs attached to the accounts and OUs. Let&#39;s see what permissions are allowed by each SCP.</p><ul><li>SCP 1 provides full access to All AWS Service.</li><li>SCP 2 provides full access to the AWS EC2, S3 and RDS Services.</li><li>SCP 3 provides full access to the AWS EC2 and S3 Services.</li><li>SCP 4 provides full access to the AWS S3 Service.</li><li>SCP 5 provides full access to the AWS SNS Service.</li><li>SCP 6 provides full access to the AWS RDS Service.</li></ul><p>The diagram above shows where each SCP is attached. Let&#39;s consider AWS Accounts A, B, C and D. Below table show which AWS Services are finally allowed in each above-mentioned AWS Accounts, based on the how Allow SCP inheritance work.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/897201405e14747e684ee23475afa4fa/href">https://medium.com/media/897201405e14747e684ee23475afa4fa/href</a></iframe><p>Let&#39;s analyze …...</p><ul><li>Account A only has access to AWS S3 service as it is the only AWS service allowed in each level of the attached SCPs. All the other Services that have been mentioned was removed in subsequent upper levels leading to the account.</li><li>For Account B, the services AWS EC2, AWS S3, and AWS RDS is allowed as those services are consistently mentioned in each level throughout the account’s hierarchy.</li><li>For Account C, No AWS Services are permitted as the attached SCPs throughout the hierarchy do not have any consistent permission mentioned. At the Root OU level and Dev OU level “All AWS Services” are permitted. But in App 1 OU level, only AWS SNS service was permitted. Thus, at that level only AWS SNS was allowed in the hierarchy (Since all services by default includes SNS). But at the last level, which is the account level, a different permission is allowed which is RDS Service. Although this service was allowed on the Root OU and the Dev OU level, it was not allowed on the App 1 OU which is the 3rd level in the account hierarchy path. And the AWS SNS service which was allowed at the Account C’s hierarchy path up until 3rd level, is not allowed at the account level attached SCP. As a result, not service is allowed in the AWS Account C.</li><li>In Account D, all services are allowed as the “All AWS Services” are allowed in each SCP attached throughout each level in the account’s hierarchy. On thing to note here is that, although I have shown as attaching the same SCP at each level, the SCP name can be different. Only the permissions mentioned should be the same.</li></ul><p>Hope above clarifies on how the AWS SCP’s inheritance work when the Effect is “Allow”.</p><h4>Deny SCP</h4><p>If it&#39;s a Deny based SCP, regardless of the level the SCP is attached all the AWS Accounts in its pathway downwards will deny the services/actions mentioned in the SCP regardless of whether there are any allow statements allowing the service at every level. This is due to how policies (Policy Effect Precedence) work in AWS. Deny statements always get the precedence over any allow statements.</p><p>Let’s consider the scenario below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STxCBGR2AvBflovR8bPUjQ.jpeg" /><figcaption>AWS Organization Structure with Deny SCPs attached</figcaption></figure><p>In the above scenario, 4 SCPs are attached to the AWS Accounts and OUs. Let&#39;s see the contents defined in each SCP.</p><ul><li>SCP 1 provides full access to All AWS Service.</li><li>SCP 2 denies AWS EC2, S3 and RDS Services.</li><li>SCP 3 denies AWS CloudWatch Service.</li><li>SCP 4 denies AWS SNS Service.</li></ul><p>The diagram above shows where each SCP is attached. Let’s consider AWS Accounts A, B, C and D again and see how AWS Services will behave. Below table show which AWS Services are finally allowed and denied in each above-mentioned AWS Accounts, based on the how Allow and Deny SCP inheritance work.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3402cad3e82aa83393ffe46110ecdd56/href">https://medium.com/media/3402cad3e82aa83393ffe46110ecdd56/href</a></iframe><p>Again, Let’s analyze and what has happened ……...</p><ul><li>Since SCP 2 is attached in the Prod OU which is in the direct path for the AWS Account A, the services EC2, S3 and RDS have been denied in the AWS Account. Remember, deny SCP does not need to be attached at every level.</li><li>For Account B, apart from the SCP 2 attached in its hierarchy, SCP 3 is attached to Account B directly. Thus, apart from the services mentioned in SCP 2, the AWS CloudWatch Service mentioned in the SCP 3 also denied access in the AWS Account B.</li><li>There is only one Deny SCP attached in the AWS Account C’s hierarchy which is SCP 4 attached at the APP1 OU under the Dev OU. This SCP denies the SNS only, thus making the Account C users deny using AWS SNS Service. Again, remember the Deny SCP can be attached at any level and the effect will be the same, it denies the mentioned services.</li><li>AWS Account D has all its services allowed as no SCP attached directly or in its hierarchy denies any services.</li></ul><p>I hope the above two scenarios we discussed about Allow and Deny SCPs and how they work clears the behavior and what to consider when using SCPs to control and secure the access to AWS Services within your AWS Accounts.</p><p>If you look at the AWS Organizations in your AWS Account, under Policies → Service Control Policies, you’ll be able to see a policy named “FullAWSAccess” and inside the targets tab, you can see its attached to your AWS Account. You can see this is you have enabled the AWS Organizations (There is no additional cost for enabling the AWS Organizations). If this SCP was not attached to your AWS Account, you will not be able to access any AWS Service regardless of the AWS User Account type you are using (IAM/Federated/SSO/Root).</p><p>Below is an illustration of how AWS Account’s SCP attachment will look like by default.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-PK89a00EfnD5QpLpiCGA.jpeg" /><figcaption>General All Allow SCP attached by default to every AWS account that get created</figcaption></figure><h3>Key Points to Note !!!</h3><ul><li>In order to use AWS Service Control Policies, you need to have AWS Organizations enabled.</li><li>SCPs needs to be enabled in the AWS Organizations → Policies Section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2hZudCTgtaiyH9de1KQ2g.png" /><figcaption>SCP in the AWS Organizations</figcaption></figure><p>Below link show a small demo on how to enable AWS Service Control Policies.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4Lxky8HeNU0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4Lxky8HeNU0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4Lxky8HeNU0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1be1b851314561b93184be793ca3bcb5/href">https://medium.com/media/1be1b851314561b93184be793ca3bcb5/href</a></iframe><ul><li>AWS Service Control Policies will not work or prevent actions allowed through the AWS Resource Policies or AWS Service Linked Roles. Using the AWS SCPs you can only control AWS IAM policies whether they are attached to a User, Group or Role. Since AWS Identity Center also uses AWS Roles underneath to provide actual permissions, this applies to permissions given through AWS Identity Center Permission Sets.</li><li>SCPs cannot be self-attached. When your AWS Account is attached to an AWS Organization, the SCPs can only be attached from the AWS Management Account of the AWS Organization. But you cannot attach SCPs to your Management Account, other than the default attached SCP. This is being done as a safety mechanism to avoid any accidental incorrect SCPs being attached to the Management Account so that it will lose the complete or the needed access to Manage the entire AWS Organization. Even though you attach a SCP to Root OU, the actions in the SCP will have no effect in the Management Account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8_4afpnHGBZeySMgSf1SA.png" /><figcaption>Failure when attaching SCP to the AWS Organizations Management Account</figcaption></figure><ul><li>That means, if you have only one AWS Account in your AWS Organizations you cannot use the AWS SCP to control its services as that account is the AWS Organizations Management Account.</li><li>Think twice when creating/designing the AWS SCP and where should you attach that.</li><li>AWS SCPs take precedence over all the other AWS Policy types such as IAM Policies, AWS SSO Permission Sets, AWS IAM Permission Boundaries.</li></ul><h3>Conclusion</h3><p>AWS Service Control Policies are a strong service that you can use to Control the access to your AWS Services and the actions that can be performed in the account by users (IAM/SSO) or even by other AWS Services. It even can control the actions performed by the Root User itself. With this strong security control comes with great responsibility. When you are creating/designing the AWS SCPs you need to think on how it will behave and impact the existing operations. So as a general rule of thumb (Good Practice), before attaching any newly created SCP to a Production Account, test them on test/dev accounts or OUs.</p><p>I hope you all got a good idea about AWS SCPs, types of AWS SCPs and how the inheritance of AWS SCPs work. Hope this article has helped you in your Cloud Journey. If you wish to read and learn in depth, please follow the AWS Official Documentation <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html">here</a>.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa?source=post_page-----5ec3ca3586d6--------------------------------">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://x.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a><strong> | </strong><a href="https://open.spotify.com/show/7qxylRWKhvZwMz2WuEoua0?si=6b071022ddc847b9"><strong>Podcast</strong></a></li><li><a href="https://differ.blog/"><strong>Create a free AI-powered blog on Differ.</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76f8540d8ce4" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/quick-guide-on-how-aws-service-control-policy-inheritance-work-76f8540d8ce4">Quick Guide on How AWS Service Control Policy Inheritance Work</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things to consider when enabling AWS S3 Access Logs]]></title>
            <link>https://aws.plainenglish.io/things-to-consider-when-enabling-aws-s3-access-logs-5ec3ca3586d6?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ec3ca3586d6</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[compliance]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 11:48:07 GMT</pubDate>
            <atom:updated>2024-10-02T06:14:38.240Z</atom:updated>
            <content:encoded><![CDATA[<p>How Recursive AWS S3 Access logs can be Dangerous</p><p>AWS S3 access logs enable you to log individual object access patterns and related information such as object data actions, Service or Entity accessed the object, timestamp, protocol used, encryption algorithm etc. You can find more field information using this <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/LogFormat.html#log-record-fields">Link</a>.</p><p>This information is helpful when we need to audit or troubleshoot any specific actions happened on the objects in a S3 bucket. Also, configuring access logs for important buckets which hold sensitive data is an AWS Best Practice. This has been recommended in most of Cloud Security Standards also.</p><p>Although it’s very helpful and easy to configure AWS S3 access logs, there are few points that you should consider when configuring the Access Logs.</p><ul><li>Do you really need the Access Logs configured for the bucket.</li></ul><p>Configuring access logs will incur cost as you will be putting log files for the access requests that comes to the target bucket. Higher the access requests are higher will be the number of log files.</p><ul><li>Avoid recursive logging</li></ul><p>When you configure the access logs for a bucket, do not configure the access log destination as the same bucket you want the access logs configured to. This will result in a cycle of access actions and will result in recursive access logging. Access logs take all object actions performed regardless of what the object is. When access logs are configured, this will also be set of objects put into the S3 bucket. If you put the access log destination as the same bucket you need the access logs to track object actions, it will create additional object actions for the logging objects. This will be costly and will create unnecessary number of logs compared to the actual object actions required. Also, this will result in increase of the storage size and the number of objects count of the bucket.</p><p>Also, this will be troublesome and increase cost when you need to query/analyze the logs as there are unnecessary logs created.</p><ul><li>Configure Detailed object key format to speed up and reduce the cost for analytics</li></ul><p>When configuring the Access Log Object Key format, use detailed method shown in the diagram below. This structure of the object path make it easy to partition in a cases like querying from AWS Athena for the investigations and analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*-WyHT_jbigJO03zZ8cDklQ.png" /><figcaption>AWS S3 Access Logs Destination Configurations</figcaption></figure><ul><li>Use S3 Event time as the source of date when storing the Access Logs.</li></ul><p>When storing the AWS Access Logs it’s better to use the AWS S3 event time as the source of date, as when analyzing or when doing an investigation, we’ll be using actual event times rather than the log delivery times. This will help to have a smooth and effective investigation/analysis and will help to cut down unnecessary time conversions that have to do when reporting or correlating data if we have used the log event time as the source of date.</p><ul><li>Configure appropriate S3 lifecycle policies or do a periodic manual log cleanup.</li></ul><p>Having AWS S3 access log enabled will increase the storage size and thus the cost. Also, by keeping unnecessary logs overtime makes its costly and harder to quickly find the information you need. So as a general rule of thumb, always cleanup what you don’t need.</p><h3>Conclusion</h3><p>Configuring the access logs should be based on the usage/requirement. Don’t just enable the access logs for each bucket just because the configuration is there or just because of a standard say it’s the best practice. Because for some buckets such as publicly accessible with general data, enabling access logs will be unnecessary. But if there are any S3 buckets with sensitive data is stored, enabling the access logs with be critical. So, in a nutshell you need to properly think, plan and should be able to validate your requirement for enabling the AWS S3 Access Logs to have an efficient and effective outcome from it.</p><p>Hope this article has helped you in your Cloud Journey. If you wish to read and learn in depth please follow the AWS Official Documentation <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html">here</a>.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ec3ca3586d6" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/things-to-consider-when-enabling-aws-s3-access-logs-5ec3ca3586d6">Things to consider when enabling AWS S3 Access Logs</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How S3 Object Lock affects the AWS Config, AWS CloudTrail and AWS Control Tower]]></title>
            <link>https://aws.plainenglish.io/how-s3-object-lock-affects-the-aws-config-aws-cloudtrail-and-aws-control-tower-af38f30318c2?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/af38f30318c2</guid>
            <category><![CDATA[aws-s3-object-lock]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[legal-hold]]></category>
            <category><![CDATA[complaince]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Tue, 27 Aug 2024 19:20:08 GMT</pubDate>
            <atom:updated>2024-10-26T17:56:54.190Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s explore how two types of Object Lock, Compliance vs Governance behave</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*BIGp1SCKeGYkBIJA19oW5w.png" /><figcaption>AWS S3 Object Lock Configuration</figcaption></figure><h4>What is AWS S3 Object Lock?</h4><p>When we put a file to a S3 bucket, anyone with sufficient permissions can delete that file. This may be an intended action or an accidental action. However, there can be certain files that we need to be retained for some time without ability for anyone to delete. This may be due to various reasons such as security, compliance or legal. For such scenarios, AWS S3 object lock can help us to achieve this securely without any additional management overhead due to custom solutions.</p><p>There are different methods that we can use to apply S3 object lock. Out of them two methods are with retention periods that can be specified, and the other method is manual action based. The two Retention modes with specified time are;</p><ul><li>Governance</li><li>Compliance</li></ul><p>The manual retention mode (manual lock) is known as;</p><ul><li>Legal Hold</li></ul><h4>How Object Lock modes work?</h4><p>Both Governance and Compliance modes keep the S3 Objects for the defined time periods. However, the way these two modes behave is different from each other. The Governance modes is flexible, and more forgiving compared to the Compliance mode. In both modes, you can specify the no. of days that you want the object to be retained. This can be specified either in days or years.</p><p>There are few <strong>Important </strong>points that we need to keep in mind which are common to all these modes;</p><ul><li>To enable Object lock, you need to have Bucket Versioning enabled for that Bucket.</li><li>Once you enable the AWS S3 Object Lock, you cannot disable the Object Lock or Suspend the Versioning of the bucket.</li><li>Retention mode can be applied on Bucket Level as Default Retention Configuration or the Individual Object Level via APIs through AWS CLI, AWS SDK or AWS S3 Rest APIs.</li><li>If both bucket level and object level retention periods are mentioned, the object level retention period will take priority over bucket level configurations.</li><li>Individual object level configurations need to be mentioned at the PUT action.</li><li>Otherwise, the Bucket Level Retention configurations will be applied for the object once its placed inside the bucket.</li><li>If the Bucket Default retention was not set and the <strong><em>PutObject </em></strong>Action also did not have any retention configuration, the object will not be protected by the AWS S3 Object Lock.</li><li>A “<strong><em>Retain Until</em></strong>” metadata filed will be added to the metadata of the object which calculates the object retention expiry date from the date of object being uploaded to the S3.</li><li>Different versions of the same object can have different object lock retention periods.</li><li>Object lock configurations will be kept regardless of the S3 Bucket class and between any class transitions due to S3 lifecycle policies. Object delete markers will be created but the object will not be deleted due to action of bucket owner or the lifecycle policy.</li><li>Object Lock configuration for each object will be copied over in a S3 Replication job from your source bucket to the destination bucket, so that the object which are replicated in the destination bucket will have the Object lock configuration in the source bucket.</li><li>Object lock configurations will be applied to any new object that you put into an S3 bucket with Versioning and Object Lock enabled and configured. If you enabled object lock in an existing bucket and need the existing objects to be protected by the object lock configurations, you need to apply the object lock configurations individually using AWS S3 Batch jobs or re-upload the files to S3.</li><li>Legal hold will be kept until you manually remove the hold by yourself or anyone with permission to do so. You can do this through the console or through the APIs. Please note that you can’t enable Legal Hold at the moment of object upload through the console. Only after upload completes, you can configure these settings in the console.</li><li>In order to use the Object Lock with retention configurations, the PUT Object Action needs to provide additional header value known as “<strong><em>Content-MD5</em></strong>”. This header value should contain the MD5 digest (hash) of the file which you are uploading to the S3. AWS S3 will also calculate the digest of the file you upload and will only accept the object if and only if the two digests are same. If you are uploading through the console, this header value will be calculated for you at the time of upload.</li></ul><h4>Difference Between Governance and Compliance Retention Modes</h4><p>There are a few differences which we need to be aware of when we are using the Governance or the Compliance retention modes.</p><ul><li>You can change the retention period (days) for objects which have retention period already configured, only in the Governance mode. In Compliance mode you cannot reduce the retention days but you can increase it.</li><li>If the retention mode is set to Governance, you can delete the objects by overriding the lock if you have IAM permissions “<strong><em>s3:BypassGovernanceRetention</em></strong>” and the delete request should include “<strong><em>x-amz-bypass-governance-retention:true</em></strong>” in the request header.</li><li>If the retention mode used is compliance mode, then there is no way to delete the objects which are protected by the Compliance retention configuration. Not even the AWS Root Account can override this.</li><li>The only way to remove/delete bucket or the objects protected by the Compliance Retention configuration is to delete the AWS Account itself.</li></ul><p>As you can see, the Compliance retention mode provides strict security and Governance Retention mode provides a bit more flexibility with security. Out of them compliance mode is the better choice but will not be the ideal choice for every use case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rc-wtRR_nzgfuMWDll6W9A.png" /><figcaption>Object cannot be deleted if the S3 has Object Lock feature configured correctly</figcaption></figure><p>For example, if you don’t understand or know the use case properly, it might be a good idea to start with the Governance Retention mode so that you can get more idea on the behavior and the requirements. Then with the time, change the mode to Compliance.</p><p>Compliance retention mode will be really beneficial when you have a organizational standard that you need to follow such as log files stored in S3 need to be kept for longer time periods without anyone&#39;s ability to change or delete them.</p><h4>AWS Control Tower, AWS CloudTrail and AWS Config</h4><p>As you may already know or read through my other articles, both AWS Control Tower and AWS Config are Governance tools which will help you to archive consolidated compliance throughout your entire AWS virtual data center which can span across multiple AWS Accounts.</p><p>If you are using AWS Control Tower, you will be using AWS CloudTrail and AWS Config underneath. Or you might just be using AWS CloudTrail and AWS Config standalone without AWS Control Tower. Regardless of the method, let’s see how these services will get affected if you intend to use AWS S3 Object Lock feature in any of the related S3 buckets with above 2 services.</p><h4>How S3 Object Lock affects AWS CloudTrail and AWS Config</h4><p>As mentioned above, when you put an object to Object Lock Enabled S3 with Default Retention enabled (either in compliance or governance modes), you need to provide “<strong><em>Content-MD5</em></strong>” header with the hash value. If this header and value is not provided in the PutObject request, S3 will deny the put action indicating that “Content-MD5” header is not present. Please note that you’ll not be able to see this error in CloudTrail as this is a Data Event. If you need to see or capture this event, you need to have CloudTrail Data Event trail configured with S3 write data events enabled.</p><p>When we enable S3 object lock and the Default Retention on S3 buckets where the CloudTrail and Config events are stored, AWS CloudTrail will behave as expected without any issues. However, AWS Config will not be able to deliver the log files anymore due to this. The reason behind this is that AWS CloudTrail sends the “<strong><em>Content-MD5</em></strong>” header when it injects the log files to the S3, therefore CloudTrail logs are accepted by the S3 bucket. AWS Config Log Delivery Channel does not add this header to its <strong><em>PutObject </em></strong>request at the moment. I got this verified with AWS Support on JULY 2024 via a Support Case. Due to this AWS Config log files are rejected by the S3. As per the AWS Support, this will be fixed in the future, but they do not have an ETA.</p><p>Since both of these services sends log files through the service themselves using Service-Linked Roles, we do not have an easy way to implement addition of the header to AWS Config Log Delivery Channel.</p><h4>How will this affect the AWS Control Tower and what to consider</h4><p>AWS Control Tower used both AWS CloudTrail and AWS Config as the backbone of its infrastructure solution. When you need to create or on-board a new AWS Account to your AWS Control Tower, AWS CloudTrail Organizational Channel will be added to the new Account and AWS Config recorder with the Delivery Channel will be created inside the Account. When this happens, the CloudTrail sub-step will be succeeded, and the AWS Config sub-step will fail due to above mentioned header issue. This is because when AWS Config Delivery Channel is configured, it will do a Write Access Check on S3. Thus, new Account onboarding will get halted for this AWS Control Tower.</p><p>If your account onboarding failed, DO NOT update the AWS Control Tower to this current status. If you do, this will cause the AWS Control Tower to go to an Error Drifted status, thus breaking the AWS Control Tower functions. Instead, remove the error-ed AWS Account from onboarding. You can do this by removing Provisioned Service Catalog Product. Only then update the AWS Control Tower if you need to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnT_caynrG765o7d-pEgEA.png" /><figcaption>AWS Service Catalog Provisioned Products</figcaption></figure><p>Updating the Control Tower will not cause the Config Header issue to rise as all the AWS Config Delivery Channels are already configured and access check for the AWS Config Delivery Channel will not be checked again.</p><h4>Workaround</h4><p>Since this is causing issues when onboarding new accounts to the Control Tower, the only direct workaround is to temporarily disable the AWS S3 object lock default retention. This will not remove the object lock or the retention from the objects which were uploaded while the AWS S3 object lock default retention was enabled or specifically enforced with the “<strong><em>PutObject</em></strong>” request. Those objects will still have the object lock configuration in their metadata. Only the new file which get uploaded within the time frame of the retention disabled will not be protected. Once the new account onboarding is completed, you can re-enable the default retention in the mode you require again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*8AqyXKSH9fdSCGxa_SN2ig.png" /><figcaption>Disable Object Lock Default Retention</figcaption></figure><p>However, please note that in this case you’ll have to apply object lock retention configurations for the objects which got uploaded in the time which bucket object lock default retention configurations were disabled.</p><h3>Conclusion</h3><p>AWS S3 Object Lock can greatly help you to achieve required security compliance for your project/organization if you are using it in the correct way. Think twice and plan before you enable the Object Lock feature on how you should use it, whether you should use the Governance retention Mode, Compliance retention mode or just the Legal Hold.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FV9p5qwKByKc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DV9p5qwKByKc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FV9p5qwKByKc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/23b2b06733162132481bb76215833f1e/href">https://medium.com/media/23b2b06733162132481bb76215833f1e/href</a></iframe><p>Hope this article has helped you in your Cloud Journey. If you wish to read and learn in depth please follow the AWS Official Documentation <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html">here</a>.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><p>Also, if you learn something new, please feel free to share this article with anyone who will also have a benefit. Thank you !!!</p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af38f30318c2" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/how-s3-object-lock-affects-the-aws-config-aws-cloudtrail-and-aws-control-tower-af38f30318c2">How S3 Object Lock affects the AWS Config, AWS CloudTrail and AWS Control Tower</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to import a Custom Certificate to ACM regardless of PEM or PFX]]></title>
            <link>https://aws.plainenglish.io/how-to-import-a-custom-certificate-to-acm-regardless-of-pem-or-pfx-ccec306e8658?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccec306e8658</guid>
            <category><![CDATA[aws-acm]]></category>
            <category><![CDATA[openssl]]></category>
            <category><![CDATA[pfx]]></category>
            <category><![CDATA[certificate-import]]></category>
            <category><![CDATA[custom-certificate]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Mon, 26 Aug 2024 16:16:41 GMT</pubDate>
            <atom:updated>2024-08-26T16:16:41.850Z</atom:updated>
            <content:encoded><![CDATA[<p>ACM which is also known as AWS Certificate Manager is a Free of Charge Service which is provided by the AWS to Manage your Certificate that will be used in your AWS virtual datacenter. This service allows you to create Public SSL Certificates at no additional costs and Private Certificates for a cost depending on your configurations. Once you have your SSL/TLS Certificates in the ACM, you can easily integrate them with your AWS Services. It even provides the auto-renewal of certificates for the ACM generated ones. This makes the creation, management and the usage of SSL/TLS certificates much easier, especially when you have a large infrastructure.</p><figure><img alt="AWS ACM Console View" src="https://cdn-images-1.medium.com/max/1024/1*KuFxhWr8tHgGN0htqpCBCw.png" /><figcaption>AWS ACM Console view</figcaption></figure><p>However, there is a small caveat with ACM when comes to the Public Certificates generated by ACM itself. You cannot export the full public certificate (both Key and Cert) of the Public Certificate from the ACM. Since this is provided completely free we actually cannot complain right !. But this can be a requirement for some users as they might want to configure the public certificate in their internal servers or other outside services.</p><p>In those scenarios, you can create your own certificate from another provider or self-signed (do not recommend using self-signed in production environments) and import it to the AWS ACM to be used by your AWS resources. The following guide shows you, how to import the Certificates to AWS ACM by yourself.</p><h4>Pre-requisites</h4><ul><li>Both Certificate and the Private Key should be in PEM encoded format.</li><li>If encrypted, you should have the password required for the decryption.</li><li>If you have the PFX file, make sure you have the password for the PFX as well.</li></ul><h3>If you have PEM Format</h3><h4>Step by step guide</h4><figure><img alt="Importing a Certificate to ACM" src="https://cdn-images-1.medium.com/max/896/1*FLlLtWfN417Vugzxf0WZTA.png" /><figcaption>Import a Certificate to ACM</figcaption></figure><figure><img alt="Decrypted Private Key" src="https://cdn-images-1.medium.com/max/390/1*FIHR2d8l3SClzo0abA8FWQ.png" /><figcaption>Decrypted Private Key</figcaption></figure><ol><li>Navigate to AWS ACM and select Import Certificate.</li><li>Extract and copy the content of the certificate file.</li><li>Copy the Content to Certificate section.</li><li>Next, get the decrypted private key. Decrypted Private key should be starting with “ — — BEGIN RSA PRIVATE KEY — ”. If you do not have the decrypted key, you can use the below command at the end of steps to decrypt it.</li><li>Copy the content in the decrypted file and paste it in the Private Key section of the ACM import certificate page.</li><li>If you have a certificate chain also which need to be imported, you can add the chain in the last text box.</li><li>Once done you can add the tags required (always good to have tags !!!), and then click on “Import Certificate”.</li><li>If you have provided correct values, it will be successfully imported.</li></ol><p>Command to decrypt the private key:</p><pre>openssl rsa -in &lt;file name of encrypted key&gt; -out &lt;file name for decrypted key&gt;</pre><h4>Considerations</h4><ul><li>Since it’s an imported certificate, the “Renewal Eligibility” will be Ineligible.</li><li>You have to manually re-import the new certificate when the current imported one is near expiry and delete the old one.</li><li>If you are getting errors when importing, make sure its PEM encoded, no spaces or special characters got copied when copying the content, private key is decrypted.</li></ul><h3>If you have the PFX file (Keystore)</h3><h4>Step by step guide</h4><ul><li>First, we need to extract the private key from the .pfx file. You can use the below command to extract the key.</li></ul><pre>openssl pkcs12 -in &lt;pfx file&gt; -nocerts -out private.key</pre><ul><li>You’ll be prompted to enter the .pfx file’s password and a passphrase for the private key.</li><li>Then, you need to extract the certificate from the .pfx file. For this you can use the following command.</li></ul><pre>openssl pkcs12 -in &lt;pfx file&gt; -nokeys -clcerts -out certificate.crt</pre><ul><li>Now you have the certificate and the encrypted private key in PEM format. Next you can use the same above command to decrypt the private key.</li><li>The next steps are the same as above. Copy the content and paste them in their respective fields in the “Import Certificate” window in the AWS ACM.</li><li>Provide the necessary tags and click on “Import Certificate”.</li></ul><p>I hope this guide will help you all, if yo have any issues when importing Custom Certificates to AWS ACM. Please do share this with others as you benefited from this article or with anyone who might benefit from this.</p><p>The following Video also, illustrates the same steps I talked above as a demo.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FdoDTbxLUJOg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdoDTbxLUJOg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FdoDTbxLUJOg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2386441f3388bcf3dba3b14a8d68eeba/href">https://medium.com/media/2386441f3388bcf3dba3b14a8d68eeba/href</a></iframe><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a> | <a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a> | <a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a> | <a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a> | <a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://cofeed.app/"><strong>CoFeed</strong></a> | <a href="https://differ.blog/"><strong>Differ</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccec306e8658" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/how-to-import-a-custom-certificate-to-acm-regardless-of-pem-or-pfx-ccec306e8658">How to import a Custom Certificate to ACM regardless of PEM or PFX</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enforcing AWS Security Group Governance using Firewall Manager Policies]]></title>
            <link>https://aws.plainenglish.io/enforcing-aws-security-group-governance-using-firewall-manager-policies-6dbe4a0d4197?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dbe4a0d4197</guid>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-security-group]]></category>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[aws-firewall-manager]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Mon, 12 Feb 2024 01:34:34 GMT</pubDate>
            <atom:updated>2024-08-26T16:30:27.390Z</atom:updated>
            <content:encoded><![CDATA[<p>How to use AWS Firewall Manager Security Policies for Governance and Compliance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bMX3hu7yCDsnw6lMMp_Gdg.png" /><figcaption>AWS Firewall Manager</figcaption></figure><h4>AWS Security Groups and AWS Firewall Manager</h4><p>AWS Security Groups are used almost everywhere in our Virtual Datacenter that we build in the AWS Cloud. Simply put, if it’s connected to a VPC it has a Security Group. AWS Security Groups are stateful, by default deny group of statements. It uses 5 tuples to evaluate the traffic before being allowed into the resource.</p><p>Five tuples;</p><ul><li>IP version</li><li>Type</li><li>Protocol</li><li>Port Range</li><li>Source</li></ul><p>AWS Firewall Manager is a service that we can use to centrally manage the AWS Security Services using defined policies easily. At the moment it supports below mentioned services;</p><ul><li>AWS WAFv2</li><li>AWS WAF Classic</li><li>AWS Shield Advance</li><li>AWS Security Groups</li><li>AWS Network Firewall</li><li>AWS Route53 Resolver DNS Firewall</li></ul><p>You can configure the policies to be scoped on OUs, all or specific AWS Accounts or using the tags. This gives a greater flexibility to centrally manage and even get a compliance state of your resources. Going further a step, the policies allow you to even configure a remediation action on the non-compliant resources depending on the policy type and the additional configurations that you configure for the policy.</p><p>In this article, we’ll discuss about how to manage/enforce governance over security groups in your AWS Account/Organization. Please read the full article before you get started :)</p><h3>Lets Begin !!!</h3><h4>Getting the Pre-requisites Done</h4><p>There are two things that you need to complete before starting to use security policies in the AWS Firewall Manager;</p><ol><li>Enable AWS Config resource recorder.</li><li>Select Administrator Account for AWS Firewall Manager.</li></ol><h4>Enable AWS Config Resource Recorder</h4><p>Enabling the AWS Config will enable the AWS Config recorder by default. This can be done either manually through the AWS Config Console or using the AWS CloudFormation Stack which is provided in the AWS Firewall Manager Settings page.</p><figure><img alt="Enabling AWS Config through the Console" src="https://cdn-images-1.medium.com/max/1024/1*97WNRb4TAkj0RcrAwLPBNA.png" /><figcaption>AWS Config Console</figcaption></figure><figure><img alt="Enabling AWS Config through AWS Firewall Manager Settings page." src="https://cdn-images-1.medium.com/max/1024/1*sfQEIBWksqHYCIkeSfU7CQ.png" /><figcaption>AWS Firewall Manager Settings</figcaption></figure><p>AWS Config needs to be enabled on all accounts and regions which you plan to use the AWS Network Manager Policies. However, you do not need to enable any specific config rules for this. AWS Firewall Manager will create <strong><em>two config rules per policy per account</em></strong> when you create the actual policies without you needing to do any action from your end. Having the AWS Config recorder will allow the AWS Firewall manager to detect the newly created security groups, exiting security groups and updates to any security groups in our scenario.</p><h4>Select Administrator Account for AWS Firewall Manager</h4><p>Next, we need to configure an AWS Account as the Administrator. The <strong><em>first</em></strong> account we configure will be taken as the <strong>Default Administrator</strong> and will be having <strong><em>full </em></strong>permissions on AWS Firewall Manager.</p><p>To configure the administrator account, please navigate to Settings section in the AWS Firewall Manager;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sYpw74X_PcPKBive3ohmpQ.png" /><figcaption>Configuring Administrator Account</figcaption></figure><p>Once the Default Administrator is created, you can configure additional Administrator accounts with restricted capabilities such as which accounts, policy types and regions can be managed for each administrator. Let’s dive deep into this in another article.</p><h4>Configuring AWS Security Group Policies</h4><p>Once we are done with the above-mentioned steps, we can start configuring the security policies.</p><p>Navigate to the AWS Firewall Manager security policies section and click on create policy.</p><figure><img alt="Navigating the Security Polices section in AWS Firewall Manager Console" src="https://cdn-images-1.medium.com/max/1024/1*CBcPDkT9iKmmycQ0aJmqgw.png" /><figcaption>Configuring Security Policies</figcaption></figure><p>As mentioned above, there are multiple types of polices supported by the AWS Firewall manager. In this article we are going to use the Security Group Policies. In the Create Policy Window, please proceed to select the Security Group as the service and the region that you want the policy to execute in.</p><figure><img alt="Select Security Group policies and then select the audit and enforcement mode" src="https://cdn-images-1.medium.com/max/998/1*HPMjOdUSZG1_9zzjtIkXeQ.png" /><figcaption>Configuring Security Group Policies</figcaption></figure><p>Once you select the Security Group, there will be 3 sub policy types that you can configure.</p><ul><li>Common security groups</li><li>Auditing and enforcement if security group rules</li><li>Auditing and cleanup of unused and redundant security groups</li></ul><p>The first option “<strong>Common security groups</strong>” will allow you to automatically provision set of security groups you need in the targeted accounts for the scope of your policy which will be set in next steps.</p><p>The third option mentioned above “<strong>Auditing and cleanup of unused and redundant security groups</strong>” will let you automate the cleanup of unused security group. As you might know, security groups tend to be left out when we delete resources which are created manually. This will result in having lots of unused security groups in the AWS Account which in turn will hinder the effectiveness and even tends to engineers choosing wrong security group when provisioning resources.</p><p>For the scenario which will be covered by this article, we’ll be using the second option “<strong>Auditing and enforcement if security group rules</strong>”.</p><p>AWS Firewall Manager Security Group policies provide two methods that can be configured in. You can either use managed policies with specification to each tuple of the security group rules or you can use a reference security group which will be used to define the rules which you want to allow or deny from having in your security groups across the AWS Account/Organization.</p><figure><img alt="Using Managed policies to define the specifications for each rule" src="https://cdn-images-1.medium.com/max/818/1*ViOXWSlpQ0wBbDXzAQyuiw.png" /><figcaption>Managed Policy method for Security Group Rules</figcaption></figure><p>In our scenario, let’s use the Custom policy rules method. In this method we’ll be selecting a reference security group which carries all the rules which we do not want to have in a Security group across the organization.</p><figure><img alt="Custom Security Group Policies with reference SG known as Audit-SG" src="https://cdn-images-1.medium.com/max/811/1*4-fqxU1h5FgLyPtNz7a-7w.png" /><figcaption>Custom Security Group Policies with reference SG</figcaption></figure><p>The security group which we select as a reference security group is another security group that we create under EC2 → Security Group section.</p><figure><img alt="Reference security group rules" src="https://cdn-images-1.medium.com/max/1024/1*MHFPjeHpoGnmq1e_Mgsdgg.png" /><figcaption>Configuring Audit Security Group</figcaption></figure><p>Once the Audit Security Group is selected, lets proceed to configure the actions for the policy. In here, you can either just identify the non-compliant security groups or configure to auto-remediate them once identified.</p><p>Since we need to enforce the governance, we’ll be moving forward with the auto-remediate option.</p><figure><img alt="Since its enforcing selected the auto-remediate option" src="https://cdn-images-1.medium.com/max/823/1*zMqlw_WLLekRWP7QwwzfRA.png" /><figcaption>Configuring Policy actions</figcaption></figure><p>In the next step, we need to select the scope that the policy will be evaluated against.</p><figure><img alt="Included all the AWS Accounts, All the resources which can have Security Group attached" src="https://cdn-images-1.medium.com/max/1024/1*tDjiuW1qgV4iBrdCOYyc9w.png" /><figcaption>Configuring Security Policy Scope</figcaption></figure><p>Here, we can define whether we need the policy to evaluate all the accounts in our AWS Organization or specific ones. When selecting specific accounts, AWS provides us the capability to use either include method or exclude method.</p><p><strong>Option 1 — <em>EC2 instance</em></strong></p><p>The <strong><em>EC2 instance</em></strong> option will only make the policy evaluate on the security groups which are attached to EC2 instances. This option will disregard all the security groups which are attached to other resources and unattached security groups.</p><p><strong>Option 2 — <em>Elastic Network Interface</em></strong></p><p>The <strong><em>Elastic Network Interface(ENI) </em></strong>option will evaluate all the security groups which are in use, in other words attached to a resource as there should be an ENI in order to attach a security group and will disregard all which are created but unattached/used.</p><p><strong>Option 3 — <em>Security Group</em></strong></p><p>Then you need to select the resource types that will be evaluated on. Selecting the <strong><em>Security Group</em></strong> option will evaluate all the security groups which are created regardless of whether is attached to a resource or not.</p><p>Selecting the security groups can be further customized by using tags. In the last section in above step, you can either include all resources and include or exclude specific resources based on attached tags to the resource.</p><p>Tagging is one of the best practices when deploying resources in the Cloud. Such that in the step, we can attach tags that should be used in our AWS Firewall Manager Security Group Policies.</p><figure><img alt="Following best practices to tag the policy that we are creating with the creator tag" src="https://cdn-images-1.medium.com/max/1024/1*K81W9V6-3euU6VnTRvhT1Q.png" /><figcaption>Configuring Tags for the Policy</figcaption></figure><p>In the Last step, we can review what we configured and proceed to create the policy.</p><figure><img alt="Once proceed with the create option, the security group policy will be active." src="https://cdn-images-1.medium.com/max/1024/1*T74M1PSWxMCXN9YNTC2rlQ.png" /><figcaption>Successfully Created Security Group Policy</figcaption></figure><p>Now the policy is active and will start monitoring your account/s or Organization for any security groups that will violate the rule (by having rules defined in the audit security group) and will automatically remove them since we have enabled auto-remediation. Any security group rule which will be configured accidentally or intentionally violating the Policy by an engineer/customer will be removed within few seconds.</p><h3>How Pricing works with AWS Firewall Manager Policies</h3><p>Enabling AWS Firewall Manager policies normally have three aspects of pricing;</p><ul><li>Policy Fee</li><li>AWS Config Rules Fee</li><li>Actual resource related component fees</li></ul><p>There are two exceptions however,</p><ol><li>AWS Firewall Manager Security Group Policies will only have the Policy Fee and the AWS Config Rules Fee.</li><li>AWS Firewall Manager Shield Advance Policies will only have the AWS Config Rules fees as the policies will be covered from the Shield Advance Subscription cost which is $3000 per month.</li><li>AWS Firewall Manager WAF Policies will have above mentioned three aspects of cost except for a scenario where Shield Advance is enabled in the Organization. In that case it will only have the AWS Config Rule Fees.</li></ol><p>All the Policies will have a <strong><em>$100 per policy per Region </em></strong>fee excluding AWS Shield Advance policies and WAF policies if Shield Advance is enabled in the Organization.</p><p>You can find-out more and go through examples <a href="https://aws.amazon.com/firewall-manager/pricing/#:~:text=AWS%20Firewall%20Manager%20charges%20%24100,rules%20per%20policy%2C%20per%20account"><strong><em>here</em></strong></a>.</p><p>Therefore, before creating the policies kindly make sure that you clearly understand the costs included for your scenario.</p><h3>Conclusion</h3><p>AWS Firewall Manager Policies will be really helpful to govern and enforce security in your AWS Infrastructure Solutions. However, due to high cost involved you need to evaluate and identify whether this is actually required or not for your infrastructure.</p><p>If you are a huge enterprise and matured in cloud with wanting to reduce management overhead over security and increase security enforcement, having AWS Firewall Manager Policies will help you. But if you are a startup or a small business, AWS Firewall Manager Policies might not be for you to use at the moment due to the cost per policy.</p><p>I hope this article helped you to understand how to use AWS Firewall Manager Security Policies and if so, please do share this with others.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><p>Also, if you learn something new, please feel free to share this article with anyone who will also have a benefit. Thank you !!!</p><p>Thank you!</p><h3>In Plain English 🚀</h3><p><em>Thank you for being a part of the </em><a href="https://plainenglish.io/"><strong><em>In Plain English</em></strong></a><em> community! Before you go:</em></p><ul><li>Be sure to <strong>clap</strong> and <strong>follow</strong> the writer ️👏<strong>️️</strong></li><li>Follow us: <a href="https://twitter.com/inPlainEngHQ"><strong>X</strong></a><strong> | </strong><a href="https://www.linkedin.com/company/inplainenglish/"><strong>LinkedIn</strong></a><strong> | </strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong>YouTube</strong></a><strong> | </strong><a href="https://discord.gg/in-plain-english-709094664682340443"><strong>Discord</strong></a><strong> | </strong><a href="https://newsletter.plainenglish.io/"><strong>Newsletter</strong></a></li><li>Visit our other platforms: <a href="https://stackademic.com/"><strong>Stackademic</strong></a><strong> | </strong><a href="https://cofeed.app/"><strong>CoFeed</strong></a><strong> | </strong><a href="https://venturemagazine.net/"><strong>Venture</strong></a></li><li>More content at <a href="https://plainenglish.io/"><strong>PlainEnglish.io</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dbe4a0d4197" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/enforcing-aws-security-group-governance-using-firewall-manager-policies-6dbe4a0d4197">Enforcing AWS Security Group Governance using Firewall Manager Policies</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Things You Should Consider When Moving AWS Accounts Between AWS Organizations]]></title>
            <link>https://aws.plainenglish.io/things-you-should-consider-when-moving-aws-accounts-between-aws-organizations-45a291715f?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/45a291715f</guid>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[aws-organizations]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 20:07:28 GMT</pubDate>
            <atom:updated>2024-08-26T16:32:22.346Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes you may require to change the AWS Organizations, thinks about these before you do.</p><h3>What is AWS Organizations?</h3><p>You might be already familiar with AWS Organizations or if not, you might be wondering what this is and how you can utilize it for your advantage. AWS Organizations is a logical grouping Service which will allows you to connect multiple AWS Accounts owned by you together (consolidate) so that you can have a centralized management of several services that AWS offers. In other words, it’s an account management services that lets you to invite/add and manage AWS Account through creation of Organizational Units and even create new AWS Accounts according to your requirements without requiring a credit card.</p><h3>Why do you need AWS Organizations?</h3><h3>Consolidated Billing</h3><p>This is one of the most attractive feature of AWS Organizations. When you enable AWS Organizations, the account which you enable it from becomes the “<strong>Management Account</strong>” of the AWS Organizations and the account which has the full control of the service. When you have multiple AWS Accounts that have been added to your AWS Organizations, the entire costs of the account that you have in the AWS Organizations are billed through the Management Account. This is known as Consolidated Billing and are enabled by default. This applies to any of the future accounts which you’ll be adding to the AWS Organizations are do not have to perform any actions manually. There is no minimum or Maximum AWS Account you need in order to have this feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*fIz5rI8ja7VwM1XX.jpeg" /><figcaption>Multiple Accounts with Consolidated Billing</figcaption></figure><h3>Central Policy Management</h3><p>From the AWS Organizations you can create multiple types of Policies for centralized management of all of your AWS Accounts. Two of them which very useful are Service Control Policies (SCPs) and Backup Policies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mw1zZ_nJ6TC-Fw1A.jpeg" /><figcaption>Centralized Policy Control</figcaption></figure><h3>Enable Integrated Services</h3><p>Some of the AWS Services that we use have the capability to provide a consolidated view of the service functionality across all of your AWS Accounts through the AWS Organizations. You may call this functionality as Single Pane of Glass view. By enabling trusted access to the AWS Organizations through the Services which supports, the resource information, finding and other relevant meta data are shared between accounts for better view and correlation.</p><p>For example, by enabling AWS GuardDuty trusted Access to AWS Organizations, you can view the abnormal behavior of all of your AWS Accounts from one Delegated Administrator GuardDuty view from one of your AWS Accounts. This does not need to be the management account; you can choose any account you prefer as your Delegated Administrator Account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*hRBgJvLovv49YYMV.jpeg" /><figcaption>Integrated Services through AWS Organizations</figcaption></figure><p>If you are an AWS Identity Center (formerly AWS SSO) user, you are already using AWS Organizations as it’s is an integrated service.</p><p>Above are main functionalities that AWS Organizations are used for and in this article, I will not be further going into technical details on configurations.</p><h3>Reasons that you might have to change Organizations</h3><p>There can be many reasons that will make it necessary for you to change the AWS Organizations from one you are currently into another. Some of them can be;</p><ul><li>Billing Changes within your business organizations. Your business organization separates AWS Organizations based on the departments and your AWS Account belongs to another department from which you are currently in.</li><li>AWS Account ownership changes or workload changes. If you have AWS Organization separation based on the ownership or workloads provisioned in, you might have to change the AWS Organizations.</li><li>If you want pay your AWS Bills through an SPP AWS Partner.</li></ul><h3>Factors which you should Consider</h3><p>There can be lot of factors you need to consider depending on your situation when moving the AWS accounts between two AWS Organizations. Below are some of them, which I have identified and might be useful in your situations also.</p><h4>Does your AWS Account use any Landing Zone features?</h4><p>If your AWS Account use any Landing Zone features such as centralized log management or security controls such as SCPs, Backup Policies, you’ll have to consider on how these will be implemented through the new AWS Organization which you are going to be moving into.</p><p>If it’s capable to have similar Log Management and Security Controls, then you might have to consider the implementation plan, timeline, and the impact that you’ll have to face until the implementation is completed.</p><h4>Authentication mechanism which you are currently using and its compatibility.</h4><p>There are several ways that you can authenticate into your AWS Account as mentioned below.</p><ul><li>AWS IAM</li><li>AWS IAM with External IDP</li><li>AWS Identity Center Standalone</li><li>AWS Identity Center with External IDP</li><li>AWS Cognito Identity Pools</li></ul><p>Depending on the method you use, it might be or might not be supported in the new AWS Organization which you are considering to be moved into. Therefore, you have to consider the fact whether you can use a different authentication mechanism or not.</p><p>For example, if you are using an AD integrated with AWS Identity Center (AWS SSO), and the new AWS Organization which you are hoping to move in already uses AWS Identity Center Standalone or Integrated with a different AD than yours, you cannot integrated your AD also side by side the currently integrated AD or have a separate AWS Identity Center for you as it is not an capability of AWS Identity Center or the AWS Organizations at the moment.</p><h4>Security Standards/Compliance requirements</h4><p>The new AWS Organization may be following or complying a Security Standard or Framework which is not adhered by you the compliance framework required by your workloads, may not be able to adhere by the new AWS Organizations. Both of these aspects can affect the security and the performance of your workloads thus impacting the Business.</p><h4>AWS Regions and Services which you use.</h4><p>With the use of AWS Organizations, you can block/deny set of AWS Services or Regions which you might not need using SCPs. This can be due to security and compliance or for cost optimization. The new AWS Organization which you intend to move might have these policies set up and thus will have to change them before your account is moved in.</p><h4>Evaluation of Past months Cost trend and the Impact by the Cost</h4><p>Cost is a major factor that we should always be aware of when we use Cloud Technologies. How we use the Services given by the Cloud Providers decide the cost we have to bear. As you might already have a Account budget, the new AWS Organization might also have budgetary constraints that they have to accommodate. This can be an AWS budget, or a budget assigned by your Business for the respective departments using the particular AWS Organization. The AWS Organization change of your account might exceeds the budget limits of the new AWS Organization which you are moving into. Therefore, you must do a cost evaluation before the changing the Organization and be-aware of the new cost impact on the monthly bill.</p><h4>Agility that can be afforded</h4><p>To change the AWS Organization, both from your end and the new AWS Organization side will have to undergo some changes in order to make the change possible. Therefore, you will have to decide up to which extent or which controls your account, or the AWS Organization can accommodate. Both the parties might have to compromise some of there controls and practices is some cases in order to do the account migration.</p><p>There can be additional different factors which you will have to consider depending on your use cases and the situation. Above are some of the considerations which I have encountered which are applicable for most of them and I hope these will help you in your Account Migration between AWS Organizations. If you learn or get an idea through this article, kindly share this with your colleagues so that they can get a benefit from this.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><p>Also, if you learn something new, please feel free to share this article with anyone who will also have a benefit. Thank you !!!</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45a291715f" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/things-you-should-consider-when-moving-aws-accounts-between-aws-organizations-45a291715f">Things You Should Consider When Moving AWS Accounts Between AWS Organizations</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Control Tower for Governance: From Personal Experience]]></title>
            <link>https://aws.plainenglish.io/aws-control-tower-for-governance-from-personal-experience-989774d4849c?source=rss-112ddec7ff46------2</link>
            <guid isPermaLink="false">https://medium.com/p/989774d4849c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-governance]]></category>
            <dc:creator><![CDATA[Nuwan Premaratne]]></dc:creator>
            <pubDate>Sun, 02 Jul 2023 15:18:27 GMT</pubDate>
            <atom:updated>2024-08-26T16:33:15.729Z</atom:updated>
            <content:encoded><![CDATA[<p>Control Tower; Next step from AWS Landing Zones for Enterprise Level Governance</p><figure><img alt="Screenshot of the AWS Control Tower Console." src="https://cdn-images-1.medium.com/max/1024/1*VeLJ8Q4yqsNOeVLdwO3Xrg.png" /><figcaption>AWS Control Tower Console</figcaption></figure><h4>What is Control Tower?</h4><p>AWS Control Tower is the next step by AWS from the initial Governance focused Service released by them, known as AWS Landing Zones. Using AWS Control Tower the Company/Enterprise can deploy set of resources when creating an AWS Account in accordance to a compliance architecture they follows and automate another set of resources using the Life Cycle Events provided by the Control Tower. Control Tower uses AWS Organizations, AWS Landing Zones and AWS Service Catalog underneath to actually setup its required resources. If you want to get started with AWS Control Tower, the best document is in fact the <a href="https://docs.aws.amazon.com/controltower/latest/userguide/getting-started-with-control-tower.html">AWS Documents</a>.</p><h3>Features of Control Tower</h3><h4>Integrated Access Control</h4><figure><img alt="Screenshot of AWS Console in the Control Tower Access Control Dashboard" src="https://cdn-images-1.medium.com/max/1024/1*BBavUBmWqiEbn-T7huTtaw.png" /><figcaption>Control Tower Access Control Information</figcaption></figure><p>AWS Control Tower is integrated with AWS Single-Sign-On for access control over the governed account. The enterprise/company can easily start using the AWS SSO to manage the access to the AWS Accounts under their AWS Organizations/Control Tower. If third party credentials need to be used such as AD logins, AWS SSO provides easy integration between the two identity providers. You can learn more on AWS SSO <a href="https://aws.plainenglish.io/aws-single-sign-on-and-abac-1cbcdfeb043a">here</a>.</p><h4><strong>Account Factory</strong></h4><figure><img alt="Screenshot of the Control Tower Account Factory" src="https://cdn-images-1.medium.com/max/1024/1*z5WEJp6JLTu0_dswzzixrw.png" /><figcaption>Control Tower Account Factory</figcaption></figure><p>The Account Vending Machine which is used to create account with predefined resources are now built into the Control Tower as Account Factory with limited set of auto deployments such as creation of base network (VPC &amp; Subnets).</p><figure><img alt="Screenshot of Account Factory Deployment Options" src="https://cdn-images-1.medium.com/max/791/1*V9a-abeeWv-ID6vKfHM1xg.png" /><figcaption>Account Factory Deployment Options</figcaption></figure><p>Users can deploy additional required resources by automation with making use of the Control Tower Life Cycle Events. Using the Account factory, the users can either create new AWS Account or Onboard an existing AWS Account. Creation of AWS Account through here will not require any Credit Cards and the created account will be added under the user’s AWS Organization and will be enrolled to the Control Tower Governance Architecture.</p><figure><img alt="Screenshot of Account Factory Console" src="https://cdn-images-1.medium.com/max/927/1*446c5EfUYmGWRg2t90Htqw.png" /><figcaption>Account Factory Console</figcaption></figure><h4>Control Library (Formerly known as Guardrails)</h4><figure><img alt="Screenshot of Control Tower Guardrails" src="https://cdn-images-1.medium.com/max/1024/1*TBfrLDUGcL468NBnaU6W4w.png" /><figcaption>Control Tower Guardrails</figcaption></figure><p>I’ll be using control and guardrail both interchangeably below. Please note that both means the same. The reason I chose to do that is hoping that it will make it easier for users who used AWS Control Tower when it got first released and the new user who are hoping or starting to use.</p><p>Set of inbuilt Guardrails are provided in three different deployment categories known as “Mandatory”, “Strongly Recommended” and “Elective” Guardrails. Elective Guardrails/Controls are now divided as “Security Hub standard”, “Controls that enhance data residency protection” and “Optional controls”. These Guardrails also can be divided into two main categories based on their actions as “Preventive”, “Detective” and “Proactive” Controls Mandatory set of guardrails are deployed by default and cannot be remove/disabled. Users have the ability to decide on the other two sets as which guardrails they need. Preventive Controls are basically predefined SCPs (Service Control Policies) which applied via the AWS Organizations. The Detective Controls are AWS Config rules which uses predefined lambda functions in the back-end for evaluations. The Proactive Guardrails are also a combination of AWS Config rules and AWS CloudFormation stacks. At the moment of this article, custom guardrail option is not yet available and as per the AWS Support it’s in the roadmap of the Control Tower Development.</p><p>User/Company can select the required guardrail which they need to apply and then select the Organizational Unit (OU) or the individual account which it needs to be applied on. On the same window already applied OUs and AWS accounts are shown. Similar information is available in the Control Tower Dashboard as shown below.</p><figure><img alt="Screenshot of Control Tower Guardrails Dashboard" src="https://cdn-images-1.medium.com/max/1024/1*93Hz8tcWKsrc87GPgDwsFw.png" /><figcaption>Guardrails information on the Control Tower Dashboard</figcaption></figure><p>Guardrails are now can be found in Control Library section. Apart from the above mentioned Guardrail/Control categorizations, from JUN-2023 the Control Tower Supports Security Hub Controls also that can be activated through the Control Tower Console across your Security Hubs in the entire AWS Organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pF93kp0OKWj95VLJ00HfeA.jpeg" /><figcaption>AWS Control Library formerly known as Guardrails</figcaption></figure><p>Under the categories section you can select the Controls you need based on their objective, AWS Services or the Frameworks. As 01-JUL-2023, following frameworks are supported by AWS Control Tower;</p><ul><li>NIST 800–53 Rev 5</li><li>PCI DSS version 3.2.1</li><li>CIS AWS Benchmark 1.4</li></ul><p>If you want to see and choose your own as you need, you can select them under “All Controls” Section from the left side menu. Additional details can be found in <a href="https://docs.aws.amazon.com/controltower/latest/userguide/controls-reference.html">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ULtBLyO-uJSWClQGexq-0A.jpeg" /><figcaption>AWS Control Tower Supported Control Frameworks</figcaption></figure><h4>Activities</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QdWnsk0zihz0zex8emeKcg.jpeg" /><figcaption>All the Activities performed on the AWS Control Tower</figcaption></figure><p>This section shows all the actions that are taken by all the users through AWS Control Tower Console. Apart from the AWS Cloudtrail, the users can audit and go through the history of changes of the AWS Control Tower easily from this view.</p><h3>Landing Zone Settings</h3><figure><img alt="Screenshot of Landing Zone Configurations" src="https://cdn-images-1.medium.com/max/1024/1*k0ZMgeRmwbt71R0Pe3i1Qw.png" /><figcaption>Control Tower Landing Zone Configurations</figcaption></figure><p>Through the Landing Zone settings, the users/company can update the Control Tower to the latest available version which will include both functional and security updates. The Details sections shows the current main configuration information as shown above. The Versions tab shown above shows all the versions which Landing Zone had gone through and the Major changes of each version. If there had been an issue in the Landing Zone configurations (Control Tower Console will inform it in the Dashboard as a banner), from here you can repair them as needed.</p><p>The second tab shown in the diagram above allows the user/company to specify the regions that needs to be governed by the AWS Control Tower. From the same view, it allows the user/company to disable/deny access to regions that are not needed by your workloads to be provisioned in.</p><p>The Configurations section allows you to configure the following;</p><ul><li>KMS Key which will be used to encrypt the resources created by the Control Tower. Eg: S3 Buckets in Log Archive Account, Cloud Trail.</li><li>Enable Organizational Cloud Trail.</li><li>Link to AWS Identity Center configurations and Identity Center URL and Identity Source.</li><li>S3 Log Configurations that will be used by the buckets in Log Archive Account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8WuHkHknOWxiH8Kotgcu0A.jpeg" /><figcaption>Control Tower Configurations</figcaption></figure><p>The last section in the Landing Zone settings “Decommission” is a tab that you should go if an only if you want to remove the AWS Control Tower Landing Zone completely.</p><h4>How to Completely Remove AWS Control Tower</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x9PtBYzccwJ6INIKnkeYCQ.jpeg" /><figcaption>Decommission AWS Control Tower</figcaption></figure><p>This is an action that is irreversible and cannot be undone even by contacting the AWS Support. Earlier when the AWS Control Tower was released, this tab was not available and the user had to put an AWS Support ticket to get the feature enabled. The support ticket which requires for this can be initiated even through the Basic Support.</p><p>Before decommissioning the landing zone, it is advisable to unmanage all of your AWS Critical Workload Accounts as a precaution. Once you click on the “Decommission Landing Zone” button, you will be prompted with a dialog box requesting confirmation on multiple conditions as this is irreversible. Once you have completed the confirmations, the landing zone decommission will be initiated.</p><p>This will remove all the resources created by AWS Control Tower except for below mentioned;</p><ul><li>S3 Buckets which are created in the Log Archive account.</li><li>The CloudWatch log groups created for CloudTrail “aws-controltower/CloudTrailLogs”.</li><li>Audit and Log Archive Accounts.</li><li>Security and Sandbox OUs.</li><li>Any VPCs that is created through Control Tower Account Factory.</li></ul><p>These are not deleted in the decommission process as these can hold customer data in them and can cause severe impact if get deleted or become unstable.</p><h3>Considerations before Enabling the Control Tower</h3><p>Even though AWS Control Tower is now a mature, dependable good solution for Governance in AWS Cloud, it is not suitable for all the occasion in Cloud. Something we all should understand is that nothing is good all of us which has different use cases. Therefore, we need to individually evaluate our requirements before deploying AWS Control Tower.</p><p>Below are some of the questions which will help you in evaluating your requirements against Deploying the AWS Control Tower;</p><h4>Does the customer have existing Landing Zone?</h4><p>If so, you have to evaluate the migration process from existing Landing Zone to AWS Control Tower. Depending on the migration timelines and easiness or obstacles you have to overcome, you can decide whether deploying AWS Control Tower will actually gain additional value addition for your use case.</p><h4>What is your Home Region (Default Region) and other required governed regions?</h4><p>As of April 2023, AWS Control Tower is available in 22 AWS Regions and 2 GovCloud Regions. This may or may not include the regions which you require. Therefore, plan ahead before deploying.</p><p>Additional Regional Information can be found <a href="https://aws.amazon.com/about-aws/whats-new/2023/04/aws-control-tower-additional-regions/">here</a>.</p><h4>Do you require Customization on Mandatory Controls implemented by AWS Control Tower?</h4><p>As of today July 2023, you cannot edit or disable AWS Control Tower Mandatory Control. Therefore, if you cannot accommodate some of the mandatory controls enforced, AWS Control Tower may not be for you.</p><h4>Do you have Very High-Cost Concerns and want to disable some Services used by AWS Control Tower?</h4><p>Enabling AWS Control Tower to incur some costs based on the AWS resources it deploys underneath. This may be an additional cost burden for highly cost sensitive customer/environments. And you can’t disable some of this cost incurring services which are used by AWS Control Tower.</p><p>For example, AWS Config is a service that can increase costs when enabled, if your environment has significant no of high frequency changes as it tracks each and every resource item changes. AWS Config is a required service by AWS Control Tower and thus cannot be disabled.</p><p>However, it should be mentioned that the costs incur by AWS Config has become far reduced (better) now than the earlier days of both the services.</p><h4>If you are an AWS SSP (Solution Provider Program) Partner and you have multiple Client Accounts under one of your Billing Management Account.</h4><p>If you are an AWS SSP Partner and in your AWS Organization, you have provided AWS Accounts for multiple different clients, it is advisable not to use AWS Control Tower as it will consolidate the Auditing and Logging to centralized accounts which will be shared among your different clients which might be a violation of their privacy and security compliance required.</p><p>Above are only some of the factors which I have mentioned that you should think before enabling AWS Control Tower. Please note that there can be more and even very specific to your situations/use cases.</p><p>If you require any assistance on this, please feel free to contact me and I would love to provide my assistance. If you learn or get an idea through this article, kindly share this with your colleagues so that they can get a benefit from this. I will go through How to perform a Control Tower Landing Zone Upgrade and what can you do if you got stuck or face an error in the upgrade process in a separate article.</p><p>If you have any questions related to this article, please feel free to raise them in below GitHub Repo. You can raise your questions as an issue or a discussion. I’ll try my best to provide an answer at the earliest possible time.</p><p><a href="https://github.com/nuwanpofficial/medium-articles-qa">GitHub - nuwanpofficial/medium-articles-qa: This Repo is created for all the questions and discussions that have for the Medium Articles written by me.</a></p><p>Also, if you learn something new, please feel free to share this article with anyone who will also have a benefit. Thank you !!!</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>, </em><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><em>, and </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=989774d4849c" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/aws-control-tower-for-governance-from-personal-experience-989774d4849c">AWS Control Tower for Governance: From Personal Experience</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>