<?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 SaiSravanth M on Medium]]></title>
        <description><![CDATA[Stories by SaiSravanth M on Medium]]></description>
        <link>https://medium.com/@saisravanth.m?source=rss-e681a52ddf68------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by SaiSravanth M on Medium</title>
            <link>https://medium.com/@saisravanth.m?source=rss-e681a52ddf68------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 00:56:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saisravanth.m/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[When CloudFormation isn’t enough: custom resources, re-runnable templates and testing before you…]]></title>
            <link>https://medium.com/@saisravanth.m/when-cloudformation-isnt-enough-custom-resources-re-runnable-templates-and-testing-before-you-50bcfc794996?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/50bcfc794996</guid>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Sat, 20 Jun 2026 12:00:03 GMT</pubDate>
            <atom:updated>2026-09-30T11:17:58.403Z</atom:updated>
            <content:encoded><![CDATA[<h3>When CloudFormation isn’t enough: custom resources, re-runnable templates and testing before you deploy</h3><p>Part 8 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>Where plain CloudFormation stops</h3><p>Many organisation-wide security settings have no CloudFormation resource type, or have one that isn’t available in every Region. Examples: registering a delegated administrator, turning on auto-enable for all accounts, adding existing accounts as members, or AWS Config delivery that fails quietly. For these we use custom resources: a small Lambda function in the template that CloudFormation calls on create, update and delete.</p><h3>Four rules that make custom resources safe</h3><ul><li>Always answer CloudFormation. Wrap everything in try/except and send FAILED with the real error message. Otherwise the stack hangs for an hour.</li><li>Adopt, don’t collide. Check what already exists and reuse it, so re-deploying after a failed attempt always converges.</li><li>Never switch security off on delete. Deleting a stack must not blind the organisation.</li><li>Fail loudly. Treat only genuinely expected conditions as “skipped”; everything else fails the stack. That’s how we found every coverage gap in Part 2.</li></ul><pre>def handler(event, context):<br>    try:<br>        if event[&quot;RequestType&quot;] == &quot;Delete&quot;:<br>            data = {}  # leave the service running: removing it would blind the org<br>        else:<br>            data = configure(event[&quot;ResourceProperties&quot;])<br>        cfnresponse.send(event, context, cfnresponse.SUCCESS, data, &quot;inspector-org-config&quot;)<br>    except Exception as err:  # report every failure instead of hanging<br>        cfnresponse.send(event, context, cfnresponse.FAILED, {}, &quot;inspector-org-config&quot;,<br>                         reason=str(err))</pre><p>To re-run the function after changing its logic, add a ConfigVersion property to the custom resource and bump it. CloudFormation only calls the function when a property changes.</p><h3>Test before you deploy</h3><p>Every Lambda in our baseline has offline tests using botocore Stubber. The stubbed AWS client checks each call’s parameter names, types and allowed values against the real service model, so a typo fails on your laptop instead of in the account:</p><pre>ins = boto3.client(&quot;inspector2&quot;, region_name=&quot;ap-south-2&quot;)<br>stub = Stubber(ins)<br>stub.add_response(&quot;enable&quot;, {&quot;accounts&quot;: [], &quot;failedAccounts&quot;: []},<br>                  {&quot;accountIds&quot;: [&quot;111122223333&quot;], &quot;resourceTypes&quot;: [&quot;EC2&quot;, &quot;ECR&quot;, &quot;LAMBDA&quot;]})<br>stub.activate()<br># ...run the handler; then:<br>stub.assert_no_pending_responses()</pre><p>Stubber can’t know service rules, such as “the management account must enable GuardDuty first”. That’s why rule 4 (fail loudly) matters: those rules surface on the first deploy with a clear message.</p><h3>Real lessons from our rollout</h3><ul><li>AWS::Config::DeliveryChannel retried a rejected delivery silently for about 40 minutes. A custom resource calling PutDeliveryChannel fails in seconds with the real reason.</li><li>Async APIs need waits. Inspector’s Enable returns while the account is still ENABLING, and AssociateMember takes a minute. Poll and retry only on the known transient error.</li><li>Misleading errors: Access Analyzer reported “same name already exists” when the real problem was a missing service-linked role in the management account. Retry only on the exact message you expect.</li><li>“Update of resource type is not permitted” almost always means the wrong template on the wrong stack.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*bJdykTjgoCF3x1v0ddWWgg.png" /><figcaption>Fail fast: the rewritten Config custom resource reports the exact bucket, prefix and key that were refused, within seconds.</figcaption></figure><h3>Put it in CI</h3><p>Our repository runs these checks on every push: cfn-lint for each Region, the Stubber tests, and checkov for security misconfigurations. A template that doesn’t pass never reaches an account.</p><h3>Series wrap-up</h3><p>Across eight articles we built a centralised AWS security baseline:</p><ul><li>a dedicated Audit account and an immutable Log Archive</li><li>organisation-wide threat, vulnerability and data detection</li><li>one Security Hub view with alerts</li><li>centralised identity with MFA and no member root users</li><li>guardrails that even administrators can’t bypass</li></ul><p>It’s all CloudFormation, all reproducible, and all tested on a sandbox first.</p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li><li><a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></li><li><a href="https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9">Part 3: Logs nobody can delete (immutable Log Archive)</a></li><li><a href="https://medium.com/@saisravanth.m/centralised-identity-done-right-iam-identity-center-always-on-mfa-and-no-root-users-in-member-4e0abfe3fc04">Part 4: Centralised identity and no root users</a></li><li><a href="https://medium.com/@saisravanth.m/guardrails-even-admins-cant-bypass-5-service-control-policies-the-5-policy-limit-and-a-6fbd863113ab">Part 5: SCP guardrails even admins can’t bypass</a></li><li><a href="https://medium.com/@saisravanth.m/security-hub-across-regions-central-configuration-one-aggregation-region-and-email-alerts-for-46948ab196a9">Part 6: Security Hub across Regions, with email alerts</a></li><li><a href="https://medium.com/@saisravanth.m/how-to-write-your-own-cloudformation-template-for-a-security-control-from-a-blank-file-to-a-dfbde6785a69">Part 7: Write your own CloudFormation security template</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50bcfc794996" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write your own CloudFormation template for a security control, from a blank file to a…]]></title>
            <link>https://medium.com/@saisravanth.m/how-to-write-your-own-cloudformation-template-for-a-security-control-from-a-blank-file-to-a-dfbde6785a69?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfbde6785a69</guid>
            <category><![CDATA[aws-cloudformation]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-security]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Wed, 13 May 2026 12:00:12 GMT</pubDate>
            <atom:updated>2026-09-30T11:15:54.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to write your own CloudFormation template for a security control, from a blank file to a deployed stack</h3><p>Part 7 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>Why write your own</h3><p>Every organisation needs controls that no product ships out of the box. Writing them as CloudFormation templates makes them reviewable, repeatable and auditable: the template is the documentation of what’s deployed. This article builds a small but real control, email alerts for high-severity Security Hub findings, and explains every part.</p><h3>Three ways to get a template</h3><ul><li><strong>Write it from scratch</strong>: good for controls with rules (conditions, least privilege, safe defaults). Watch out: it takes longest and needs testing.</li><li><strong>Start from an AWS sample template</strong>: good for common patterns (VPCs, buckets, roles). Watch out: samples are rarely hardened, so review every policy.</li><li><strong>CloudFormation IaC generator (scan existing resources)</strong>: good for bringing console-built resources under code. Watch out: it captures a resource as it is, not the rules for creating it safely.</li></ul><p>Our baseline was written by hand, because a security control is mostly its rules: which account, which Region, which principal, and what happens on delete.</p><h3>Template anatomy</h3><ul><li><strong>Parameters</strong>: inputs set at deploy time, with validation. In our example: the alert email (validated by a pattern) and whether to include MEDIUM findings.</li><li><strong>Conditions</strong>: switch parts of the template on or off. In our example: AlertOnMedium.</li><li><strong>Resources</strong>: what gets created. In our example: an SNS topic and subscription, a topic policy, and an EventBridge rule.</li><li><strong>Outputs</strong>: values other stacks and people need. In our example: the topic ARN.</li><li><strong>Rules (optional)</strong>: checks across parameters before anything is created. Not needed here.</li></ul><h3>The complete example</h3><pre>AWSTemplateFormatVersion: &quot;2010-09-09&quot;<br>Description: Email alerts for high-severity Security Hub findings.<br>Parameters:<br>  AlertEmail:<br>    Type: String<br>    AllowedPattern: &#39;^[^@\s]+@[^@\s]+\.[^@\s]+$&#39;<br>    Description: Who receives the alerts.<br>  IncludeMedium:<br>    Type: String<br>    Default: &quot;false&quot;<br>    AllowedValues: [&quot;true&quot;, &quot;false&quot;]<br>    Description: Also alert on MEDIUM findings.<br>Conditions:<br>  AlertOnMedium: !Equals [!Ref IncludeMedium, &quot;true&quot;]<br>Resources:<br>  AlertsTopic:<br>    Type: AWS::SNS::Topic<br>    Properties:<br>      Subscription:<br>        - Protocol: email<br>          Endpoint: !Ref AlertEmail<br>  AlertsTopicPolicy:<br>    Type: AWS::SNS::TopicPolicy<br>    Properties:<br>      Topics: [!Ref AlertsTopic]<br>      PolicyDocument:<br>        Version: &quot;2012-10-17&quot;<br>        Statement:<br>          - Effect: Allow<br>            Principal: { Service: events.amazonaws.com }<br>            Action: sns:Publish<br>            Resource: !Ref AlertsTopic<br>            Condition:<br>              StringEquals: { aws:SourceAccount: !Ref AWS::AccountId }<br>  HighFindingsRule:<br>    Type: AWS::Events::Rule<br>    Properties:<br>      EventPattern:<br>        source: [aws.securityhub]<br>        detail-type: [Security Hub Findings - Imported]<br>        detail:<br>          findings:<br>            Severity:<br>              Label: !If [AlertOnMedium, [MEDIUM, HIGH, CRITICAL], [HIGH, CRITICAL]]<br>            Workflow:<br>              Status: [NEW]<br>            RecordState: [ACTIVE]<br>      Targets:<br>        - Id: email<br>          Arn: !Ref AlertsTopic<br>Outputs:<br>  TopicArn:<br>    Description: Other stacks can publish to this topic too.<br>    Value: !Ref AlertsTopic</pre><p>What each part does:</p><ul><li>AllowedPattern rejects a mistyped email before anything is created. Validate inputs rather than debugging a failed stack.</li><li>The topic policy lets only EventBridge publish, and only for rules in this account (aws:SourceAccount). That’s least privilege on the receiving side.</li><li>!If switches MEDIUM alerts on without a second template.</li><li>The event pattern matches only new, active findings, so resolved or suppressed ones don’t alert.</li><li>Encryption: the production version (security-alerting.yaml) encrypts the topic with a customer-managed KMS key whose policy allows EventBridge. EventBridge can’t publish to a topic encrypted with the AWS-managed SNS key.</li></ul><h3>Validate before you deploy</h3><pre>pip install cfn-lint<br>cfn-lint --regions ap-south-1 -- mini-alerts.yaml</pre><p>Lint against every Region you deploy to. Resource types differ by Region, and cfn-lint defaults to us-east-1.</p><h3>Deploy and update safely</h3><ol><li>CloudFormation → Create stack → upload the file → fill in the parameters → Create.</li><li>Check the Resources and Outputs tabs, then confirm the SNS subscription email.</li><li>To change it later: Update stack → Replace existing template → upload the new version.</li><li>Read the change set before you submit. Expect Modify rows; stop if you see an unexpected Remove.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4iWQrEkQVjKWJEGgbam99A.png" /><figcaption>A healthy change set: two Modify rows, Replacement False, nothing removed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Imt_yBLoU4i8Ym8sXUxtZg.png" /><figcaption>An unhealthy one: uploading a template onto the wrong stack would have removed five Identity Center resources. Always check the stack name in the breadcrumb.</figcaption></figure><p><em>Next</em><strong><em>:</em></strong><em> in Part 8, what to do when plain CloudFormation isn’t enough.</em></p><h3>The series</h3><p>• <a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></p><p>• <a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></p><p>• <a href="https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9">Part 3: Logs nobody can delete (immutable Log Archive)</a></p><p>• <a href="https://medium.com/@saisravanth.m/centralised-identity-done-right-iam-identity-center-always-on-mfa-and-no-root-users-in-member-4e0abfe3fc04">Part 4: Centralised identity and no root users</a></p><p>• <a href="https://medium.com/@saisravanth.m/guardrails-even-admins-cant-bypass-5-service-control-policies-the-5-policy-limit-and-a-6fbd863113ab">Part 5: SCP guardrails even admins can’t bypass</a></p><p>• <a href="https://medium.com/@saisravanth.m/security-hub-across-regions-central-configuration-one-aggregation-region-and-email-alerts-for-46948ab196a9">Part 6: Security Hub across Regions, with email alerts</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfbde6785a69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security Hub across Regions: central configuration, one aggregation Region, and email alerts for…]]></title>
            <link>https://medium.com/@saisravanth.m/security-hub-across-regions-central-configuration-one-aggregation-region-and-email-alerts-for-46948ab196a9?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/46948ab196a9</guid>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Thu, 09 Apr 2026 12:00:26 GMT</pubDate>
            <atom:updated>2026-09-30T11:13:35.174Z</atom:updated>
            <content:encoded><![CDATA[<h3>Security Hub across Regions: central configuration, one aggregation Region, and email alerts for what matters</h3><p>Part 6 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>Findings arrive from GuardDuty, Inspector, Access Analyzer, Macie and hundreds of compliance checks, in every account and every Region. Security Hub brings them into one view. It only helps, though, if it’s configured the same way everywhere and someone is told when something serious appears.</p><h3>The design</h3><ul><li>Delegated administrator: the Audit account (Part 2).</li><li>Home and aggregation Region: Mumbai. An opt-in Region such as Hyderabad can’t be the aggregation Region, so Hyderabad is linked and its findings flow to Mumbai.</li><li>Central configuration: one configuration policy, applied at the organisation root, decides that Security Hub is on, which standards run (AWS Foundational Security Best Practices and CIS by default) and which controls are disabled. New accounts inherit it.</li><li>Alerting: an EventBridge rule in the aggregation Region matches new, active HIGH and CRITICAL findings from every account and Region, and sends them to a KMS-encrypted SNS topic that emails the security team.</li></ul><h3>Deploy it with CloudFormation</h3><ul><li>security-hub.yaml in the Audit account, aggregation Region. Parameters: the root ID as the policy target, the linked Regions, and which standards to enable.</li><li>security-alerting.yaml in the Audit account, same Region. Parameters: the alert email address and the severities (HIGH,CRITICAL). Confirm the subscription email.</li><li>config-recorder.yaml in the management account, if that account should be covered too (see gotchas).</li></ul><p>The heart of the alerting template is the event pattern. It also skips sample findings, so testing never spams the team:</p><pre>EventPattern:<br>  source: [aws.securityhub]<br>  detail-type: [Security Hub Findings - Imported]<br>  detail:<br>    findings:<br>      Severity:<br>        Label: !Ref SeverityLabels        # HIGH, CRITICAL<br>      Workflow:<br>        Status: [NEW]<br>      RecordState: [ACTIVE]<br>      $or:                                # skip sample findings<br>        - Sample: [false]<br>        - Sample: [{ exists: false }]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHVlAnsBC2CTpHxuJlSnZw.png" /><figcaption>The alerting stack: a KMS key, an encrypted SNS topic with an email subscription, and the EventBridge rule.</figcaption></figure><h3>Testing the pipeline</h3><p>In the Audit account, GuardDuty → Settings → Generate sample findings creates a few hundred test findings. With the original rule, the HIGH ones arrived by email within minutes, which proved the path from GuardDuty to Security Hub to EventBridge to SNS to the inbox. Archive them afterwards (filter Sample = true → Archive). The updated rule ignores samples entirely.</p><h3>Gotchas we hit</h3><ul><li>Security Hub standards need AWS Config in every account and Region they run in. The policy fails with “standards could not be enabled … check if AWS Config is enabled”. Govern every Region you use in Control Tower (Part 1).</li><li>Control Tower never records Config in the management account. We added config-recorder.yaml for it.</li><li>Enable Security Hub in the management account before applying a central policy. Otherwise the account is locked (“only the administrator can access this operation”). To unlock it: set the account to Self-managed, enable Security Hub, then apply the policy again.</li><li>CloudFormation for Security Hub configuration policies doesn’t exist in every Region (not in Hyderabad at the time of writing). Our template uses a custom resource instead.</li></ul><h3>The result</h3><p>One Security Hub view for every account and both Regions, the same standards everywhere, and serious findings in the team’s inbox within minutes.</p><p><em>Next: in Part 7 we show how to write a template like this yourself.</em></p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li><li><a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></li><li><a href="https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9">Part 3: Logs nobody can delete (immutable Log Archive)</a></li><li><a href="https://medium.com/@saisravanth.m/centralised-identity-done-right-iam-identity-center-always-on-mfa-and-no-root-users-in-member-4e0abfe3fc04">Part 4: Centralised identity and no root users</a></li><li><a href="https://medium.com/@saisravanth.m/guardrails-even-admins-cant-bypass-5-service-control-policies-the-5-policy-limit-and-a-6fbd863113ab">Part 5: SCP guardrails even admins can’t bypass</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46948ab196a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guardrails even admins can’t bypass: 5 service control policies, the 5-policy limit, and a…]]></title>
            <link>https://medium.com/@saisravanth.m/guardrails-even-admins-cant-bypass-5-service-control-policies-the-5-policy-limit-and-a-6fbd863113ab?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fbd863113ab</guid>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <category><![CDATA[aws-security]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 12:00:09 GMT</pubDate>
            <atom:updated>2026-09-30T11:11:08.091Z</atom:updated>
            <content:encoded><![CDATA[<h3>Guardrails even admins can’t bypass: 5 service control policies, the 5-policy limit, and a sandbox-first rollout</h3><p>Part 5 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>Detection tells you something went wrong. Prevention stops it. Service control policies (SCPs) set the maximum permissions for every principal in an account. Even an account administrator can’t do what an SCP denies.</p><h3>The five guardrails</h3><ul><li><strong>Root controls (scp-root-controls.yaml)</strong>: anything done as a member-account root user; also switches on centralised root access. Attached to the organisation root.</li><li><strong>Region restriction (scp-region-restriction.yaml)</strong>: every regional API outside the approved Regions; global services keep working. Attached to the organisation root.</li><li><strong>Security protection (scp-security-protection.yaml)</strong>: leaving the organisation; disabling GuardDuty, Security Hub, Inspector, Access Analyzer or Macie; stopping CloudTrail, Config or Flow Logs; touching baseline resources or the break-glass role. Attached to the workload OUs.</li><li><strong>Service restriction (scp-service-restriction.yaml)</strong>: unapproved services, Marketplace subscriptions, Region opt-in, very expensive instance types. Attached to the workload OUs.</li><li><strong>Workload guardrails (scp-workload-guardrails.yaml)</strong>: instances without IMDSv2, turning off EBS encryption by default, IAM users and access keys, unencrypted RDS. Attached to the workload OUs.</li></ul><p>Every SCP exempts the Control Tower execution role, StackSets and the break-glass role, so automation and emergencies keep working. Deploy the break-glass role before any SCP.</p><h3>The 5-SCP limit, and where each policy goes</h3><p>A root, OU or account can have at most five SCPs attached directly. Inherited ones don’t count. Control Tower’s own guardrail SCP and FullAWSAccess already use two slots on every registered OU. So we put two SCPs on the root and three on each workload OU:</p><ul><li><strong>Organisation root</strong>: FullAWSAccess, Region restriction, deny root user. 3 of 5 slots used.</li><li><strong>Sandbox, Infrastructure, Workloads OUs</strong>: FullAWSAccess, Control Tower guardrails, security protection, service restriction, workload guardrails. 5 of 5 slots used.</li></ul><blockquote><em>Why security protection isn’t on the root: the root also covers the Audit account, where our security-service stacks legitimately update GuardDuty and Security Hub settings. An SCP there would block the baseline’s own automation.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gktd57w1IVAxjh-ITJGXEA.png" /><figcaption>The Workloads OU with its five directly attached SCPs, plus the two inherited from the root.</figcaption></figure><h3>Deploy it with CloudFormation: sandbox first</h3><pre>RegionRestriction:<br>  Type: AWS::Organizations::Policy<br>  Properties:<br>    Type: SERVICE_CONTROL_POLICY<br>    TargetIds: !Ref TargetIds          # start with one sandbox account<br>    Content:<br>      Version: &quot;2012-10-17&quot;<br>      Statement:<br>        - Sid: DenyOutsideAllowedRegions<br>          Effect: Deny<br>          NotAction: !Ref GlobalServiceActions<br>          Resource: &quot;*&quot;<br>          Condition:<br>            StringNotEquals: { aws:RequestedRegion: !Ref AllowedRegions }<br>            ArnNotLike: { aws:PrincipalARN: !Ref ExemptPrincipalArns }</pre><ol><li>Create a sandbox account (Control Tower Account Factory) in the Sandbox OU.</li><li>Deploy each SCP stack from the management account with TargetIds set to the sandbox account ID, or to the Sandbox OU for the OU-level ones.</li><li>Sign in to the sandbox as an administrator and try to break each rule (below).</li><li>When every test behaves, update each stack’s TargetIds to the final targets. The change set shows a single Modify: the same policy, new attachments.</li></ol><h3>Proving it works</h3><ul><li><strong>Create an S3 bucket in us-east-1</strong>: denied by the Region restriction.</li><li><strong>Create an IAM user</strong>: denied — explicit deny in a service control policy.</li><li><strong>Turn off EBS encryption by default</strong>: denied.</li><li><strong>Launch EC2 with IMDSv1 allowed</strong>: denied — explicit deny in a service control policy.</li><li><strong>Leave the organisation</strong>: denied.</li><li><strong>Launch EC2 with IMDSv2 only</strong>: allowed — normal work is unaffected.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B9iPc1OOiYdHytPi7tRlsg.png" /><figcaption>Even a full administrator can’t create an IAM user: “explicit deny in a service control policy”.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oksNVTakUEsijYuPvZHtZw.png" /><figcaption>Launching an instance that allows IMDSv1 is blocked by the workload guardrails SCP.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*s3LmYPGUxQhL0PEQjjerGg.png" /><figcaption>Creating a bucket outside the approved Regions fails.</figcaption></figure><h3>Gotchas we hit</h3><ul><li>The template Rules section accepts only rule functions (Fn::EachMemberEquals, Fn::Contains, …). Fn::Join there fails at upload, and cfn-lint doesn’t catch it.</li><li>SCPs never apply to the management account. Protect it with MFA and minimal use instead.</li><li>Include every Region your security services use in the allowed list. Leaving out Mumbai would have blocked our own Macie and Security Hub.</li></ul><p><em>Next: in Part 6 we pull all findings into one Security Hub view and send the serious ones by email.</em></p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li><li><a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></li><li><a href="https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9">Part 3: Logs nobody can delete (immutable Log Archive)</a></li><li><a href="https://medium.com/@saisravanth.m/centralised-identity-done-right-iam-identity-center-always-on-mfa-and-no-root-users-in-member-4e0abfe3fc04">Part 4: Centralised identity and no root users</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fbd863113ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Centralised identity done right: IAM Identity Center, always-on MFA and no root users in member…]]></title>
            <link>https://medium.com/@saisravanth.m/centralised-identity-done-right-iam-identity-center-always-on-mfa-and-no-root-users-in-member-4e0abfe3fc04?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e0abfe3fc04</guid>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <category><![CDATA[aws-security]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 12:00:59 GMT</pubDate>
            <atom:updated>2026-09-30T11:08:50.061Z</atom:updated>
            <content:encoded><![CDATA[<h3>Centralised identity done right: IAM Identity Center, always-on MFA and no root users in member accounts</h3><p>Part 4 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>In a multi-account organisation, IAM users in each account quickly become unmanageable, and every account comes with a root user that can do anything. Centralised identity means one place to sign in, least-privilege roles per job, MFA for everyone, and root locked away.</p><h3>What we set up</h3><ul><li>IAM Identity Center (enabled by Control Tower) as the single sign-in, through the AWS access portal.</li><li>Custom permission sets for the security team, deployed with CloudFormation.</li><li>Always-on MFA for every Identity Center sign-in.</li><li>Centralised root access: member accounts have no root credentials at all.</li><li>A break-glass role in every account, requiring MFA, for emergencies only.</li></ul><h3>Deploy it with CloudFormation</h3><p>identity-center.yaml creates three permission sets and assigns them to a security-team group:</p><ul><li><strong>SecurityOperator</strong>: manage findings in GuardDuty, Security Hub, Inspector, Access Analyzer, Macie and Detective. Assigned to the security team on the Audit account.</li><li><strong>SecurityLogReader</strong>: read-only access to logs, plus Athena and KMS decrypt through S3 only (2-hour sessions). Assigned to the security team on the Log Archive account.</li><li><strong>SecurityAuditor</strong>: read-only security review (SecurityAudit + ViewOnlyAccess). Ready for auditors.</li></ul><pre>SecurityOperatorPermissionSet:<br>  Type: AWS::SSO::PermissionSet<br>  Properties:<br>    InstanceArn: !Ref InstanceArn<br>    Name: SecurityOperator<br>    SessionDuration: PT4H<br>    ManagedPolicies:<br>      - arn:aws:iam::aws:policy/SecurityAudit<br>    InlinePolicy:        # inline: AWS managed &quot;FullAccess&quot; policies get renamed over time<br>      Version: &quot;2012-10-17&quot;<br>      Statement:<br>        - Effect: Allow<br>          Action: [guardduty:*, securityhub:*, inspector2:*, access-analyzer:*, macie2:*, detective:*]<br>          Resource: &quot;*&quot;</pre><ol><li>In Identity Center, copy the Instance ARN (Settings) and create a security-team group; copy its Group ID.</li><li>In the management account, create the stack from identity-center.yaml with the Instance ARN, Group ID, and the Audit and Log Archive account IDs.</li><li>Add people to the group, then sign in through the access portal. The new roles appear per account.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSuY5SjfU5ZaUYY-Q4DtyQ.png" /><figcaption>The AWS access portal: one sign-in, with SecurityOperator on the Audit account and SecurityLogReader on the Log Archive account.</figcaption></figure><h3>MFA and root: the console settings</h3><ul><li>Identity Center → Settings → Authentication → MFA: prompt every time they sign in; allow passkeys, security keys and authenticator apps; require registration at first sign-in.</li><li>Management account root user: MFA device registered, no access keys. SCPs can’t restrict the management account, so this matters most.</li><li>IAM → Root access management: enable root credentials management and privileged root actions, then delete the root credentials of every member account. If root is ever truly needed, the security team opens a short, task-scoped root session from the management account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7kyVB2me3Nuku6N33mWSw.png" /><figcaption>Identity Center MFA: always on, with registration required at first sign-in.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*je5yTmlKjfx-4hZdokrEgA.png" /><figcaption>Centralised root access: the member accounts have no root credentials (“Not present”).</figcaption></figure><h3>Gotchas we hit</h3><ul><li>AWS managed policies get renamed. AmazonGuardDutyFullAccess no longer exists, which broke our first deployment. Inline policies in permission sets avoid that.</li><li>Account Factory fails when you’re signed in as root. Its Service Catalog portfolio is shared with the SSO admin role, so work through the access portal.</li><li>The root user and your Identity Center user can share an email but are separate identities. Use the portal day to day and keep root locked away.</li></ul><p><em>Next: in Part 5 we add guardrails that even an administrator can’t bypass.</em></p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li><li><a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></li><li><a href="https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9">Part 3: Logs nobody can delete (immutable Log Archive)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e0abfe3fc04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logs nobody can delete: building an immutable Log Archive with Object Lock, KMS and…]]></title>
            <link>https://medium.com/@saisravanth.m/logs-nobody-can-delete-building-an-immutable-log-archive-with-object-lock-kms-and-7025ce135bc9?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/7025ce135bc9</guid>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-security]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Sun, 18 Jan 2026 12:00:28 GMT</pubDate>
            <atom:updated>2026-09-30T11:06:41.058Z</atom:updated>
            <content:encoded><![CDATA[<h3>Logs nobody can delete: building an immutable Log Archive with Object Lock, KMS and organisation-only access</h3><p>Part 3 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>Logs are only evidence if nobody, including an administrator, can change or delete them. Control Tower already sends CloudTrail and AWS Config logs to its own buckets in the Log Archive account. We added a second, hardened bucket for everything else our security services export: GuardDuty findings, Macie discovery results, VPC Flow Logs and AWS Config from accounts Control Tower doesn’t record.</p><h3>What makes the bucket tamper-proof</h3><ul><li><strong>S3 Object Lock (default retention)</strong>: objects can’t be deleted or overwritten during the retention period.</li><li><strong>Customer-managed KMS key</strong>: encryption with a key whose policy we control, per log source.</li><li><strong>All four Block Public Access settings + BucketOwnerEnforced</strong>: no public access and no ACL tricks.</li><li><strong>Deny non-TLS requests</strong>: no unencrypted transport.</li><li><strong>Deny principals outside the organisation</strong>: nobody outside our AWS Organization can touch it.</li><li><strong>Deny lifecycle, versioning and lock changes (except break-glass/admin roles)</strong>: retention can’t be shortened quietly.</li><li><strong>One least-privilege Allow statement per writer</strong>: each service can write only to its own prefix, only from our accounts.</li><li><strong>Access logging, Glacier tiering and expiry</strong>: who read the logs is recorded, and storage cost stays low.</li></ul><h3>Deploy it with CloudFormation</h3><p>Two key excerpts from log-archive-bucket.yaml. First, Object Lock and encryption on the bucket:</p><pre>SecurityLogsBucket:<br>  Type: AWS::S3::Bucket<br>  DeletionPolicy: Retain<br>  Properties:<br>    ObjectLockEnabled: true<br>    ObjectLockConfiguration:<br>      ObjectLockEnabled: Enabled<br>      Rule:<br>        DefaultRetention:<br>          Mode: !Ref ObjectLockMode       # GOVERNANCE or COMPLIANCE<br>          Days: !Ref ObjectLockDays<br>    BucketEncryption:<br>      ServerSideEncryptionConfiguration:<br>        - ServerSideEncryptionByDefault:<br>            SSEAlgorithm: aws:kms<br>            KMSMasterKeyID: !GetAtt SecurityLogsKey.Arn<br>          BucketKeyEnabled: true</pre><p>Second, the organisation-only guardrail in the bucket policy. AWS services are exempt from this deny because they are granted separately, each by its own statement:</p><pre>- Sid: DenyPrincipalsOutsideOrganization<br>  Effect: Deny<br>  Principal: &quot;*&quot;<br>  Action: s3:*<br>  Resource: [!GetAtt SecurityLogsBucket.Arn, !Sub &quot;${SecurityLogsBucket.Arn}/*&quot;]<br>  Condition:<br>    StringNotEqualsIfExists: { aws:PrincipalOrgID: !Ref OrgId }<br>    BoolIfExists: { aws:PrincipalIsAWSService: &quot;false&quot; }</pre><ol><li>Sign in to the Log Archive account and pick the Region (one bucket per Region you export from).</li><li>Create stack → upload log-archive-bucket.yaml.</li><li>Parameters: your organisation ID, the Audit account ID (the security tooling account), and which sources to allow (GuardDuty, Macie only where Macie runs, VPC Flow Logs, and optionally Config from the management account).</li><li>Choose Object Lock mode and days. GOVERNANCE lets break-glass roles override it; COMPLIANCE can’t be overridden by anyone, including root.</li><li>Create, then copy the Outputs (bucket ARN and key ARN) into the GuardDuty and Macie stacks.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xu3frIyTO9LOfxmwSLS4Kg.png" /><figcaption>Stack outputs: the bucket and KMS key that the GuardDuty, Macie and Config stacks write to.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FzXXGXzi68j5xKNPICGqMw.png" /><figcaption>Parameters: log sources, retention and Object Lock settings are all switches, with no template edits needed.</figcaption></figure><h3>Gotchas we hit</h3><ul><li>Macie checks the repository with the caller’s permissions too, not just Macie’s. The Audit account needed its own scoped S3 and KMS access to the results prefix.</li><li>The server access log bucket can’t use SSE-KMS, so it gets SSE-S3 and its own policy.</li><li>AWS Config with a custom IAM role writes as that role, not as config.amazonaws.com. Use the Config service-linked role so the service-principal statement applies.</li><li>Start with a short Object Lock period in a sandbox. Locked objects can’t be deleted until retention ends.</li></ul><h3>The result</h3><p>A central, encrypted, write-once store where every security export lands, and where retention can’t be quietly shortened. That’s the evidence trail an auditor wants to see.</p><p><em>Next: in Part 4 we centralise identity: one sign-in, MFA always on, and no root users in member accounts.</em></p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li><li><a href="https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab">Part 2: One account to see every threat (delegated admin)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7025ce135bc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One account to see every threat: delegated admin for GuardDuty, Security Hub, Inspector, Access…]]></title>
            <link>https://medium.com/@saisravanth.m/one-account-to-see-every-threat-delegated-admin-for-guardduty-security-hub-inspector-access-e8c195b1cdab?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8c195b1cdab</guid>
            <category><![CDATA[aws-cloudformation]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-security]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Sun, 21 Dec 2025 12:00:05 GMT</pubDate>
            <atom:updated>2026-09-30T11:03:36.506Z</atom:updated>
            <content:encoded><![CDATA[<h3>One account to see every threat: delegated admin for GuardDuty, Security Hub, Inspector, Access Analyzer and Macie</h3><p>Part 2 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>Enabling a security service in each account separately gives you ten dashboards and no overview. Worse, whoever administers a workload account can switch the service off. The fix is the delegated administrator pattern: the management account hands each service to the Audit account, which then enables it for every account in the organisation, including accounts created in the future.</p><h3>What we centralise</h3><ul><li><strong>Amazon GuardDuty</strong>: threats such as compromised credentials, crypto-mining, malware and suspicious API calls. Regions: Hyderabad and Mumbai.</li><li><strong>AWS Security Hub</strong>: one view of all findings plus compliance checks (FSBP, CIS). Region: Mumbai (aggregates Hyderabad).</li><li><strong>Amazon Inspector</strong>: vulnerabilities in EC2, container images and Lambda. Region: Hyderabad.</li><li><strong>IAM Access Analyzer</strong>: resources shared outside the organisation, and unused access. Region: Hyderabad.</li><li><strong>Amazon Macie</strong>: sensitive data such as PII in S3. Region: Mumbai (not available in Hyderabad).</li></ul><h3>Deploy it with CloudFormation</h3><p>It takes two kinds of template:</p><ul><li>delegated-admin.yaml in the management account, once per Region. It enables trusted access in AWS Organizations and registers the Audit account as administrator for each service you switch on.</li><li>One template per service in the Audit account (guardduty.yaml, security-hub.yaml, inspector.yaml, access-analyzer.yaml, macie.yaml). Each one enables the service organisation-wide, sets auto-enable for new accounts, and applies our settings (for example, every GuardDuty protection plan and findings export to the Log Archive).</li></ul><p>Each template takes just a few parameters. For GuardDuty, for example:</p><ul><li><strong>AutoEnableMembers</strong>: ALL — existing and future accounts are covered automatically.</li><li><strong>S3Protection, EksAuditLogs, EbsMalwareProtection, RdsProtection, LambdaProtection</strong>: true — every protection plan the Region supports.</li><li><strong>RuntimeMonitoring</strong>: false (optional) — billed per vCPU; switch on when workloads need it.</li><li><strong>ExportBucketArn / ExportKmsKeyArn</strong>: the Log Archive bucket and key — findings kept in the immutable log store (Part 3).</li></ul><h3>The gaps AWS auto-enable leaves, and how the templates close them</h3><p>When we checked coverage account by account, three things were missing even though auto-enable was on:</p><ul><li>The management account is never auto-enrolled. GuardDuty only accepts it as a member once it has its own detector, and Security Hub must be enabled there before a central policy can manage it. Our delegated-admin.yaml now switches both on in the management account first.</li><li>Auto-enable doesn’t retry. Our sandbox account was created before its opt-in Region was active, so GuardDuty marked it “Region disabled” and never tried again. The GuardDuty template now re-adds any active account that isn’t an enabled member on every run.</li><li>A service’s own member list isn’t the full picture. Inspector’s member list left out accounts it had never associated. Our templates now read the account list from AWS Organizations, which the delegated admin is allowed to do.</li></ul><blockquote><em>Every template also reports what it did in its Outputs, for example GuardDuty’s MembersAdded and MemberIssues, and fails with the real AWS error instead of silently succeeding. That’s how we found these gaps.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jRhHNBYTQ7dI0TvGgqM3Rw.png" /><figcaption>Inspector after the fix: management, Audit, Log Archive and the new sandbox account all activated for EC2, ECR and Lambda scanning.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R0iB_RXXaFRJ4tlehrM7cQ.png" /><figcaption>Macie in the Audit account: member accounts enabled automatically (Macie can’t include the management account; that’s by design).</figcaption></figure><p><strong>The result</strong><br>One Audit account sees every threat, vulnerability and sensitive-data finding across all accounts and both Regions. A new account is enrolled without anyone touching it.</p><p><em>Next: in Part 3 we build the place where all of this evidence is kept: a Log Archive nobody can tamper with.</em></p><h3>The series</h3><ul><li><a href="https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524">Part 1: A dedicated audit account with Control Tower in one stack</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8c195b1cdab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why every AWS organisation needs a dedicated audit account, and how we built one with Control Tower…]]></title>
            <link>https://medium.com/@saisravanth.m/why-every-aws-organisation-needs-a-dedicated-audit-account-and-how-we-built-one-with-control-tower-611f9e770524?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/611f9e770524</guid>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-cloudformation]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Sat, 15 Nov 2025 12:00:13 GMT</pubDate>
            <atom:updated>2026-09-30T11:01:03.972Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why every AWS organisation needs a dedicated audit account, and how we built one with Control Tower in a single CloudFormation stack</h3><p>Part 1 of 8: Building a centralised AWS security baseline with CloudFormation</p><h3>The problem</h3><p>Most AWS environments start as one account. Workloads, logs, admin users and security tools all live together. That is convenient until an audit asks: who can delete the logs? Where do you see findings for all accounts? Could an attacker who owns one workload switch off your detection?</p><p>The answer auditors expect is centralisation: deployment, logging, identity and security findings managed from dedicated accounts that run no workloads. This series shows how we built exactly that, end to end, with CloudFormation templates you can deploy from the console.</p><h3>The account model</h3><ul><li><strong>Management</strong>: organisation, Control Tower, Identity Center, guardrails (SCPs). Runs no workloads.</li><li><strong>Audit (Security OU)</strong>: delegated administrator for every security service; receives all findings and alerts. No workloads — audit and security only.</li><li><strong>Log Archive (Security OU)</strong>: immutable store for CloudTrail, Config and security logs. No workloads — logs only.</li><li><strong>Workload accounts (Sandbox, Infrastructure, Workloads OUs)</strong>: applications, enrolled in security services and guarded automatically. These run the workloads.</li></ul><p>The key idea: the Audit and Log Archive accounts hold no live resources. They exist only to observe and to keep evidence, so compromising a workload account gives an attacker no way to hide their tracks.</p><h3>Why Control Tower, and why one stack</h3><p>AWS Control Tower sets up the multi-account landing zone: the organisation-wide CloudTrail trail, AWS Config, the Log Archive and Audit accounts, and baseline controls on every registered OU. Since landing zone 4.0 it can be created entirely through the API, which means through CloudFormation (AWS::ControlTower::LandingZone).</p><p>We packaged everything into one template that can be deployed from the CloudFormation console:</p><ul><li>the organisation (or reuse of an existing one)</li><li>the Security OU with brand-new Log Archive and Audit accounts</li><li>opting those accounts into the home Region (we used Hyderabad, ap-south-2, an opt-in Region)</li><li>the Control Tower IAM roles and a customer-managed KMS key for log encryption</li><li>the landing zone itself, then the workload OUs registered with Control Tower</li></ul><h3>Deploy it with CloudFormation</h3><p>The heart of the template is the landing zone resource and its manifest:</p><pre>LandingZone:<br>  Type: AWS::ControlTower::LandingZone<br>  DeletionPolicy: Retain        # a stack delete must never decommission the landing zone<br>  Properties:<br>    Version: &quot;4.0&quot;<br>    Manifest:<br>      governedRegions: !Ref GovernedRegions      # e.g. ap-south-2,ap-south-1<br>      centralizedLogging:<br>        enabled: true<br>        accountId: !GetAtt LogArchiveAccount.AccountId<br>        configurations:<br>          loggingBucket: { retentionDays: 365 }<br>          kmsKeyArn: !GetAtt ControlTowerKey.Arn<br>      config:<br>        enabled: true<br>        accountId: !GetAtt AuditAccount.AccountId</pre><ol><li>Sign in to the management account and switch to the Region that will be your Control Tower home Region. It can’t be changed later.</li><li>CloudFormation → Create stack → upload landing-zone-complete.yaml.</li><li>Fill in the parameters (below) and tick the IAM acknowledgement.</li><li>Create the stack. A full landing zone takes a few hours; the stack waits for Control Tower to finish.</li><li>Check Control Tower → Organization: every OU should show its baseline as Enabled.</li></ol><ul><li><strong>CreateOrganization</strong>: true for a brand-new account; false if AWS Organizations already exists.</li><li><strong>LogArchiveAccountEmail / AuditAccountEmail</strong>: two new email addresses that have never been used for an AWS account.</li><li><strong>GovernedRegions</strong>: every Region you will use, including the home Region (e.g. ap-south-2,ap-south-1).</li><li><strong>EnableKmsEncryption</strong>: true encrypts CloudTrail and Config logs with a customer-managed key.</li><li><strong>RegisterWorkloadOus</strong>: true creates and registers Sandbox, Infrastructure, Workloads and Suspended OUs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e3tjZ2GR6iU9D66tbEbEbw.png" /><figcaption>Control Tower after deployment: every workload OU registered with its baseline enabled, and the Security OU managed by the landing zone.</figcaption></figure><h3>Gotchas we hit</h3><ul><li>Brand-new accounts can’t be named in a KMS key policy while they are being created. Use Principal: “*” with an aws:PrincipalAccount condition instead.</li><li>Opt-in home Region: the new Log Archive and Audit accounts must be opted into that Region before the landing zone is created. The template does this with a small custom resource.</li><li>Emails are single-use. If an account creation fails and the account is closed, that email can never be used for AWS again. Keep spare aliases.</li><li>Govern every Region you use. Control Tower only records AWS Config in governed Regions, and Security Hub’s compliance checks need Config.</li></ul><h3>The result</h3><p>In one stack: a multi-account organisation with a dedicated, workload-free Audit account and Log Archive, organisation-wide logging and baseline controls, all reproducible for the next customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7QKtUp5P3dvc-7C2Crz1vw.png" /><figcaption><em>A new workload account created through Account Factory lands in the Sandbox OU and is governed immediately.</em></figcaption></figure><p><strong><em>Next</em></strong><em>: in Part 2 we hand every security service to the Audit account, so one place sees threats across all accounts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=611f9e770524" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Perform Vulnerability Assessments Using Amazon Inspector Classic]]></title>
            <link>https://blog.axiomio.com/how-to-perform-vulnerability-assessments-using-amazon-inspector-classic-c8f52534cc43?source=rss-e681a52ddf68------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8f52534cc43</guid>
            <category><![CDATA[assessment-tools]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[amazon-inspector]]></category>
            <dc:creator><![CDATA[SaiSravanth M]]></dc:creator>
            <pubDate>Tue, 28 Dec 2021 09:51:03 GMT</pubDate>
            <atom:updated>2021-12-28T10:06:41.226Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, it’s critical to prevent data breaches in your cloud-based infrastructure. Missing assessing security checkpoints can give a free road to the attackers. That said, the all-new Amazon Inspector Classic, a cloud-based vulnerability assessment tool, tests the network accessibility of your Amazon EC2 instances and the security state of your applications that run on those instances.</p><p>Amazon Inspector Classic assesses applications for exposure, vulnerabilities, and deviations from best practices. It assesses targets (collections of AWS resources) for potential security issues and vulnerabilities. It compares the behavior and the security configuration of the assessment targets to selected security rules packages.</p><p>In this article, we will dig deeper into how we can perform a vulnerability assessment using Amazon Inspector Classic.</p><h3><strong>Rules Packages in Amazon Inspector Classic</strong></h3><p>An Amazon Inspector assessment can use any combination of the following rules packages:</p><p><strong>Network Assessments:</strong></p><p>· <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_network-reachability.html"><strong>Network Reachability</strong></a>: The Network Reachability rules package uses the latest technology to find security vulnerabilities of your EC2 instances. The Amazon Inspector generates findings and provides all guidance about restricting access that is not secure.</p><p><strong>Host Assessments:</strong></p><p>· <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_cves.html"><strong>Common vulnerabilities and exposures</strong></a>: This package helps you verify whether the EC2 instances in your assessment targets are exposed to common vulnerabilities and exposures (CVEs). It provides a reference method for publicly known information security vulnerabilities and exposures.</p><p>· <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_cis.html"><strong>Center for Internet Security (CIS) Benchmarks</strong></a>: The CIS Security Benchmarks program provides well-defined and unbiased best practices to help organizations assess, analyze and improve their security.</p><p>· <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_security-best-practices.html"><strong>Security best practices for Amazon Inspector Classic</strong></a>: This rules package helps you determine whether your systems are configured securely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hl-n2-sLfm4sBCyIo-UtOQ.png" /></figure><h4>Prerequisites for Using Amazon Inspector Classic</h4><p>· You must have at least one Amazon EC2 instance running in your AWS environment to run an Amazon Inspector Classic assessment.</p><p>· The Amazon Inspector agent must be running on each EC2 instance.</p><h3>How to Perform Amazon Inspector Assessments</h3><ol><li>If you are using the Amazon Inspector Classic for the first time, click on <strong>Get Started,</strong> and on the <strong>Welcome</strong> page, choose <strong>Advanced setup</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*OXbPJiY6hbQTlJ1Kw45V7A.png" /></figure><p>2. On the <strong>Define an assessment target</strong> page, enter the name of your assessment target.</p><p>3. For <strong>All Instances</strong>, you can keep the check box selected to include all EC2 instances in your AWS account and Region in the assessment target. If you want to choose which EC2 instances to include, clear the <strong>All Instances</strong> check box, and enter the <strong>Key</strong> and <strong>Value</strong> tags that are associated with the target EC2 instances.</p><p>4. For <strong>Install Agents</strong>, you can keep the check box selected by default if your instances do not have Inspector Classic Agent installed.</p><p>5. Choose <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*LHts9i0nJ9-ZV6idhYry8Q.png" /></figure><p>6. On the <strong>Define an assessment template</strong> page, enter the name of your assessment template.</p><p>7. For <strong>Rules packages</strong>, choose the rules packages to include in the assessment template. You can select multiple rule packages to run on the target.</p><p>8. For <strong>Duration</strong>, choose the duration of your assessment run.</p><p>9. For the <strong>Assessment Schedule</strong>, you can set a schedule for recurring assessment runs or you can uncheck the option.</p><p>10. Choose <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*OSutJDXLKDzjJ6TAd_v1-g.png" /></figure><p>11. On the <strong>Review</strong> page, review your choices for the assessment target and template. If you are satisfied with the configuration, choose <strong>Create</strong>. If you set an assessment schedule for your assessment template, the assessment automatically runs after you choose <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*023hwbXQ5VmfmC9J3X7kFg.png" /></figure><p>12. If you did not set up an assessment schedule, navigate to your assessment template through the console, and then choose <strong>Run</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*DsPHwwewzN7yRYFepe1z-Q.png" /></figure><p>13. Track the progress of the assessment run, in the navigation pane of the console, choose <strong>Assessment runs</strong>, and then choose <strong>Findings</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*p3ij5v_Y0KPsY_NnGEBr5Q.png" /></figure><p>You can now view the assessment findings.</p><h3><strong>Conclusion</strong></h3><p>Preventing risks and vulnerabilities in your system is essential. With Amazon Inspector Classic, assessing for anomalies in your system becomes easy. By following the above-mentioned steps, you can easily perform a vulnerability assessment and build preventive measures that can prove a firewall for security breaches and hackings.</p><p>You can also learn more about performing a vulnerability assessment using Amazon Inspector Classic by <a href="https://www.axiomio.com/contact">contacting our experts</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8f52534cc43" width="1" height="1" alt=""><hr><p><a href="https://blog.axiomio.com/how-to-perform-vulnerability-assessments-using-amazon-inspector-classic-c8f52534cc43">How to Perform Vulnerability Assessments Using Amazon Inspector Classic</a> was originally published in <a href="https://blog.axiomio.com/">AXIOMIO</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>