<?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 Seshu Pasam on Medium]]></title>
        <description><![CDATA[Stories by Seshu Pasam on Medium]]></description>
        <link>https://medium.com/@seshu?source=rss-cc1a99dd4a50------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bOBHAWofMBMgLE5mZ-t_oQ.jpeg</url>
            <title>Stories by Seshu Pasam on Medium</title>
            <link>https://medium.com/@seshu?source=rss-cc1a99dd4a50------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 20:49:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@seshu/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[Get Your Ducks in a Row: Analyzing AWS VPC flow logs with DuckDB]]></title>
            <link>https://medium.com/@seshu/get-your-ducks-in-a-row-analyzing-aws-vpc-flow-logs-with-duckdb-0ef3d3465a67?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ef3d3465a67</guid>
            <category><![CDATA[flow-logs]]></category>
            <category><![CDATA[duckdb]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 19:51:28 GMT</pubDate>
            <atom:updated>2024-09-29T19:51:28.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SV03rNJhhGEmUmcznBfm-w.jpeg" /><figcaption>VPC Flow Logs and DuckDB. Image generator: Canva</figcaption></figure><p><a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html">AWS VPC flow logs</a> provide a lot of value for troubleshooting network setup, analyzing traffic patterns, bottlenecks and for security analytics. At a high level these can provide valuable insights for Ops, SRE, Security, FinOps teams. Unfortunately enabling flow logs can sometimes be a costly proposition. Let’s look at some use-cases where we can leverage these without breaking the bank</p><h3>Flow Logs</h3><p>The cheapest option is to setup VPC flow logs logging to S3 bucket. Logging to CloudWatch Logs can cost more than 20 times. Scanning the data with CloudWatch Insights will cost even more. What is the point of logging if one can’t query or get insights :). I usually <strong>avoid</strong> CloudWatch unless that is the only logging option (Lambda’s, etc.) Once setup, logging to S3 bucket will show up in the bill under <strong>CloudWatch &gt; [Region]-S3-Egress-Bytes</strong>. Depending on the damage, one can figure out whether to keep it or turn it on/off when necessary.</p><p>Settings I recommend:</p><ul><li>Filter: All</li><li>Maximum aggregation interval: 10 minutes</li><li>Destination: S3</li><li>Log record format: Custom</li><li>Log file format: Parquet</li><li>Hive-compatible S3 prefix: Enable</li><li>Partition logs by time: Every 1 hour</li></ul><p>Let’s dwell into the <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html">Log format fields</a> that are useful. ecs-* fields can be included if ECS service is used</p><ul><li>start, end</li><li>action, log-status, protocol, flow-direction, traffic-path</li><li>account-id, region, az-id, instance-id, interface-id, subnet-id</li><li>bytes, packets, tcp-flags</li><li>srcaddr, srcport, dstaddr, dstport, pkt-srcadd, pkt-dstaddr</li><li>pkt-dst-aws-service, pkt-src-aws-service</li></ul><h3>Setup</h3><p>In my last gig, I did VPC analysis using <a href="https://clickhouse.com/">ClickHouse</a>. Anything that leverages columnar storage format is ideal for VPC flow logs because it compresses nicely. This is where <a href="https://parquet.apache.org/">parquet</a> comes into play. AWS supports saving logs in parquet and DuckDB can directly consume these files. First, let’s get some data that will help later in the analysis. Assuming EC2 instances are tagged, identify the tag key that groups the instances. For example: If Nginx is used as a reverse proxy, one might have them tagged as role: proxy . Get the instance Ids, private IP address and the value of the role tag key. I do something like the following to capture this information in a TSV file:</p><pre>for i in us-east-1 us-west-2 &lt;all regions with instances&gt;; do<br>    aws ec2 describe-instances \<br>        --filters Name=vpc-id,Values=vpc-1234,vpc-abcd,&lt;all vpcs&gt; \<br>        --query &#39;Reservations[*].Instances[*].{instance:InstanceId,ip:PrivateIpAddress,role:Tags[?Key==`role`]|[0].Value}&#39; \<br>        --output text \<br>        --region $i<br>done &gt; instances.tsv</pre><p>In the instances.tsv file, add a header line (separated by tabs) so that DuckDB can use those as column names:</p><pre>instance\tip\trole</pre><p>Fire up an EC2 instance (I use 8 vCPUs / 64 GB) in the same region where an S3 bucket with VPC flow logs exists. Make sure to attach an instance profile role that allows the instance to read data from flow log bucket. Use a bigger EBS volume (100 GB) depending on how much flow log data is being ingested. <a href="https://duckdb.org/docs/installation/index">Install DuckDB</a> on the instance. Copy instances.tsv to the EC2 instance. Fire up duckdb CLI with a DB name and run the following SQL (replace the paths, region, year, month, day and other details as appropriate)</p><pre>PRAGMA max_temp_directory_size=&#39;100GiB&#39;;<br>PRAGMA temp_directory=&#39;/home/ec2-user/tmp&#39;;<br><br>INSTALL httpfs;<br><br>LOAD httpfs;<br><br>CREATE SECRET s3 (<br>  TYPE S3,<br>  PROVIDER CREDENTIAL_CHAIN,<br>  CHAIN &#39;instance&#39;,<br>  REGION &#39;us-west-2&#39;<br>);<br><br>CREATE TABLE flowlogs AS (<br>  SELECT *<br>  FROM read_parquet(&#39;s3://my-vpcflowlogs-bucket/prefix/AWSLogs/aws-account-id=123456789012/aws-service=vpcflowlogs/aws-region=us-west-2/*/*/*/*.parquet&#39;, hive_partitioning = true)<br>  WHERE year = 2024 AND month = 05 AND day = 31);<br><br>CREATE TABLE instances AS (<br>    SELECT *<br>    FROM read_csv(&#39;/home/ec2-user/instances.csv&#39;));<br><br>CREATE VIEW logs AS (<br>    SELECT f.*, i.role AS srcrole, j.role AS dstrole<br>    FROM flowlogs f<br>    LEFT OUTER JOIN instances i<br>        ON f.instance_id = i.instance<br>    LEFT OUTER JOIN instances j<br>        ON f.pkt_dstaddr = j.ip);<br><br>CHECKPOINT;</pre><p>Once this is done, the DuckDB database file can be copied from the instance for offline analysis and the EC2 instance can be terminated. The DB now has a view called logs that is enriched with the role information. Let’s examine some use-cases.</p><h3>Analyze</h3><h4>Right sizing Security Group outbound rules to the Internet</h4><pre>SELECT DISTINCT srcrole, dstport, protocol<br>FROM logs<br>WHERE log_status = &#39;OK&#39;<br>    AND action = &#39;ACCEPT&#39;<br>    AND flow_direction = &#39;egress&#39;<br>    AND dstaddr NOT LIKE &#39;10.%&#39;<br>    AND dstport &lt; 32768<br>    ORDER BY srcrole, dstport;</pre><p>This will need to be tweaked to exclude VPC CIDRs (in my case 10/8) and ephemeral port range.</p><h4>Which roles are sending most traffic to S3?</h4><pre>SELECT SUM(bytes) AS total, srcrole<br>FROM logs<br>WHERE log_status = &#39;OK&#39;<br>    AND action = &#39;ACCEPT&#39;<br>    AND pkt_dst_aws_service = &#39;S3&#39;<br>GROUP BY srcrole<br>ORDER BY total DESC;</pre><h4>Intra region VPC peering traffic across roles</h4><pre>SELECT SIM(bytes) AS total, srcrole, dstrole<br>FROM logs<br>WHERE log_status = &#39;OK&#39;<br>    AND action = &#39;ACCEPT&#39;<br>    AND traffic_path = 4 <br>GROUP BY srcrole, dstrole<br>ORDER BY total DESC;</pre><p>For inter region VPC peering, change traffic_path to 5. See explanation <a href="https://docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html">here</a></p><h3>Exercise to readers</h3><p>I can come up with lots of use-cases, but most of these can be specific to the workloads and AWS environment. Same SQL might not work in all the environments.</p><ul><li>Cross-AZ traffic. If we add az-id in instance.tsv, we can have source and destination AZs</li><li>Roles abusing NAT Gateway :)</li><li>Traffic hot-spots: Specific services getting overwhelmed</li><li>Traffic from/to know bad IP addresses (malware, C2, etc.)</li><li>NACLs right-sizing for intranet and Internet</li><li>Unused resources: No traffic to/from a resource (cost saving)</li><li>Unnecessary traffic: NTP traffic to Internet (can leverage AWS NTP services), DNS requests to unexpected resolvers, etc.</li></ul><h3>AWS improvements</h3><p>AWS can significantly improve the VPC flow log data. <em>pkt-src-aws-service</em> and <em>pkt-dst-aws-service</em> are restricted to a handful of AWS services. Not sure why they don’t tag every ENI with something like aws:service and include that in the logs. One has to comb through the description and other fields to figure out if the ENI is associated with a Lambda, NAT Gateway or something else!</p><p>It would be great, if customers can select one or more ENI tags to include in the logs. This will avoid the joins we did above.</p><h3>Cloud Security</h3><p>None of the Cloud Security, CNAPP vendors have anything for VPC flow logs. Couple of years back, we did this at <a href="https://www.ariksa.com/">Ariksa</a>, but I haven’t come across any decent vendor doing this! EDR vendors have some of this data, but only for Cloud VMs and not for other services like Lambda’s, etc. Some cloud cost vendors (<a href="https://www.vantage.sh/">Vantage</a>, are there others?) seem to be solving the cost specific use-cases!</p><h3>DuckDB</h3><p>DuckDB was ideal for this analysis. I was playing with 1.1 billion flow logs and almost all queries aggregations were returned in seconds. It has an <a href="https://duckdb.org/docs/extensions/inet.html">inet</a> extension which I didn’t use, but possibly can come in handy. Although, it doesn’t look like it has <strong>Is IP in CIDR</strong> functionality!</p><h3>Conclusion</h3><p>This post was born out of real world use-cases. VPC flow logs helped me identify and fix a few issues in our setup related to Ops, SRE, Cost, etc. This setup cost less than a dollar to create the DB. Once the DB was created, I was able to analyze offline on my laptop without incurring additional costs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ef3d3465a67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Putting AWS on a Diet: Slimming down cloud costs, one byte at a time!]]></title>
            <link>https://medium.com/@seshu/putting-aws-on-a-diet-slimming-down-cloud-costs-one-byte-at-a-time-17c1677b18db?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/17c1677b18db</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[nat]]></category>
            <category><![CDATA[cost]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Sun, 05 May 2024 03:31:24 GMT</pubDate>
            <atom:updated>2024-05-05T03:31:24.071Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="NAT Gateway in AWS backyard growing money :)" src="https://cdn-images-1.medium.com/max/1024/1*qkbca1_PwtRJEeZl3ec5pA.png" /><figcaption>NAT Gateway in AWS backyard growing money :)</figcaption></figure><p>Cloud spend on production workloads is typically less than 40 to 60 percent of total bills. Lower environments, CI/CD infrastructure, forgotten resources, data transfer charges, etc. contribute to the rest. There is plenty of wastage in most AWS accounts. Recently AWS NAT Gateway charges in CI environments caught my eye. I was<a href="https://www.linkedin.com/posts/seshupasam_aws-nat-dmz-activity-7192296405900623872-IMTP"> rambling</a> about it on LinkedIn and caused some confusion :). Here are my thoughts:</p><h3>NAT Gateway</h3><p><a href="https://aws.amazon.com/vpc/pricing/">NAT Gateway</a> (NGW) pricing says: “<em>Data processing charges apply for each gigabyte processed through the NAT gateway regardless of the traffic’s source or destination</em>”. NAT Gateway is charged by the hour and by every GB irrespective of the direction, source or destination. On the lower end this is $0.045 and can go up to $0.065 in some regions. Typically every availability zone (AZ) has its own NGW to avoid cross-AZ traffic. For a VPC with 3 AZs, NGWs alone without data transfer cost $1182 (3 * 0.045 * 24 * 365) to 1708 (3 * 0.065 * 24 * 365) per year. Let’s assume we are sending and/or receiving 1 TB per day. This ends up costing (0.045 * 1000 * 365) $16425 to $23725 (0.065 * 1000 * 365). Total cost: $17607 to $25433.</p><p>Back in the day (before April 2015), NAT instances were the only option for private subnet resources to reach the Internet. It’s just a Linux instance with iptables tinkering and source/destination check disabled. There are a handful of EC2 instances that can do 5 Gbps that are cheaper than NGW hourly pricing. Why do we need NGWs instead of using an EC2 instance? See the differences as<a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-comparison.html"> documented by AWS</a>. The important issue is the fail over. AWS takes care of scaling and handling NGW failures. For EC2 based NAT instances, if the instance has issues, one need to stop/start the instance or replace it and update the subnet route tables. During this period, private subnet resources will not be able to reach the Internet. Is the once in a blue moon blip in non-critical environments worth $16425 or more? As my friend Evan<a href="https://www.linkedin.com/feed/update/urn:li:activity:7192296405900623872?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7192296405900623872%2C7192366912452931584%29&amp;dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287192366912452931584%2Curn%3Ali%3Aactivity%3A7192296405900623872%29"> pointed out</a> in LinkedIn comment,<a href="https://github.com/1debit/alternat/"> alternat</a> seems to be a good option to automatically manage this. There are probably many other OSS alternatives.</p><h3>Subnet</h3><p>What is the difference between a private and a public subnet? Practically speaking nothing. There is an option to auto assign public IPs to ENIs in the subnet. This should ideally be off for all subnets. The only other difference is the route table. Public subnets route to the Internet via Internet Gateway (IGW). Private subnets route to the Internet via NGW or NAT Instance.</p><p><strong>Trivia</strong>: What is the difference between an EC2 instance (no public IP address) in a public subnet vs private subnet? The one in the private subnet can reach the Internet (via NGW or NAT instance). The one in the public subnet cannot. Assuming network ACLs (NACLs) and Security Group (SG) rules are sane, an instance in a public subnet is a bit more secure. What good is an instance that can’t reach the Internet? There are many use-cases:</p><ul><li>Just dealing with AWS services like S3, DynamoDB, etc. (using VPC Endpoint or Private Link which are a lot cheaper than NGW)</li><li>Applications consuming from messaging service, processing and writing to database, etc.</li></ul><p>Of course, if EDR or other SaaS products like DataDog are in use, then Internet connectivity will be required.</p><p>Many environments rely on public vs private subnets to make up for the deficiencies in NACLs and SGs. Most SGs should have inbound rules that allow other SGs (not CIDRs). All SGs should have outbound rules, not just the default send whatever/where-ever.</p><p>Imagine running GitHub runners in an AWS CI/CD account. Stop wasting dollars on NGWs. Launch the instances with a public IP address in the public subnet. Use a SG with no in-bound rules. This is as <strong>secure</strong> as any other alternative. Before Feb 2024, public IPs associated with instances were free. Now they cost $0.005 per hour. One can associate public IPs to 200 instances for $1 per hour. No NGW bandwidth costs other than the egress charges.</p><h3>Conclusion</h3><ul><li>Don’t change anything if the critical environment’s NGW bill is reasonable. Look at NACLs and SGs to see if there is opportunity to further lock them down.</li><li>If NGW costs are high, see if NAT instances are an option especially in non-production environments.</li><li>One can completely punt the private subnets/NGWs/NAT instances in lower environments. Lock down NACLs and SGs and launch instances in a public subnet. If these need Internet access, assign a public IP address during launch. Remember: You can control the rules for every byte moving in and out of these resources.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17c1677b18db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Governance — Service Control Policies]]></title>
            <link>https://medium.com/@seshu/aws-governance-service-control-policies-6d23b144ec72?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d23b144ec72</guid>
            <category><![CDATA[control-towers]]></category>
            <category><![CDATA[governance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[organization]]></category>
            <category><![CDATA[scp]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Tue, 28 Mar 2023 02:50:47 GMT</pubDate>
            <atom:updated>2023-03-28T03:12:42.980Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS Governance — Service Control Policies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XohCkq9NH6oHXIXJ" /><figcaption>No guardrails!</figcaption></figure><p>AWS Organizations and Service Control Policies (SCP) play a crucial role in security, compliance and governance. Back in the day, various environments (dev, test, production, etc.) were cluttered within a single AWS account. AWS Control Towner (Landing Zone) and AWS Organizations made it easy to build accounts that are specific for organizational units, environments or for special purposes. With a single account, there was no need for service control policies. Everything was done using IAM and conditions keys. But nowadays some organizations have hundreds of accounts. SCPs are critical whether you have one account or many.</p><p>I see start-up and some enterprise customers using a single account and not creating AWS Organizations. Some AWS accounts that were created before AWS Organizations was released, did not migrate to using AWS Organizations. Which means these customers are not taking advantage of SCPs. Within a single account, one can build network isolation to segregate environments, but identity and access management and controlling cross environment resource access becomes tricky. AWS Organizations and Control Tower are free of cost. So why not use it and build a good governance foundation.</p><p>For customers that currently have a handful of AWS accounts, it is trivial to create a new management account and add the existing accounts to it. I also highly recommend using the AWS Control Tower. If you need help with this, feel free to reach out to me (promise to not do sales pitch 🙂). Ideally having external documentation on effective SCP for every account helps when dealing with a large number of OUs and/or accounts.</p><h3>Service Control Policies</h3><p>SCP use-cases are well documented. But here are some examples:</p><ul><li>Prevent root account activity or access key creation. Ideally the root account should not be used after initial setup</li><li>Restrict use of unapproved AWS regions. There are many AWS regions. But most customers stick to one or a handful of them. How many times did someone end up in the wrong AWS region in the console and accidentally created a S3 bucket or some other resource in the incorrect region?</li><li>Prevent use of AWS services that are not approved. Is there a reason for your employees to lease Satellite ground stations at $3 per minute?</li><li>Prevent sensitive operations. Once the AWS accounts are set up, lock down sensitive operations. Some examples:</li></ul><ol><li>Prevent stopping or deletion of CloudTrail logging</li><li>Prevent deletion of VPC flow logs</li><li>Prohibit AWS accounts from leaving organization</li><li>Prevent deleting CloudWatch alarms, etc.</li><li>Do not allow deletion of AWS Config rules</li><li>Prevent AWS GuardDuty changes</li></ol><ul><li>Prevent resource sharing using AWS Resource Access Manager (RAM) either externally or across environments (production to dev or vice-versa). Not all resource sharing is done via RAM. But policies can be put in place to control or prohibit use of RAM permissions.</li><li>Disallow use of deprecated functionality (example: <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ensure-object-ownership.html">S3 ACLs</a>). This is very handy for new AWS accounts so that you don’t end up accidentally using deprecated AWS features.</li><li>Disable insecure functionality usage (example: EC2 IMDSv1) across the whole organization</li><li>Enforcement of tag policies. Unfortunately tag policies only enforce tag name format and value constraints. But requiring tags on resources have to be done with SCPs or IAM</li><li>Prevent temporary credentials sprawl. For example, the recently announced feature that prevents <a href="https://aws.amazon.com/blogs/security/how-to-use-policies-to-restrict-where-ec2-instance-credentials-can-be-used-from/">AWS EC2 instance credentials</a> from being used elsewhere.</li><li>Enforcing MFA requirement for certain permissions. Popular one being deletion of objects from sensitive S3 buckets.</li><li>Prevent private VPCs from gaining Internet access.</li><li>Zero trust network access (ZTNA) enforcement for resource access. SCP can control how some or all resources are accessed by using the source network CIDRs as a condition.</li></ul><p>There are many more use-cases. Some of the CSPM tools aren’t sophisticated enough to make ideal SCP recommendations appropriate for your environment. SCPs do not provide access. Getting familiar with <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_strategies.html">SCP strategies</a> is important before using them. By default, AWS attaches a SCP named FullAWSAccess to the root, every organizational unit (OU) and account. Then every subsequent SCP peels away or places constraints on what is allowed by FullAWSAccess. Essentially an ‘allow everything except this’ approach. An alternative approach is to get rid of FullAWSAccess and allow what is necessary, with or without conditions. Since SCPs can potentially have an immediate and huge impact, creating a test organization and experimenting with it is ideal.</p><p>Getting familiar with AWS organization limits is useful. Except for the maximum number of accounts in an organization, other limits cannot be increased. Some of the limits that one might reach:</p><ul><li>OU maximum nesting in a root: <strong>5</strong></li><li>SCPs per root, OU or account: <strong>5</strong></li><li>Maximum SCP policy size: <strong>5120 bytes</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/0*G0V6CrAIDbg_x-Oj" /><figcaption>AWS Organizations OU nesting</figcaption></figure><p>Maximum nesting might not be a problem for most organizations, but the other two limits are a pain in the neck. AWS also recommends not having too many SCPs which can adversely affect the performance of API calls. But they don’t have any recommendations on how many is too many! Given the hardcoded limits, theoretically one can have <strong>35 SCPs</strong> (5 at root, 5 each per OU and 5 for the account). It essentially boils down to <strong>180 KB</strong> of JSON without spaces. In order to avoid reshuffling OUs, it might make sense to create another artificial OU(s) under root. This allows you to avoid any future SCP limits. For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/0*T3QGIWT-e8qdUO0r" /><figcaption>AWS Organizations fake OUs for future SCPs</figcaption></figure><h3>Control Tower SCPs</h3><p>AWS Control Tower comes with a handful of SCPs. These are not complete and most of these can also be consolidated, but review and apply these that are relevant to your environments:</p><p>Disallows access to unlisted operations in global and regional services outside of the specified regions</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;aws:RequestedRegion&quot;: [<br>            &quot;us-east-1&quot;,<br>            &quot;us-west-2&quot;<br>          ]<br>        },<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: [<br>            &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>          ]<br>        }<br>      },<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;NotAction&quot;: [<br>        &quot;a4b:*&quot;,<br>        &quot;access-analyzer:*&quot;,<br>        &quot;acm:*&quot;,<br>        &quot;account:*&quot;,<br>        &quot;activate:*&quot;,<br>        &quot;artifact:*&quot;,<br>        &quot;aws-marketplace-management:*&quot;,<br>        &quot;aws-marketplace:*&quot;,<br>        &quot;aws-portal:*&quot;,<br>        &quot;billingconductor:*&quot;,<br>        &quot;budgets:*&quot;,<br>        &quot;ce:*&quot;,<br>        &quot;chatbot:*&quot;,<br>        &quot;chime:*&quot;,<br>        &quot;cloudfront:*&quot;,<br>        &quot;compute-optimizer:*&quot;,<br>        &quot;config:*&quot;,<br>        &quot;cur:*&quot;,<br>        &quot;datapipeline:GetAccountLimits&quot;,<br>        &quot;devicefarm:*&quot;,<br>        &quot;directconnect:*&quot;,<br>        &quot;discovery-marketplace:*&quot;,<br>        &quot;ec2:DescribeRegions&quot;,<br>        &quot;ec2:DescribeTransitGateways&quot;,<br>        &quot;ec2:DescribeVpnGateways&quot;,<br>        &quot;ecr-public:*&quot;,<br>        &quot;fms:*&quot;,<br>        &quot;globalaccelerator:*&quot;,<br>        &quot;health:*&quot;,<br>        &quot;iam:*&quot;,<br>        &quot;importexport:*&quot;,<br>        &quot;kms:*&quot;,<br>        &quot;license-manager:ListReceivedLicenses&quot;,<br>        &quot;lightsail:Get*&quot;,<br>        &quot;mobileanalytics:*&quot;,<br>        &quot;networkmanager:*&quot;,<br>        &quot;organizations:*&quot;,<br>        &quot;pricing:*&quot;,<br>        &quot;resource-explorer-2:*&quot;,<br>        &quot;route53-recovery-cluster:*&quot;,<br>        &quot;route53-recovery-control-config:*&quot;,<br>        &quot;route53-recovery-readiness:*&quot;,<br>        &quot;route53:*&quot;,<br>        &quot;route53domains:*&quot;,<br>        &quot;s3:CreateMultiRegionAccessPoint&quot;,<br>        &quot;s3:DeleteMultiRegionAccessPoint&quot;,<br>        &quot;s3:DescribeMultiRegionAccessPointOperation&quot;,<br>        &quot;s3:GetAccountPublic&quot;,<br>        &quot;s3:GetAccountPublicAccessBlock&quot;,<br>        &quot;s3:GetBucketLocation&quot;,<br>        &quot;s3:GetBucketPolicyStatus&quot;,<br>        &quot;s3:GetBucketPublicAccessBlock&quot;,<br>        &quot;s3:GetMultiRegionAccessPoint&quot;,<br>        &quot;s3:GetMultiRegionAccessPointPolicy&quot;,<br>        &quot;s3:GetMultiRegionAccessPointPolicyStatus&quot;,<br>        &quot;s3:GetStorageLensConfiguration&quot;,<br>        &quot;s3:GetStorageLensDashboard&quot;,<br>        &quot;s3:ListAllMyBuckets&quot;,<br>        &quot;s3:ListMultiRegionAccessPoints&quot;,<br>        &quot;s3:ListStorageLensConfigurations&quot;,<br>        &quot;s3:PutAccountPublic&quot;,<br>        &quot;s3:PutAccountPublicAccessBlock&quot;,<br>        &quot;s3:PutMultiRegionAccessPointPolicy&quot;,<br>        &quot;savingsplans:*&quot;,<br>        &quot;shield:*&quot;,<br>        &quot;sso:*&quot;,<br>        &quot;sts:*&quot;,<br>        &quot;support:*&quot;,<br>        &quot;supportapp:*&quot;,<br>        &quot;supportplans:*&quot;,<br>        &quot;sustainability:*&quot;,<br>        &quot;tag:GetResources&quot;,<br>        &quot;trustedadvisor:*&quot;,<br>        &quot;vendor-insights:ListEntitledSecurityProfiles&quot;,<br>        &quot;waf-regional:*&quot;,<br>        &quot;waf:*&quot;,<br>        &quot;wafv2:*&quot;<br>      ]<br>    }<br>  ]<br>}</pre><p>Secure your AWS accounts by disallowing creation of access keys for the root user, which will allow unrestricted access to all resources in the account</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;iam:CreateAccessKey&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringLike&quot;: {<br>          &quot;aws:PrincipalArn&quot;: [<br>            &quot;arn:aws:iam::*:root&quot;<br>          ]<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Secure your AWS accounts by disallowing account access with root user credentials, which are credentials of the account owner and allow unrestricted access to all resources in the account</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringLike&quot;: {<br>          &quot;aws:PrincipalArn&quot;: [<br>            &quot;arn:aws:iam::*:root&quot;<br>          ]<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Disallow cross-region networking connections from Amazon EC2, Amazon CloudFront, and AWS Global Accelerator services</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ec2:CreateVpcPeeringConnection&quot;,<br>        &quot;ec2:AcceptVpcPeeringConnection&quot;,<br>        &quot;ec2:CreateTransitGatewayPeeringAttachment&quot;,<br>        &quot;ec2:AcceptTransitGatewayPeeringAttachment&quot;,<br>        &quot;cloudfront:CreateDistribution&quot;,<br>        &quot;cloudfront:UpdateDistribution&quot;,<br>        &quot;globalaccelerator:Create*&quot;,<br>        &quot;globalaccelerator:Update*&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;<br>    }<br>  ]<br>}</pre><p>Prevent deletion of AWS Config aggregation authorizations</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;config:DeleteAggregationAuthorization&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:config:*:*:aggregation-authorization*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalArn&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        },<br>        &quot;StringLike&quot;: {<br>          &quot;aws:ResourceTag/aws-control-tower&quot;: &quot;managed-by-control-tower&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Record resource configurations in a consistent manner by ensuring that AWS Config settings don’t change</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;config:DeleteConfigurationRecorder&quot;,<br>        &quot;config:DeleteDeliveryChannel&quot;,<br>        &quot;config:DeleteRetentionConfiguration&quot;,<br>        &quot;config:PutConfigurationRecorder&quot;,<br>        &quot;config:PutDeliveryChannel&quot;,<br>        &quot;config:PutRetentionConfiguration&quot;,<br>        &quot;config:StopConfigurationRecorder&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to AWS Config Rules</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;config:PutConfigRule&quot;,<br>        &quot;config:DeleteConfigRule&quot;,<br>        &quot;config:DeleteEvaluationResults&quot;,<br>        &quot;config:DeleteConfigurationAggregator&quot;,<br>        &quot;config:PutConfigurationAggregator&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        },<br>        &quot;StringEquals&quot;: {<br>          &quot;aws:ResourceTag/aws-control-tower&quot;: &quot;managed-by-control-tower&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Log API activity in a consistent manner by ensuring that your AWS CloudTrail settings do not change</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;cloudtrail:DeleteTrail&quot;,<br>        &quot;cloudtrail:PutEventSelectors&quot;,<br>        &quot;cloudtrail:StopLogging&quot;,<br>        &quot;cloudtrail:UpdateTrail&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:cloudtrail:*:*:trail/aws-controltower-*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>This control disallows management of the following extension types in the AWS CloudFormation registry: resource types, modules, and hooks</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;cloudformation:RegisterType&quot;,<br>        &quot;cloudformation:DeregisterType&quot;,<br>        &quot;cloudformation:SetTypeConfiguration&quot;,<br>        &quot;cloudformation:SetTypeDefaultVersion&quot;,<br>        &quot;cloudformation:PublishType&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to encryption configuration for your Amazon S3 buckets</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;s3:PutEncryptionConfiguration&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to bucket logging for your Amazon S3 buckets</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;s3:PutBucketLogging&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to bucket policy for your Amazon S3 buckets</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;s3:PutBucketPolicy&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to lifecycle configuration for your Amazon S3 buckets</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;s3:PutLifecycleConfiguration&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalARN&quot;: &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent changes to replication configuration for Amazon S3 buckets</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;s3:PutReplicationConfiguration&quot;<br>      &quot;Resource&quot;: &quot;*&quot;<br>    }<br>  ]<br>}</pre><p>Protect your Amazon S3 buckets by requiring multi-factor authentication (MFA) for delete actions</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;s3:DeleteObject&quot;,<br>        &quot;s3:DeleteBucket&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;BoolIfExists&quot;: {<br>          &quot;aws:MultiFactorAuthPresent&quot;: [<br>            &quot;false&quot;<br>          ]<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Disallow internet access for an Amazon Virtual Private Cloud (VPC) instance managed by a customer, rather than by an AWS service</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ec2:CreateInternetGateway&quot;,<br>        &quot;ec2:AttachInternetGateway&quot;,<br>        &quot;ec2:CreateEgressOnlyInternetGateway&quot;,<br>        &quot;ec2:AttachEgressOnlyInternetGateway&quot;,<br>        &quot;ec2:CreateDefaultVpc&quot;,<br>        &quot;ec2:CreateDefaultSubnet&quot;,<br>        &quot;ec2:CreateCarrierGateway&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;ArnNotLike&quot;: {<br>          &quot;aws:PrincipalArn&quot;: [<br>            &quot;arn:aws:iam::*:role/AWSControlTowerExecution&quot;<br>          ]<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Disallows Virtual Private Network (VPN) connections (Site-to-Site VPN and Client VPN) to an Amazon Virtual Private Cloud (VPC)</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ec2:CreateVPNGateway&quot;,<br>        &quot;ec2:AttachVPNGateway&quot;,<br>        &quot;ec2:CreateCustomerGateway&quot;,<br>        &quot;ec2:CreateVpnConnection&quot;,<br>        &quot;ec2:ModifyVpnConnection&quot;,<br>        &quot;ec2:CreateClientVpnEndpoint&quot;,<br>        &quot;ec2:ModifyClientVpnEndpoint&quot;,<br>        &quot;ec2:AssociateClientVpnTargetNetwork&quot;,<br>        &quot;ec2:AuthorizeClientVpnIngress&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;<br>    }<br>  ]<br>}</pre><h3>Other SCPs</h3><p>There are a handful that are not in Control Tower that I find appropriate for most environments</p><p>Restrict access to all resources within an AWS account to only principals from the organization</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;aws:PrincipalOrgID&quot;: &quot;o-1234567890&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>If you need to provide access to external organizations (example: CSPM vendor), you can allow access to all resources within an AWS account for principals from multiple organizations</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringLike&quot;: {<br>          &quot;aws:PrincipalOrgPaths&quot;: [<br>            &quot;o-1234567890/*&quot;,<br>            &quot;o-0987654321/*&quot;<br>          ]<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Blocks usage of deprecated functionality like S3 ACLs</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;s3:PutObjectAcl&quot;,<br>        &quot;s3:GetObjectAcl&quot;,<br>        &quot;s3:PutBucketAcl&quot;,<br>        &quot;s3:GetBucketAcl&quot;<br>      ],<br>      &quot;Resource&quot;: [<br>        &quot;arn:aws:s3:::*/*&quot;,<br>        &quot;arn:aws:s3:::*&quot;<br>      ]<br>    }<br>  ]<br>}</pre><p>Restricts sharing of resources outside of the organization using AWS Resource Access Manager (RAM)</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;ram:AcceptResourceShareInvitation&quot;,<br>        &quot;ram:AssociateResourceShare&quot;,<br>        &quot;ram:CreateResourceShare&quot;,<br>        &quot;ram:DeleteResourceShare&quot;,<br>        &quot;ram:DisassociateResourceShare&quot;,<br>        &quot;ram:RejectResourceShareInvitation&quot;,<br>        &quot;ram:TagResource&quot;,<br>        &quot;ram:UntagResource&quot;,<br>        &quot;ram:UpdateResourceShare&quot;,<br>        &quot;ram:EnableSharingWithAwsOrganization&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;aws:PrincipalOrgID&quot;: &quot;o-1234567890&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent the usage of insecure functionality like IMDSv1</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;NumericLessThan&quot;: {<br>          &quot;ec2:RoleDelivery&quot;: &quot;2.0&quot;<br>        }<br>      }<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;ec2:RunInstances&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:ec2:*:*:instance/*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;ec2:MetadataHttpTokens&quot;: &quot;required&quot;<br>        }<br>      }<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;ec2:ModifyInstanceMetadataOptions&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;ec2:RunInstances&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:ec2:*:*:instance/*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;NumericGreaterThan&quot;: {<br>          &quot;ec2:MetadataHttpPutResponseHopLimit&quot;: &quot;1&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>Prevent temporary credentials issued to EC2 instances from being used elsewhere</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;aws:ec2InstanceSourceVPC&quot;: &quot;${aws:SourceVpc}&quot;<br>        },<br>        &quot;Null&quot;: {<br>          &quot;ec2:SourceInstanceARN&quot;: &quot;false&quot;<br>        },<br>        &quot;BoolIfExists&quot;: {<br>          &quot;aws:ViaAWSService&quot;: &quot;false&quot;<br>        }<br>      }<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: &quot;*&quot;,<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringNotEquals&quot;: {<br>          &quot;aws:ec2InstanceSourcePrivateIPv4&quot;: &quot;${aws:VpcSourceIp}&quot;<br>        },<br>        &quot;Null&quot;: {<br>          &quot;ec2:SourceInstanceARN&quot;: &quot;false&quot;<br>        },<br>        &quot;BoolIfExists&quot;: {<br>          &quot;aws:ViaAWSService&quot;: &quot;false&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><h3>Tagging</h3><p>AWS Organization has <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">tag policies</a> which help standardize tags across the whole organization. <strong>Name</strong> tag key is not same as <strong>name</strong>. Tag policies can also be used enforce valid values. But unfortunately tag policies are half baked implementation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*IQgQzC1glDV75kvzpNJlhw.png" /><figcaption>Policy does not enforce</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*nJNK7ic_4uN7k274lKSIrQ.png" /><figcaption>Tag compliance is a hit or a miss!</figcaption></figure><p>To enforce tags across the whole organization, OUs or accounts, tag policies have to be complemented with SCPs.</p><p>If we want to make sure a tag key called <strong>Owner</strong> cannot be removed from resource, we need SCP like the following:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;access-analyzer:UntagResource&quot;,<br>        &quot;acm:RemoveTagsFromCertificate&quot;,<br>        &quot;aps:UntagResource&quot;,<br>        &quot;autoscaling:CreateOrUpdateTags&quot;,<br>        &quot;autoscaling:DeleteTags&quot;,<br>        &quot;backup-gateway:UntagResource&quot;,<br>        &quot;billingconductor:UntagResource&quot;,<br>        &quot;bugbust:UntagResource&quot;,<br>        &quot;cassandra:UntagResource&quot;,<br>        &quot;cloud9:UntagResource&quot;,<br>        &quot;cloudfront:CreateStreamingDistributionWithTags&quot;,<br>        &quot;codeguru-profiler:UntagResource&quot;,<br>        &quot;codeguru-reviewer:UnTagResource&quot;,<br>        &quot;codestar-connections:UntagResource&quot;,<br>        &quot;codestar-notifications:UntagResource&quot;,<br>        &quot;connect-campaigns:UntagResource&quot;,<br>        &quot;datapipeline:RemoveTags&quot;,<br>        &quot;deepcomposer:UntagResource&quot;,<br>        &quot;deepracer:UntagResource&quot;,<br>        &quot;dlm:UntagResource&quot;,<br>        &quot;ds:RemoveTagsFromResource&quot;,<br>        &quot;ecr-public:UntagResource&quot;,<br>        &quot;ecr:UntagResource&quot;,<br>        &quot;ecs:UntagResource&quot;,<br>        &quot;elasticfilesystem:DeleteTags&quot;,<br>        &quot;elasticfilesystem:UntagResource&quot;,<br>        &quot;elasticloadbalancing:RemoveTags&quot;,<br>        &quot;evidently:UntagResource&quot;,<br>        &quot;fis:UntagResource&quot;,<br>        &quot;frauddetector:UntagResource&quot;,<br>        &quot;gamesparks:UntagResource&quot;,<br>        &quot;geo:UntagResource&quot;,<br>        &quot;glue:UntagResource&quot;,<br>        &quot;grafana:UntagResource&quot;,<br>        &quot;greengrass:UntagResource&quot;,<br>        &quot;iotanalytics:UntagResource&quot;,<br>        &quot;lex:UntagResource&quot;,<br>        &quot;lightsail:UntagResource&quot;,<br>        &quot;mediastore:UntagResource&quot;,<br>        &quot;mediatailor:UntagResource&quot;,<br>        &quot;migrationhub-orchestrator:UntagResource&quot;,<br>        &quot;mobiletargeting:UntagResource&quot;,<br>        &quot;profile:UntagResource&quot;,<br>        &quot;qldb:UntagResource&quot;,<br>        &quot;ram:UntagResource&quot;,<br>        &quot;rds:RemoveTagsFromResource&quot;,<br>        &quot;refactor-spaces:UntagResource&quot;,<br>        &quot;resource-explorer-2:UntagResource&quot;,<br>        &quot;rolesanywhere:UntagResource&quot;,<br>        &quot;route53-recovery-control-config:UntagResource&quot;,<br>        &quot;route53-recovery-readiness:UntagResource&quot;,<br>        &quot;rum:UntagResource&quot;,<br>        &quot;s3:PutJobTagging&quot;,<br>        &quot;s3:PutStorageLensConfigurationTagging&quot;,<br>        &quot;servicecatalog:UntagResource&quot;,<br>        &quot;servicediscovery:UntagResource&quot;,<br>        &quot;servicequotas:UntagResource&quot;,<br>        &quot;shield:UntagResource&quot;,<br>        &quot;signer:UntagResource&quot;,<br>        &quot;sms-voice:UntagResource&quot;,<br>        &quot;snow-device-management:UntagResource&quot;,<br>        &quot;sns:UntagResource&quot;,<br>        &quot;sqlworkbench:UntagResource&quot;,<br>        &quot;sqs:UntagQueue&quot;,<br>        &quot;sso:UntagResource&quot;,<br>        &quot;workmail:UntagResource&quot;,<br>        &quot;workspaces-web:UntagResource&quot;,<br>        &quot;workspaces:DeleteTags&quot;,<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;Null&quot;: {<br>          &quot;aws:RequestTag/Owner&quot;: &quot;false&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>To require <strong>Owner</strong> tag key when creating resources, we need SCP like the following:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Deny&quot;,<br>      &quot;Action&quot;: [<br>        &quot;a4b:CreateAddressBook&quot;,<br>        &quot;a4b:CreateBusinessReportSchedule&quot;,<br>        &quot;a4b:CreateConferenceProvider&quot;,<br>        &quot;a4b:CreateContact&quot;,<br>        &quot;a4b:CreateGatewayGroup&quot;,<br>        &quot;a4b:CreateNetworkProfile&quot;,<br>        &quot;a4b:CreateProfile&quot;,<br>        &quot;a4b:CreateRoom&quot;,<br>        &quot;a4b:CreateSkillGroup&quot;,<br>        &quot;a4b:CreateUser&quot;,<br>        &quot;a4b:RegisterAVSDevice&quot;,<br>        &quot;access-analyzer:CreateAnalyzer&quot;,<br>        &quot;acm-pca:CreateCertificateAuthority&quot;,<br>        &quot;acm:ImportCertificate&quot;,<br>        &quot;acm:RequestCertificate&quot;,<br>        &quot;airflow:CreateEnvironment&quot;,<br>        &quot;amplify:CreateApp&quot;,<br>        &quot;amplify:CreateBranch&quot;,<br>        &quot;amplify:CreateDomainAssociation&quot;,<br>        &quot;amplifyuibuilder:CreateComponent&quot;,<br>        &quot;amplifyuibuilder:CreateForm&quot;,<br>        &quot;amplifyuibuilder:CreateTheme&quot;,<br>        &quot;aoss:CreateCollection&quot;,<br>        &quot;apigateway:PATCH&quot;,<br>        &quot;apigateway:POST&quot;,<br>        &quot;apigateway:PUT&quot;,<br>        &quot;app-integrations:CreateDataIntegration&quot;,<br>        &quot;app-integrations:CreateEventIntegration&quot;,<br>        &quot;appconfig:CreateApplication&quot;,<br>        &quot;appconfig:CreateConfigurationProfile&quot;,<br>        &quot;appconfig:CreateDeploymentStrategy&quot;,<br>        &quot;appconfig:CreateEnvironment&quot;,<br>        &quot;appconfig:CreateExtension&quot;,<br>        &quot;appconfig:CreateExtensionAssociation&quot;,<br>        &quot;appconfig:StartDeployment&quot;,<br>        &quot;appflow:CreateFlow&quot;,<br>        &quot;appflow:RegisterConnector&quot;,<br>        &quot;appmesh:CreateGatewayRoute&quot;,<br>        &quot;appmesh:CreateMesh&quot;,<br>        &quot;appmesh:CreateRoute&quot;,<br>        &quot;appmesh:CreateVirtualGateway&quot;,<br>        &quot;appmesh:CreateVirtualNode&quot;,<br>        &quot;appmesh:CreateVirtualRouter&quot;,<br>        &quot;appmesh:CreateVirtualService&quot;,<br>        &quot;apprunner:CreateAutoScalingConfiguration&quot;,<br>        &quot;apprunner:CreateConnection&quot;,<br>        &quot;apprunner:CreateObservabilityConfiguration&quot;,<br>        &quot;apprunner:CreateService&quot;,<br>        &quot;apprunner:CreateVpcConnector&quot;,<br>        &quot;apprunner:CreateVpcIngressConnection&quot;,<br>        &quot;appstream:CreateAppBlock&quot;,<br>        &quot;appstream:CreateApplication&quot;,<br>        &quot;appstream:CreateFleet&quot;,<br>        &quot;appstream:CreateImageBuilder&quot;,<br>        &quot;appstream:CreateStack&quot;,<br>        &quot;appstream:CreateUpdatedImage&quot;,<br>        &quot;appsync:CreateGraphqlApi&quot;,<br>        &quot;aps:CreateRuleGroupsNamespace&quot;,<br>        &quot;aps:CreateWorkspace&quot;,<br>        &quot;athena:CreateDataCatalog&quot;,<br>        &quot;athena:CreateWorkGroup&quot;,<br>        &quot;auditmanager:CreateAssessment&quot;,<br>        &quot;auditmanager:CreateAssessmentFramework&quot;,<br>        &quot;auditmanager:CreateControl&quot;,<br>        &quot;autoscaling:CreateAutoScalingGroup&quot;,<br>        &quot;aws-marketplace:StartChangeSet&quot;,<br>        &quot;backup-gateway:Backup&quot;,<br>        &quot;backup-gateway:CreateGateway&quot;,<br>        &quot;backup-gateway:ImportHypervisorConfiguration&quot;,<br>        &quot;backup-gateway:Restore&quot;,<br>        &quot;backup:CopyIntoBackupVault&quot;,<br>        &quot;backup:CreateBackupPlan&quot;,<br>        &quot;backup:CreateBackupVault&quot;,<br>        &quot;backup:CreateFramework&quot;,<br>        &quot;backup:CreateLegalHold&quot;,<br>        &quot;backup:CreateReportPlan&quot;,<br>        &quot;backup:StartBackupJob&quot;,<br>        &quot;batch:CreateComputeEnvironment&quot;,<br>        &quot;batch:CreateJobQueue&quot;,<br>        &quot;batch:CreateSchedulingPolicy&quot;,<br>        &quot;batch:RegisterJobDefinition&quot;,<br>        &quot;batch:SubmitJob&quot;,<br>        &quot;billingconductor:CreateBillingGroup&quot;,<br>        &quot;billingconductor:CreateCustomLineItem&quot;,<br>        &quot;billingconductor:CreatePricingPlan&quot;,<br>        &quot;billingconductor:CreatePricingRule&quot;,<br>        &quot;braket:CreateJob&quot;,<br>        &quot;braket:CreateQuantumTask&quot;,<br>        &quot;bugbust:CreateEvent&quot;,<br>        &quot;cassandra:Alter&quot;,<br>        &quot;cassandra:Create&quot;,<br>        &quot;cassandra:Restore&quot;,<br>        &quot;ce:CreateAnomalyMonitor&quot;,<br>        &quot;ce:CreateAnomalySubscription&quot;,<br>        &quot;ce:CreateCostCategoryDefinition&quot;,<br>        &quot;chime:CreateAppInstance&quot;,<br>        &quot;chime:CreateAppInstanceUser&quot;,<br>        &quot;chime:CreateChannel&quot;,<br>        &quot;chime:CreateChannelFlow&quot;,<br>        &quot;chime:CreateMediaCapturePipeline&quot;,<br>        &quot;chime:CreateMediaConcatenationPipeline&quot;,<br>        &quot;chime:CreateMediaLiveConnectorPipeline&quot;,<br>        &quot;chime:CreateMeeting&quot;,<br>        &quot;chime:CreateMeetingWithAttendees&quot;,<br>        &quot;cloud9:CreateEnvironmentEC2&quot;,<br>        &quot;cloud9:CreateEnvironmentSSH&quot;,<br>        &quot;cloudformation:CreateChangeSet&quot;,<br>        &quot;cloudformation:CreateStack&quot;,<br>        &quot;cloudformation:CreateStackSet&quot;,<br>        &quot;cloudhsm:CopyBackupToRegion&quot;,<br>        &quot;cloudhsm:CreateCluster&quot;,<br>        &quot;cloudtrail:CreateChannel&quot;,<br>        &quot;cloudtrail:CreateEventDataStore&quot;,<br>        &quot;cloudtrail:CreateTrail&quot;,<br>        &quot;cloudwatch:PutCompositeAlarm&quot;,<br>        &quot;cloudwatch:PutInsightRule&quot;,<br>        &quot;cloudwatch:PutManagedInsightRules&quot;,<br>        &quot;cloudwatch:PutMetricAlarm&quot;,<br>        &quot;cloudwatch:PutMetricStream&quot;,<br>        &quot;codeartifact:CreateDomain&quot;,<br>        &quot;codeartifact:CreateRepository&quot;,<br>        &quot;codebuild:CreateProject&quot;,<br>        &quot;codebuild:CreateReportGroup&quot;,<br>        &quot;codecommit:CreateRepository&quot;,<br>        &quot;codedeploy:CreateApplication&quot;,<br>        &quot;codedeploy:CreateDeploymentGroup&quot;,<br>        &quot;codeguru-profiler:CreateProfilingGroup&quot;,<br>        &quot;codeguru-reviewer:AssociateRepository&quot;,<br>        &quot;codepipeline:CreateCustomActionType&quot;,<br>        &quot;codepipeline:CreatePipeline&quot;,<br>        &quot;codepipeline:PutWebhook&quot;,<br>        &quot;codestar-connections:CreateConnection&quot;,<br>        &quot;codestar-connections:CreateHost&quot;,<br>        &quot;codestar-notifications:CreateNotificationRule&quot;,<br>        &quot;codestar-notifications:Subscribe&quot;,<br>        &quot;codestar:CreateProject&quot;,<br>        &quot;cognito-identity:CreateIdentityPool&quot;,<br>        &quot;cognito-idp:CreateUserPool&quot;,<br>        &quot;comprehend:CreateDataset&quot;,<br>        &quot;comprehend:CreateDocumentClassifier&quot;,<br>        &quot;comprehend:CreateEndpoint&quot;,<br>        &quot;comprehend:CreateEntityRecognizer&quot;,<br>        &quot;comprehend:CreateFlywheel&quot;,<br>        &quot;comprehend:ImportModel&quot;,<br>        &quot;comprehend:StartDocumentClassificationJob&quot;,<br>        &quot;comprehend:StartDominantLanguageDetectionJob&quot;,<br>        &quot;comprehend:StartEntitiesDetectionJob&quot;,<br>        &quot;comprehend:StartEventsDetectionJob&quot;,<br>        &quot;comprehend:StartKeyPhrasesDetectionJob&quot;,<br>        &quot;comprehend:StartPiiEntitiesDetectionJob&quot;,<br>        &quot;comprehend:StartSentimentDetectionJob&quot;,<br>        &quot;comprehend:StartTargetedSentimentDetectionJob&quot;,<br>        &quot;comprehend:StartTopicsDetectionJob&quot;,<br>        &quot;config:PutAggregationAuthorization&quot;,<br>        &quot;config:PutConfigRule&quot;,<br>        &quot;config:PutConfigurationAggregator&quot;,<br>        &quot;config:PutStoredQuery&quot;,<br>        &quot;connect-campaigns:CreateCampaign&quot;,<br>        &quot;connect:ClaimPhoneNumber&quot;,<br>        &quot;connect:CreateAgentStatus&quot;,<br>        &quot;connect:CreateContactFlow&quot;,<br>        &quot;connect:CreateContactFlowModule&quot;,<br>        &quot;connect:CreateHoursOfOperation&quot;,<br>        &quot;connect:CreateInstance&quot;,<br>        &quot;connect:CreateIntegrationAssociation&quot;,<br>        &quot;connect:CreateQueue&quot;,<br>        &quot;connect:CreateQuickConnect&quot;,<br>        &quot;connect:CreateRoutingProfile&quot;,<br>        &quot;connect:CreateSecurityProfile&quot;,<br>        &quot;connect:CreateTrafficDistributionGroup&quot;,<br>        &quot;connect:CreateUseCase&quot;,<br>        &quot;connect:CreateUser&quot;,<br>        &quot;connect:CreateUserHierarchyGroup&quot;,<br>        &quot;connect:CreateVocabulary&quot;,<br>        &quot;connect:ReplicateInstance&quot;,<br>        &quot;databrew:CreateDataset&quot;,<br>        &quot;databrew:CreateProfileJob&quot;,<br>        &quot;databrew:CreateProject&quot;,<br>        &quot;databrew:CreateRecipe&quot;,<br>        &quot;databrew:CreateRecipeJob&quot;,<br>        &quot;databrew:CreateRuleset&quot;,<br>        &quot;databrew:CreateSchedule&quot;,<br>        &quot;dataexchange:CreateDataSet&quot;,<br>        &quot;dataexchange:CreateRevision&quot;,<br>        &quot;datapipeline:CreatePipeline&quot;,<br>        &quot;datasync:CreateAgent&quot;,<br>        &quot;datasync:CreateLocationEfs&quot;,<br>        &quot;datasync:CreateLocationFsxLustre&quot;,<br>        &quot;datasync:CreateLocationFsxOntap&quot;,<br>        &quot;datasync:CreateLocationFsxOpenZfs&quot;,<br>        &quot;datasync:CreateLocationFsxWindows&quot;,<br>        &quot;datasync:CreateLocationHdfs&quot;,<br>        &quot;datasync:CreateLocationNfs&quot;,<br>        &quot;datasync:CreateLocationObjectStorage&quot;,<br>        &quot;datasync:CreateLocationS3&quot;,<br>        &quot;datasync:CreateLocationSmb&quot;,<br>        &quot;datasync:CreateTask&quot;,<br>        &quot;datasync:StartTaskExecution&quot;,<br>        &quot;deepcomposer:CreateComposition&quot;,<br>        &quot;deepcomposer:CreateModel&quot;,<br>        &quot;deepracer:CloneReinforcementLearningModel&quot;,<br>        &quot;deepracer:CreateCar&quot;,<br>        &quot;deepracer:CreateLeaderboard&quot;,<br>        &quot;deepracer:CreateLeaderboardSubmission&quot;,<br>        &quot;deepracer:CreateReinforcementLearningModel&quot;,<br>        &quot;deepracer:StartEvaluation&quot;,<br>        &quot;detective:CreateGraph&quot;,<br>        &quot;devicefarm:CreateProject&quot;,<br>        &quot;directconnect:AllocateHostedConnection&quot;,<br>        &quot;directconnect:AllocatePrivateVirtualInterface&quot;,<br>        &quot;directconnect:AllocatePublicVirtualInterface&quot;,<br>        &quot;directconnect:AllocateTransitVirtualInterface&quot;,<br>        &quot;directconnect:CreateConnection&quot;,<br>        &quot;directconnect:CreateInterconnect&quot;,<br>        &quot;directconnect:CreateLag&quot;,<br>        &quot;directconnect:CreatePrivateVirtualInterface&quot;,<br>        &quot;directconnect:CreatePublicVirtualInterface&quot;,<br>        &quot;directconnect:CreateTransitVirtualInterface&quot;,<br>        &quot;dlm:CreateLifecyclePolicy&quot;,<br>        &quot;dms:CreateDataProvider&quot;,<br>        &quot;dms:CreateEndpoint&quot;,<br>        &quot;dms:CreateEventSubscription&quot;,<br>        &quot;dms:CreateInstanceProfile&quot;,<br>        &quot;dms:CreateMigrationProject&quot;,<br>        &quot;dms:CreateReplicationInstance&quot;,<br>        &quot;dms:CreateReplicationSubnetGroup&quot;,<br>        &quot;dms:CreateReplicationTask&quot;,<br>        &quot;dms:ImportCertificate&quot;,<br>        &quot;docdb-elastic:CreateCluster&quot;,<br>        &quot;docdb-elastic:CreateClusterSnapshot&quot;,<br>        &quot;docdb-elastic:RestoreClusterFromSnapshot&quot;,<br>        &quot;drs:CreateConvertedSnapshotForDrs&quot;,<br>        &quot;drs:CreateExtendedSourceServer&quot;,<br>        &quot;drs:CreateRecoveryInstanceForDrs&quot;,<br>        &quot;drs:CreateReplicationConfigurationTemplate&quot;,<br>        &quot;drs:CreateSourceServerForDrs&quot;,<br>        &quot;drs:ReverseReplication&quot;,<br>        &quot;drs:StartFailbackLaunch&quot;,<br>        &quot;drs:StartRecovery&quot;,<br>        &quot;ds:ConnectDirectory&quot;,<br>        &quot;ds:CreateDirectory&quot;,<br>        &quot;ds:CreateIdentityPoolDirectory&quot;,<br>        &quot;ds:CreateMicrosoftAD&quot;,<br>        &quot;ebs:StartSnapshot&quot;,<br>        &quot;ec2:AcceptAddressTransfer&quot;,<br>        &quot;ec2:AllocateAddress&quot;,<br>        &quot;ec2:AllocateHosts&quot;,<br>        &quot;ec2:AssociateIpamResourceDiscovery&quot;,<br>        &quot;ec2:AuthorizeSecurityGroupEgress&quot;,<br>        &quot;ec2:AuthorizeSecurityGroupIngress&quot;,<br>        &quot;ec2:CopySnapshot&quot;,<br>        &quot;ec2:CreateCapacityReservation&quot;,<br>        &quot;ec2:CreateCapacityReservationFleet&quot;,<br>        &quot;ec2:CreateCarrierGateway&quot;,<br>        &quot;ec2:CreateClientVpnEndpoint&quot;,<br>        &quot;ec2:CreateCustomerGateway&quot;,<br>        &quot;ec2:CreateDhcpOptions&quot;,<br>        &quot;ec2:CreateEgressOnlyInternetGateway&quot;,<br>        &quot;ec2:CreateFleet&quot;,<br>        &quot;ec2:CreateFlowLogs&quot;,<br>        &quot;ec2:CreateFpgaImage&quot;,<br>        &quot;ec2:CreateImage&quot;,<br>        &quot;ec2:CreateInstanceEventWindow&quot;,<br>        &quot;ec2:CreateInstanceExportTask&quot;,<br>        &quot;ec2:CreateInternetGateway&quot;,<br>        &quot;ec2:CreateIpam&quot;,<br>        &quot;ec2:CreateIpamPool&quot;,<br>        &quot;ec2:CreateIpamResourceDiscovery&quot;,<br>        &quot;ec2:CreateIpamScope&quot;,<br>        &quot;ec2:CreateKeyPair&quot;,<br>        &quot;ec2:CreateLaunchTemplate&quot;,<br>        &quot;ec2:CreateLocalGatewayRouteTable&quot;,<br>        &quot;ec2:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation&quot;,<br>        &quot;ec2:CreateLocalGatewayRouteTableVpcAssociation&quot;,<br>        &quot;ec2:CreateManagedPrefixList&quot;,<br>        &quot;ec2:CreateNatGateway&quot;,<br>        &quot;ec2:CreateNetworkAcl&quot;,<br>        &quot;ec2:CreateNetworkInsightsAccessScope&quot;,<br>        &quot;ec2:CreateNetworkInsightsPath&quot;,<br>        &quot;ec2:CreateNetworkInterface&quot;,<br>        &quot;ec2:CreatePlacementGroup&quot;,<br>        &quot;ec2:CreatePublicIpv4Pool&quot;,<br>        &quot;ec2:CreateReplaceRootVolumeTask&quot;,<br>        &quot;ec2:CreateRestoreImageTask&quot;,<br>        &quot;ec2:CreateRouteTable&quot;,<br>        &quot;ec2:CreateSecurityGroup&quot;,<br>        &quot;ec2:CreateSnapshot&quot;,<br>        &quot;ec2:CreateSnapshots&quot;,<br>        &quot;ec2:CreateSubnet&quot;,<br>        &quot;ec2:CreateTrafficMirrorFilter&quot;,<br>        &quot;ec2:CreateTrafficMirrorSession&quot;,<br>        &quot;ec2:CreateTrafficMirrorTarget&quot;,<br>        &quot;ec2:CreateTransitGateway&quot;,<br>        &quot;ec2:CreateTransitGatewayConnect&quot;,<br>        &quot;ec2:CreateTransitGatewayConnectPeer&quot;,<br>        &quot;ec2:CreateTransitGatewayMulticastDomain&quot;,<br>        &quot;ec2:CreateTransitGatewayPeeringAttachment&quot;,<br>        &quot;ec2:CreateTransitGatewayPolicyTable&quot;,<br>        &quot;ec2:CreateTransitGatewayRouteTable&quot;,<br>        &quot;ec2:CreateTransitGatewayRouteTableAnnouncement&quot;,<br>        &quot;ec2:CreateTransitGatewayVpcAttachment&quot;,<br>        &quot;ec2:CreateVerifiedAccessEndpoint&quot;,<br>        &quot;ec2:CreateVerifiedAccessGroup&quot;,<br>        &quot;ec2:CreateVerifiedAccessInstance&quot;,<br>        &quot;ec2:CreateVerifiedAccessTrustProvider&quot;,<br>        &quot;ec2:CreateVolume&quot;,<br>        &quot;ec2:CreateVpc&quot;,<br>        &quot;ec2:CreateVpcEndpoint&quot;,<br>        &quot;ec2:CreateVpcEndpointServiceConfiguration&quot;,<br>        &quot;ec2:CreateVpcPeeringConnection&quot;,<br>        &quot;ec2:CreateVpnConnection&quot;,<br>        &quot;ec2:CreateVpnGateway&quot;,<br>        &quot;ec2:ExportImage&quot;,<br>        &quot;ec2:ImportImage&quot;,<br>        &quot;ec2:ImportKeyPair&quot;,<br>        &quot;ec2:ImportSnapshot&quot;,<br>        &quot;ec2:RequestSpotInstances&quot;,<br>        &quot;ec2:RunInstances&quot;,<br>        &quot;ec2:StartNetworkInsightsAccessScopeAnalysis&quot;,<br>        &quot;ec2:StartNetworkInsightsAnalysis&quot;,<br>        &quot;ecr-public:CreateRepository&quot;,<br>        &quot;ecr:CreateRepository&quot;,<br>        &quot;ecs:CreateCapacityProvider&quot;,<br>        &quot;ecs:CreateCluster&quot;,<br>        &quot;ecs:CreateService&quot;,<br>        &quot;ecs:CreateTaskSet&quot;,<br>        &quot;ecs:RegisterContainerInstance&quot;,<br>        &quot;ecs:RegisterTaskDefinition&quot;,<br>        &quot;ecs:RunTask&quot;,<br>        &quot;ecs:StartTask&quot;,<br>        &quot;eks:AssociateIdentityProviderConfig&quot;,<br>        &quot;eks:CreateAddon&quot;,<br>        &quot;eks:CreateCluster&quot;,<br>        &quot;eks:CreateFargateProfile&quot;,<br>        &quot;eks:CreateNodegroup&quot;,<br>        &quot;eks:RegisterCluster&quot;,<br>        &quot;elasticache:CopySnapshot&quot;,<br>        &quot;elasticache:CreateCacheParameterGroup&quot;,<br>        &quot;elasticache:CreateCacheSecurityGroup&quot;,<br>        &quot;elasticache:CreateCacheSubnetGroup&quot;,<br>        &quot;elasticache:CreateUser&quot;,<br>        &quot;elasticache:PurchaseReservedCacheNodesOffering&quot;,<br>        &quot;elasticbeanstalk:CreateApplication&quot;,<br>        &quot;elasticbeanstalk:CreateApplicationVersion&quot;,<br>        &quot;elasticbeanstalk:CreateConfigurationTemplate&quot;,<br>        &quot;elasticbeanstalk:CreateEnvironment&quot;,<br>        &quot;elasticbeanstalk:CreatePlatformVersion&quot;,<br>        &quot;elasticfilesystem:CreateAccessPoint&quot;,<br>        &quot;elasticfilesystem:CreateFileSystem&quot;,<br>        &quot;elasticloadbalancing:CreateListener&quot;,<br>        &quot;elasticloadbalancing:CreateLoadBalancer&quot;,<br>        &quot;elasticloadbalancing:CreateRule&quot;,<br>        &quot;elasticloadbalancing:CreateTargetGroup&quot;,<br>        &quot;elasticmapreduce:CreateEditor&quot;,<br>        &quot;elasticmapreduce:CreateStudio&quot;,<br>        &quot;elasticmapreduce:RunJobFlow&quot;,<br>        &quot;elasticmapreduce:StartNotebookExecution&quot;,<br>        &quot;elemental-appliances-software:CreateQuote&quot;,<br>        &quot;emr-containers:CreateJobTemplate&quot;,<br>        &quot;emr-containers:CreateManagedEndpoint&quot;,<br>        &quot;emr-containers:CreateVirtualCluster&quot;,<br>        &quot;emr-containers:StartJobRun&quot;,<br>        &quot;emr-serverless:CreateApplication&quot;,<br>        &quot;emr-serverless:StartJobRun&quot;,<br>        &quot;es:CreateDomain&quot;,<br>        &quot;es:CreateElasticsearchDomain&quot;,<br>        &quot;events:CreateEventBus&quot;,<br>        &quot;events:PutRule&quot;,<br>        &quot;evidently:CreateExperiment&quot;,<br>        &quot;evidently:CreateFeature&quot;,<br>        &quot;evidently:CreateLaunch&quot;,<br>        &quot;evidently:CreateProject&quot;,<br>        &quot;evidently:CreateSegment&quot;,<br>        &quot;finspace:CreateEnvironment&quot;,<br>        &quot;finspace:CreateUser&quot;,<br>        &quot;firehose:CreateDeliveryStream&quot;,<br>        &quot;fis:CreateExperimentTemplate&quot;,<br>        &quot;fis:StartExperiment&quot;,<br>        &quot;fms:PutAppsList&quot;,<br>        &quot;fms:PutPolicy&quot;,<br>        &quot;fms:PutProtocolsList&quot;,<br>        &quot;fms:PutResourceSet&quot;,<br>        &quot;forecast:CreateAutoPredictor&quot;,<br>        &quot;forecast:CreateDataset&quot;,<br>        &quot;forecast:CreateDatasetGroup&quot;,<br>        &quot;forecast:CreateDatasetImportJob&quot;,<br>        &quot;forecast:CreateExplainability&quot;,<br>        &quot;forecast:CreateExplainabilityExport&quot;,<br>        &quot;forecast:CreateForecast&quot;,<br>        &quot;forecast:CreateForecastEndpoint&quot;,<br>        &quot;forecast:CreateForecastExportJob&quot;,<br>        &quot;forecast:CreateMonitor&quot;,<br>        &quot;forecast:CreatePredictor&quot;,<br>        &quot;forecast:CreatePredictorBacktestExportJob&quot;,<br>        &quot;forecast:CreateWhatIfAnalysis&quot;,<br>        &quot;forecast:CreateWhatIfForecast&quot;,<br>        &quot;forecast:CreateWhatIfForecastExport&quot;,<br>        &quot;forecast:ResumeResource&quot;,<br>        &quot;forecast:StopResource&quot;,<br>        &quot;frauddetector:BatchCreateVariable&quot;,<br>        &quot;frauddetector:CreateBatchImportJob&quot;,<br>        &quot;frauddetector:CreateBatchPredictionJob&quot;,<br>        &quot;frauddetector:CreateDetectorVersion&quot;,<br>        &quot;frauddetector:CreateList&quot;,<br>        &quot;frauddetector:CreateModel&quot;,<br>        &quot;frauddetector:CreateModelVersion&quot;,<br>        &quot;frauddetector:CreateRule&quot;,<br>        &quot;frauddetector:CreateVariable&quot;,<br>        &quot;frauddetector:PutDetector&quot;,<br>        &quot;frauddetector:PutEntityType&quot;,<br>        &quot;frauddetector:PutEventType&quot;,<br>        &quot;frauddetector:PutExternalModel&quot;,<br>        &quot;frauddetector:PutLabel&quot;,<br>        &quot;frauddetector:PutOutcome&quot;,<br>        &quot;frauddetector:SendEvent&quot;,<br>        &quot;freertos:CreateSoftwareConfiguration&quot;,<br>        &quot;fsx:CopyBackup&quot;,<br>        &quot;fsx:CreateBackup&quot;,<br>        &quot;fsx:CreateDataRepositoryAssociation&quot;,<br>        &quot;fsx:CreateDataRepositoryTask&quot;,<br>        &quot;fsx:CreateFileCache&quot;,<br>        &quot;fsx:CreateFileSystem&quot;,<br>        &quot;fsx:CreateFileSystemFromBackup&quot;,<br>        &quot;fsx:CreateSnapshot&quot;,<br>        &quot;fsx:CreateStorageVirtualMachine&quot;,<br>        &quot;fsx:CreateVolume&quot;,<br>        &quot;fsx:CreateVolumeFromBackup&quot;,<br>        &quot;gamelift:CreateAlias&quot;,<br>        &quot;gamelift:CreateBuild&quot;,<br>        &quot;gamelift:CreateFleet&quot;,<br>        &quot;gamelift:CreateGameServerGroup&quot;,<br>        &quot;gamelift:CreateGameSessionQueue&quot;,<br>        &quot;gamelift:CreateLocation&quot;,<br>        &quot;gamelift:CreateMatchmakingConfiguration&quot;,<br>        &quot;gamelift:CreateMatchmakingRuleSet&quot;,<br>        &quot;gamelift:CreateScript&quot;,<br>        &quot;gamesparks:CreateGame&quot;,<br>        &quot;gamesparks:CreateSnapshot&quot;,<br>        &quot;gamesparks:CreateStage&quot;,<br>        &quot;gamesparks:DisconnectPlayer&quot;,<br>        &quot;gamesparks:ExportSnapshot&quot;,<br>        &quot;gamesparks:ImportGameConfiguration&quot;,<br>        &quot;gamesparks:InvokeBackend&quot;,<br>        &quot;gamesparks:StartGeneratedCodeJob&quot;,<br>        &quot;gamesparks:StartStageDeployment&quot;,<br>        &quot;geo:CreateGeofenceCollection&quot;,<br>        &quot;geo:CreateKey&quot;,<br>        &quot;geo:CreateMap&quot;,<br>        &quot;geo:CreatePlaceIndex&quot;,<br>        &quot;geo:CreateRouteCalculator&quot;,<br>        &quot;geo:CreateTracker&quot;,<br>        &quot;globalaccelerator:CreateAccelerator&quot;,<br>        &quot;globalaccelerator:CreateCustomRoutingAccelerator&quot;,<br>        &quot;glue:CreateBlueprint&quot;,<br>        &quot;glue:CreateConnection&quot;,<br>        &quot;glue:CreateCrawler&quot;,<br>        &quot;glue:CreateDataQualityRuleset&quot;,<br>        &quot;glue:CreateDevEndpoint&quot;,<br>        &quot;glue:CreateJob&quot;,<br>        &quot;glue:CreateMLTransform&quot;,<br>        &quot;glue:CreateRegistry&quot;,<br>        &quot;glue:CreateSchema&quot;,<br>        &quot;glue:CreateSession&quot;,<br>        &quot;glue:CreateTrigger&quot;,<br>        &quot;glue:CreateWorkflow&quot;,<br>        &quot;grafana:CreateWorkspace&quot;,<br>        &quot;greengrass:CreateComponentVersion&quot;,<br>        &quot;greengrass:CreateConnectorDefinition&quot;,<br>        &quot;greengrass:CreateCoreDefinition&quot;,<br>        &quot;greengrass:CreateDeployment&quot;,<br>        &quot;greengrass:CreateDeviceDefinition&quot;,<br>        &quot;greengrass:CreateFunctionDefinition&quot;,<br>        &quot;greengrass:CreateGroup&quot;,<br>        &quot;greengrass:CreateLoggerDefinition&quot;,<br>        &quot;greengrass:CreateResourceDefinition&quot;,<br>        &quot;greengrass:CreateSubscriptionDefinition&quot;,<br>        &quot;greengrass:StartBulkDeployment&quot;,<br>        &quot;groundstation:CreateConfig&quot;,<br>        &quot;groundstation:CreateDataflowEndpointGroup&quot;,<br>        &quot;groundstation:CreateEphemeris&quot;,<br>        &quot;groundstation:CreateMissionProfile&quot;,<br>        &quot;groundstation:ReserveContact&quot;,<br>        &quot;guardduty:CreateDetector&quot;,<br>        &quot;guardduty:CreateFilter&quot;,<br>        &quot;guardduty:CreateIPSet&quot;,<br>        &quot;guardduty:CreateThreatIntelSet&quot;,<br>        &quot;healthlake:CreateFHIRDatastore&quot;,<br>        &quot;iam:CreateInstanceProfile&quot;,<br>        &quot;iam:CreateOpenIDConnectProvider&quot;,<br>        &quot;iam:CreatePolicy&quot;,<br>        &quot;iam:CreateRole&quot;,<br>        &quot;iam:CreateSAMLProvider&quot;,<br>        &quot;iam:CreateUser&quot;,<br>        &quot;iam:CreateVirtualMFADevice&quot;,<br>        &quot;iam:UploadServerCertificate&quot;,<br>        &quot;imagebuilder:CreateComponent&quot;,<br>        &quot;imagebuilder:CreateContainerRecipe&quot;,<br>        &quot;imagebuilder:CreateDistributionConfiguration&quot;,<br>        &quot;imagebuilder:CreateImage&quot;,<br>        &quot;imagebuilder:CreateImagePipeline&quot;,<br>        &quot;imagebuilder:CreateImageRecipe&quot;,<br>        &quot;imagebuilder:CreateInfrastructureConfiguration&quot;,<br>        &quot;imagebuilder:ImportComponent&quot;,<br>        &quot;imagebuilder:ImportVmImage&quot;,<br>        &quot;inspector2:CreateFilter&quot;,<br>        &quot;internetmonitor:CreateMonitor&quot;,<br>        &quot;iot1click:CreateProject&quot;,<br>        &quot;iot1click:FinalizeDeviceClaim&quot;,<br>        &quot;iot:CreateAuthorizer&quot;,<br>        &quot;iot:CreateBillingGroup&quot;,<br>        &quot;iot:CreateCustomMetric&quot;,<br>        &quot;iot:CreateDimension&quot;,<br>        &quot;iot:CreateDomainConfiguration&quot;,<br>        &quot;iot:CreateDynamicThingGroup&quot;,<br>        &quot;iot:CreateFleetMetric&quot;,<br>        &quot;iot:CreateJob&quot;,<br>        &quot;iot:CreateJobTemplate&quot;,<br>        &quot;iot:CreateMitigationAction&quot;,<br>        &quot;iot:CreateOTAUpdate&quot;,<br>        &quot;iot:CreatePolicy&quot;,<br>        &quot;iot:CreateProvisioningTemplate&quot;,<br>        &quot;iot:CreateRoleAlias&quot;,<br>        &quot;iot:CreateScheduledAudit&quot;,<br>        &quot;iot:CreateSecurityProfile&quot;,<br>        &quot;iot:CreateStream&quot;,<br>        &quot;iot:CreateThingGroup&quot;,<br>        &quot;iot:CreateThingType&quot;,<br>        &quot;iot:CreateTopicRule&quot;,<br>        &quot;iot:OpenTunnel&quot;,<br>        &quot;iot:RegisterCACertificate&quot;,<br>        &quot;iotanalytics:CreateChannel&quot;,<br>        &quot;iotanalytics:CreateDataset&quot;,<br>        &quot;iotanalytics:CreateDatastore&quot;,<br>        &quot;iotanalytics:CreatePipeline&quot;,<br>        &quot;iotdeviceadvisor:CreateSuiteDefinition&quot;,<br>        &quot;iotdeviceadvisor:StartSuiteRun&quot;,<br>        &quot;iotevents:CreateAlarmModel&quot;,<br>        &quot;iotevents:CreateDetectorModel&quot;,<br>        &quot;iotevents:CreateInput&quot;,<br>        &quot;iotfleethub:CreateApplication&quot;,<br>        &quot;iotfleetwise:BatchCreateVehicle&quot;,<br>        &quot;iotfleetwise:CreateCampaign&quot;,<br>        &quot;iotfleetwise:CreateDecoderManifest&quot;,<br>        &quot;iotfleetwise:CreateFleet&quot;,<br>        &quot;iotfleetwise:CreateModelManifest&quot;,<br>        &quot;iotfleetwise:CreateSignalCatalog&quot;,<br>        &quot;iotfleetwise:CreateVehicle&quot;,<br>        &quot;iotfleetwise:ImportSignalCatalog&quot;,<br>        &quot;iotsitewise:CreateAccessPolicy&quot;,<br>        &quot;iotsitewise:CreateAsset&quot;,<br>        &quot;iotsitewise:CreateAssetModel&quot;,<br>        &quot;iotsitewise:CreateDashboard&quot;,<br>        &quot;iotsitewise:CreateGateway&quot;,<br>        &quot;iotsitewise:CreatePortal&quot;,<br>        &quot;iotsitewise:CreateProject&quot;,<br>        &quot;iottwinmaker:CreateComponentType&quot;,<br>        &quot;iottwinmaker:CreateEntity&quot;,<br>        &quot;iottwinmaker:CreateScene&quot;,<br>        &quot;iottwinmaker:CreateSyncJob&quot;,<br>        &quot;iottwinmaker:CreateWorkspace&quot;,<br>        &quot;iotwireless:AssociateAwsAccountWithPartnerAccount&quot;,<br>        &quot;iotwireless:CreateDestination&quot;,<br>        &quot;iotwireless:CreateDeviceProfile&quot;,<br>        &quot;iotwireless:CreateFuotaTask&quot;,<br>        &quot;iotwireless:CreateMulticastGroup&quot;,<br>        &quot;iotwireless:CreateNetworkAnalyzerConfiguration&quot;,<br>        &quot;iotwireless:CreateServiceProfile&quot;,<br>        &quot;iotwireless:CreateWirelessDevice&quot;,<br>        &quot;iotwireless:CreateWirelessGateway&quot;,<br>        &quot;iotwireless:CreateWirelessGatewayTaskDefinition&quot;,<br>        &quot;ivs:CreateChannel&quot;,<br>        &quot;ivs:CreateRecordingConfiguration&quot;,<br>        &quot;ivs:CreateStreamKey&quot;,<br>        &quot;ivs:ImportPlaybackKeyPair&quot;,<br>        &quot;ivschat:CreateChatToken&quot;,<br>        &quot;ivschat:CreateLoggingConfiguration&quot;,<br>        &quot;ivschat:CreateRoom&quot;,<br>        &quot;kafka:CreateCluster&quot;,<br>        &quot;kafka:CreateClusterV2&quot;,<br>        &quot;kendra-ranking:CreateRescoreExecutionPlan&quot;,<br>        &quot;kendra:CreateDataSource&quot;,<br>        &quot;kendra:CreateFaq&quot;,<br>        &quot;kendra:CreateIndex&quot;,<br>        &quot;kendra:CreateQuerySuggestionsBlockList&quot;,<br>        &quot;kendra:CreateThesaurus&quot;,<br>        &quot;kinesisanalytics:CreateApplication&quot;,<br>        &quot;kinesisvideo:CreateSignalingChannel&quot;,<br>        &quot;kinesisvideo:CreateStream&quot;,<br>        &quot;kms:CreateKey&quot;,<br>        &quot;lambda:CreateFunction&quot;,<br>        &quot;lex:CreateBot&quot;,<br>        &quot;lex:CreateBotAlias&quot;,<br>        &quot;lex:PutBot&quot;,<br>        &quot;lex:PutBotAlias&quot;,<br>        &quot;lex:StartImport&quot;,<br>        &quot;license-manager:CreateLicenseConfiguration&quot;,<br>        &quot;license-manager:CreateLicenseManagerReportGenerator&quot;,<br>        &quot;lightsail:CreateBucket&quot;,<br>        &quot;lightsail:CreateCertificate&quot;,<br>        &quot;lightsail:CreateContainerService&quot;,<br>        &quot;lightsail:CreateDisk&quot;,<br>        &quot;lightsail:CreateDiskFromSnapshot&quot;,<br>        &quot;lightsail:CreateDiskSnapshot&quot;,<br>        &quot;lightsail:CreateDistribution&quot;,<br>        &quot;lightsail:CreateDomain&quot;,<br>        &quot;lightsail:CreateInstanceSnapshot&quot;,<br>        &quot;lightsail:CreateInstances&quot;,<br>        &quot;lightsail:CreateInstancesFromSnapshot&quot;,<br>        &quot;lightsail:CreateKeyPair&quot;,<br>        &quot;lightsail:CreateLoadBalancer&quot;,<br>        &quot;lightsail:CreateRelationalDatabase&quot;,<br>        &quot;lightsail:CreateRelationalDatabaseFromSnapshot&quot;,<br>        &quot;lightsail:CreateRelationalDatabaseSnapshot&quot;,<br>        &quot;logs:CreateLogGroup&quot;,<br>        &quot;logs:PutDestination&quot;,<br>        &quot;lookoutequipment:CreateDataset&quot;,<br>        &quot;lookoutequipment:CreateInferenceScheduler&quot;,<br>        &quot;lookoutequipment:CreateLabelGroup&quot;,<br>        &quot;lookoutequipment:CreateModel&quot;,<br>        &quot;lookoutmetrics:CreateAlert&quot;,<br>        &quot;lookoutmetrics:CreateAnomalyDetector&quot;,<br>        &quot;lookoutmetrics:CreateMetricSet&quot;,<br>        &quot;lookoutvision:CreateModel&quot;,<br>        &quot;m2:CreateApplication&quot;,<br>        &quot;m2:CreateEnvironment&quot;,<br>        &quot;macie2:CreateAllowList&quot;,<br>        &quot;macie2:CreateClassificationJob&quot;,<br>        &quot;macie2:CreateCustomDataIdentifier&quot;,<br>        &quot;macie2:CreateFindingsFilter&quot;,<br>        &quot;macie2:CreateMember&quot;,<br>        &quot;managedblockchain:CreateAccessor&quot;,<br>        &quot;managedblockchain:CreateMember&quot;,<br>        &quot;managedblockchain:CreateNetwork&quot;,<br>        &quot;managedblockchain:CreateNode&quot;,<br>        &quot;managedblockchain:CreateProposal&quot;,<br>        &quot;mediaconvert:CreateJob&quot;,<br>        &quot;mediaconvert:CreateJobTemplate&quot;,<br>        &quot;mediaconvert:CreatePreset&quot;,<br>        &quot;mediaconvert:CreateQueue&quot;,<br>        &quot;medialive:CreateChannel&quot;,<br>        &quot;medialive:CreateInput&quot;,<br>        &quot;medialive:CreateInputSecurityGroup&quot;,<br>        &quot;medialive:CreateMultiplex&quot;,<br>        &quot;medialive:CreatePartnerInput&quot;,<br>        &quot;medialive:PurchaseOffering&quot;,<br>        &quot;mediapackage-vod:CreateAsset&quot;,<br>        &quot;mediapackage-vod:CreatePackagingConfiguration&quot;,<br>        &quot;mediapackage-vod:CreatePackagingGroup&quot;,<br>        &quot;mediapackage:CreateChannel&quot;,<br>        &quot;mediapackage:CreateHarvestJob&quot;,<br>        &quot;mediapackage:CreateOriginEndpoint&quot;,<br>        &quot;mediastore:CreateContainer&quot;,<br>        &quot;mediatailor:CreateChannel&quot;,<br>        &quot;mediatailor:CreateLiveSource&quot;,<br>        &quot;mediatailor:CreateSourceLocation&quot;,<br>        &quot;mediatailor:CreateVodSource&quot;,<br>        &quot;mediatailor:PutPlaybackConfiguration&quot;,<br>        &quot;memorydb:CopySnapshot&quot;,<br>        &quot;memorydb:CreateAcl&quot;,<br>        &quot;memorydb:CreateCluster&quot;,<br>        &quot;memorydb:CreateParameterGroup&quot;,<br>        &quot;memorydb:CreateSnapshot&quot;,<br>        &quot;memorydb:CreateSubnetGroup&quot;,<br>        &quot;memorydb:CreateUser&quot;,<br>        &quot;memorydb:PurchaseReservedNodesOffering&quot;,<br>        &quot;mgn:CreateApplication&quot;,<br>        &quot;mgn:CreateLaunchConfigurationTemplate&quot;,<br>        &quot;mgn:CreateReplicationConfigurationTemplate&quot;,<br>        &quot;mgn:CreateVcenterClientForMgn&quot;,<br>        &quot;mgn:CreateWave&quot;,<br>        &quot;mgn:RegisterAgentForMgn&quot;,<br>        &quot;mgn:StartCutover&quot;,<br>        &quot;mgn:StartTest&quot;,<br>        &quot;migrationhub-orchestrator:CreateWorkflow&quot;,<br>        &quot;mobiletargeting:CreateApp&quot;,<br>        &quot;mobiletargeting:CreateCampaign&quot;,<br>        &quot;mobiletargeting:CreateEmailTemplate&quot;,<br>        &quot;mobiletargeting:CreateInAppTemplate&quot;,<br>        &quot;mobiletargeting:CreateJourney&quot;,<br>        &quot;mobiletargeting:CreatePushTemplate&quot;,<br>        &quot;mobiletargeting:CreateSegment&quot;,<br>        &quot;mobiletargeting:CreateSmsTemplate&quot;,<br>        &quot;mobiletargeting:CreateVoiceTemplate&quot;,<br>        &quot;monitron:CreateProject&quot;,<br>        &quot;mq:CreateBroker&quot;,<br>        &quot;mq:CreateConfiguration&quot;,<br>        &quot;network-firewall:CreateFirewall&quot;,<br>        &quot;network-firewall:CreateFirewallPolicy&quot;,<br>        &quot;network-firewall:CreateRuleGroup&quot;,<br>        &quot;networkmanager:CreateConnectAttachment&quot;,<br>        &quot;networkmanager:CreateConnectPeer&quot;,<br>        &quot;networkmanager:CreateConnection&quot;,<br>        &quot;networkmanager:CreateCoreNetwork&quot;,<br>        &quot;networkmanager:CreateDevice&quot;,<br>        &quot;networkmanager:CreateGlobalNetwork&quot;,<br>        &quot;networkmanager:CreateLink&quot;,<br>        &quot;networkmanager:CreateSite&quot;,<br>        &quot;networkmanager:CreateSiteToSiteVpnAttachment&quot;,<br>        &quot;networkmanager:CreateTransitGatewayPeering&quot;,<br>        &quot;networkmanager:CreateTransitGatewayRouteTableAttachment&quot;,<br>        &quot;networkmanager:CreateVpcAttachment&quot;,<br>        &quot;nimble:CreateLaunchProfile&quot;,<br>        &quot;nimble:CreateStreamingImage&quot;,<br>        &quot;nimble:CreateStreamingSession&quot;,<br>        &quot;nimble:CreateStudio&quot;,<br>        &quot;nimble:CreateStudioComponent&quot;,<br>        &quot;oam:CreateLink&quot;,<br>        &quot;oam:CreateSink&quot;,<br>        &quot;omics:CreateReferenceStore&quot;,<br>        &quot;omics:CreateRunGroup&quot;,<br>        &quot;omics:CreateSequenceStore&quot;,<br>        &quot;omics:CreateWorkflow&quot;,<br>        &quot;omics:StartRun&quot;,<br>        &quot;organizations:CreateAccount&quot;,<br>        &quot;organizations:CreateGovCloudAccount&quot;,<br>        &quot;organizations:CreateOrganizationalUnit&quot;,<br>        &quot;organizations:CreatePolicy&quot;,<br>        &quot;organizations:InviteAccountToOrganization&quot;,<br>        &quot;organizations:PutResourcePolicy&quot;,<br>        &quot;panorama:CreateApplicationInstance&quot;,<br>        &quot;panorama:CreatePackage&quot;,<br>        &quot;panorama:ProvisionDevice&quot;,<br>        &quot;pipes:CreatePipe&quot;,<br>        &quot;private-networks:ActivateNetworkSite&quot;,<br>        &quot;private-networks:CreateNetwork&quot;,<br>        &quot;private-networks:CreateNetworkSite&quot;,<br>        &quot;profile:CreateDomain&quot;,<br>        &quot;profile:CreateIntegrationWorkflow&quot;,<br>        &quot;profile:PutIntegration&quot;,<br>        &quot;profile:PutProfileObjectType&quot;,<br>        &quot;proton:CreateComponent&quot;,<br>        &quot;proton:CreateEnvironment&quot;,<br>        &quot;proton:CreateEnvironmentAccountConnection&quot;,<br>        &quot;proton:CreateEnvironmentTemplate&quot;,<br>        &quot;proton:CreateEnvironmentTemplateMajorVersion&quot;,<br>        &quot;proton:CreateEnvironmentTemplateMinorVersion&quot;,<br>        &quot;proton:CreateEnvironmentTemplateVersion&quot;,<br>        &quot;proton:CreateRepository&quot;,<br>        &quot;proton:CreateService&quot;,<br>        &quot;proton:CreateServiceTemplate&quot;,<br>        &quot;proton:CreateServiceTemplateMajorVersion&quot;,<br>        &quot;proton:CreateServiceTemplateMinorVersion&quot;,<br>        &quot;proton:CreateServiceTemplateVersion&quot;,<br>        &quot;qldb:CreateLedger&quot;,<br>        &quot;qldb:PartiQLCreateTable&quot;,<br>        &quot;qldb:StreamJournalToKinesis&quot;,<br>        &quot;quicksight:CancelIngestion&quot;,<br>        &quot;quicksight:CreateAccountCustomization&quot;,<br>        &quot;quicksight:CreateAnalysis&quot;,<br>        &quot;quicksight:CreateCustomPermissions&quot;,<br>        &quot;quicksight:CreateDashboard&quot;,<br>        &quot;quicksight:CreateDataSet&quot;,<br>        &quot;quicksight:CreateDataSource&quot;,<br>        &quot;quicksight:CreateFolder&quot;,<br>        &quot;quicksight:CreateGroupMembership&quot;,<br>        &quot;quicksight:CreateIngestion&quot;,<br>        &quot;quicksight:CreateTemplate&quot;,<br>        &quot;quicksight:CreateTemplateAlias&quot;,<br>        &quot;quicksight:CreateTheme&quot;,<br>        &quot;quicksight:CreateThemeAlias&quot;,<br>        &quot;quicksight:GenerateEmbedUrlForAnonymousUser&quot;,<br>        &quot;quicksight:PassDataSet&quot;,<br>        &quot;quicksight:PassDataSource&quot;,<br>        &quot;ram:CreateResourceShare&quot;,<br>        &quot;rbin:CreateRule&quot;,<br>        &quot;rds:CopyDBClusterParameterGroup&quot;,<br>        &quot;rds:CopyDBClusterSnapshot&quot;,<br>        &quot;rds:CopyDBParameterGroup&quot;,<br>        &quot;rds:CopyDBSnapshot&quot;,<br>        &quot;rds:CopyOptionGroup&quot;,<br>        &quot;rds:CreateBlueGreenDeployment&quot;,<br>        &quot;rds:CreateCustomDBEngineVersion&quot;,<br>        &quot;rds:CreateDBCluster&quot;,<br>        &quot;rds:CreateDBClusterEndpoint&quot;,<br>        &quot;rds:CreateDBClusterParameterGroup&quot;,<br>        &quot;rds:CreateDBClusterSnapshot&quot;,<br>        &quot;rds:CreateDBInstance&quot;,<br>        &quot;rds:CreateDBInstanceReadReplica&quot;,<br>        &quot;rds:CreateDBParameterGroup&quot;,<br>        &quot;rds:CreateDBProxy&quot;,<br>        &quot;rds:CreateDBProxyEndpoint&quot;,<br>        &quot;rds:CreateDBSecurityGroup&quot;,<br>        &quot;rds:CreateDBSnapshot&quot;,<br>        &quot;rds:CreateDBSubnetGroup&quot;,<br>        &quot;rds:CreateEventSubscription&quot;,<br>        &quot;rds:CreateOptionGroup&quot;,<br>        &quot;rds:PurchaseReservedDBInstancesOffering&quot;,<br>        &quot;rds:RestoreDBClusterFromS3&quot;,<br>        &quot;rds:RestoreDBClusterFromSnapshot&quot;,<br>        &quot;rds:RestoreDBClusterToPointInTime&quot;,<br>        &quot;rds:RestoreDBInstanceFromDBSnapshot&quot;,<br>        &quot;rds:RestoreDBInstanceFromS3&quot;,<br>        &quot;rds:RestoreDBInstanceToPointInTime&quot;,<br>        &quot;rds:SwitchoverBlueGreenDeployment&quot;,<br>        &quot;redshift-serverless:CreateNamespace&quot;,<br>        &quot;redshift-serverless:CreateWorkgroup&quot;,<br>        &quot;redshift:CopyClusterSnapshot&quot;,<br>        &quot;redshift:CreateCluster&quot;,<br>        &quot;redshift:CreateClusterParameterGroup&quot;,<br>        &quot;redshift:CreateClusterSecurityGroup&quot;,<br>        &quot;redshift:CreateClusterSnapshot&quot;,<br>        &quot;redshift:CreateClusterSubnetGroup&quot;,<br>        &quot;redshift:CreateEventSubscription&quot;,<br>        &quot;redshift:CreateHsmClientCertificate&quot;,<br>        &quot;redshift:CreateHsmConfiguration&quot;,<br>        &quot;redshift:CreateSnapshotCopyGrant&quot;,<br>        &quot;redshift:CreateSnapshotSchedule&quot;,<br>        &quot;redshift:CreateUsageLimit&quot;,<br>        &quot;redshift:RestoreFromClusterSnapshot&quot;,<br>        &quot;refactor-spaces:CreateApplication&quot;,<br>        &quot;refactor-spaces:CreateEnvironment&quot;,<br>        &quot;refactor-spaces:CreateRoute&quot;,<br>        &quot;refactor-spaces:CreateService&quot;,<br>        &quot;rekognition:CopyProjectVersion&quot;,<br>        &quot;rekognition:CreateCollection&quot;,<br>        &quot;rekognition:CreateProjectVersion&quot;,<br>        &quot;rekognition:CreateStreamProcessor&quot;,<br>        &quot;resiliencehub:CreateApp&quot;,<br>        &quot;resiliencehub:CreateRecommendationTemplate&quot;,<br>        &quot;resiliencehub:CreateResiliencyPolicy&quot;,<br>        &quot;resiliencehub:StartAppAssessment&quot;,<br>        &quot;resource-explorer-2:CreateIndex&quot;,<br>        &quot;resource-explorer-2:CreateView&quot;,<br>        &quot;resource-groups:CreateGroup&quot;,<br>        &quot;robomaker:CreateDeploymentJob&quot;,<br>        &quot;robomaker:CreateFleet&quot;,<br>        &quot;robomaker:CreateRobot&quot;,<br>        &quot;robomaker:CreateRobotApplication&quot;,<br>        &quot;robomaker:CreateSimulationApplication&quot;,<br>        &quot;robomaker:CreateSimulationJob&quot;,<br>        &quot;robomaker:CreateWorldExportJob&quot;,<br>        &quot;robomaker:CreateWorldGenerationJob&quot;,<br>        &quot;robomaker:CreateWorldTemplate&quot;,<br>        &quot;robomaker:StartSimulationJobBatch&quot;,<br>        &quot;rolesanywhere:CreateProfile&quot;,<br>        &quot;rolesanywhere:CreateTrustAnchor&quot;,<br>        &quot;rolesanywhere:ImportCrl&quot;,<br>        &quot;route53-recovery-control-config:CreateCluster&quot;,<br>        &quot;route53-recovery-control-config:CreateControlPanel&quot;,<br>        &quot;route53-recovery-control-config:CreateSafetyRule&quot;,<br>        &quot;route53-recovery-readiness:CreateCell&quot;,<br>        &quot;route53-recovery-readiness:CreateReadinessCheck&quot;,<br>        &quot;route53-recovery-readiness:CreateRecoveryGroup&quot;,<br>        &quot;route53-recovery-readiness:CreateResourceSet&quot;,<br>        &quot;route53resolver:AssociateFirewallRuleGroup&quot;,<br>        &quot;route53resolver:CreateFirewallDomainList&quot;,<br>        &quot;route53resolver:CreateFirewallRuleGroup&quot;,<br>        &quot;route53resolver:CreateResolverEndpoint&quot;,<br>        &quot;route53resolver:CreateResolverQueryLogConfig&quot;,<br>        &quot;route53resolver:CreateResolverRule&quot;,<br>        &quot;rum:CreateAppMonitor&quot;,<br>        &quot;s3:CreateJob&quot;,<br>        &quot;s3:PutStorageLensConfiguration&quot;,<br>        &quot;sagemaker-geospatial:StartEarthObservationJob&quot;,<br>        &quot;sagemaker-geospatial:StartVectorEnrichmentJob&quot;,<br>        &quot;sagemaker:CreateAction&quot;,<br>        &quot;sagemaker:CreateAlgorithm&quot;,<br>        &quot;sagemaker:CreateApp&quot;,<br>        &quot;sagemaker:CreateAppImageConfig&quot;,<br>        &quot;sagemaker:CreateArtifact&quot;,<br>        &quot;sagemaker:CreateAutoMLJob&quot;,<br>        &quot;sagemaker:CreateCodeRepository&quot;,<br>        &quot;sagemaker:CreateCompilationJob&quot;,<br>        &quot;sagemaker:CreateContext&quot;,<br>        &quot;sagemaker:CreateDataQualityJobDefinition&quot;,<br>        &quot;sagemaker:CreateDeviceFleet&quot;,<br>        &quot;sagemaker:CreateDomain&quot;,<br>        &quot;sagemaker:CreateEdgeDeploymentPlan&quot;,<br>        &quot;sagemaker:CreateEdgeDeploymentStage&quot;,<br>        &quot;sagemaker:CreateEdgePackagingJob&quot;,<br>        &quot;sagemaker:CreateEndpoint&quot;,<br>        &quot;sagemaker:CreateEndpointConfig&quot;,<br>        &quot;sagemaker:CreateExperiment&quot;,<br>        &quot;sagemaker:CreateFeatureGroup&quot;,<br>        &quot;sagemaker:CreateFlowDefinition&quot;,<br>        &quot;sagemaker:CreateHub&quot;,<br>        &quot;sagemaker:CreateHumanTaskUi&quot;,<br>        &quot;sagemaker:CreateHyperParameterTuningJob&quot;,<br>        &quot;sagemaker:CreateImage&quot;,<br>        &quot;sagemaker:CreateInferenceExperiment&quot;,<br>        &quot;sagemaker:CreateInferenceRecommendationsJob&quot;,<br>        &quot;sagemaker:CreateLabelingJob&quot;,<br>        &quot;sagemaker:CreateModel&quot;,<br>        &quot;sagemaker:CreateModelBiasJobDefinition&quot;,<br>        &quot;sagemaker:CreateModelCard&quot;,<br>        &quot;sagemaker:CreateModelExplainabilityJobDefinition&quot;,<br>        &quot;sagemaker:CreateModelPackage&quot;,<br>        &quot;sagemaker:CreateModelPackageGroup&quot;,<br>        &quot;sagemaker:CreateModelQualityJobDefinition&quot;,<br>        &quot;sagemaker:CreateMonitoringSchedule&quot;,<br>        &quot;sagemaker:CreateNotebookInstance&quot;,<br>        &quot;sagemaker:CreatePipeline&quot;,<br>        &quot;sagemaker:CreateProcessingJob&quot;,<br>        &quot;sagemaker:CreateProject&quot;,<br>        &quot;sagemaker:CreateSpace&quot;,<br>        &quot;sagemaker:CreateStudioLifecycleConfig&quot;,<br>        &quot;sagemaker:CreateTrainingJob&quot;,<br>        &quot;sagemaker:CreateTransformJob&quot;,<br>        &quot;sagemaker:CreateTrial&quot;,<br>        &quot;sagemaker:CreateTrialComponent&quot;,<br>        &quot;sagemaker:CreateUserProfile&quot;,<br>        &quot;sagemaker:CreateWorkforce&quot;,<br>        &quot;sagemaker:CreateWorkteam&quot;,<br>        &quot;sagemaker:ImportHubContent&quot;,<br>        &quot;sagemaker:RegisterDevices&quot;,<br>        &quot;savingsplans:CreateSavingsPlan&quot;,<br>        &quot;scheduler:CreateScheduleGroup&quot;,<br>        &quot;schemas:CreateDiscoverer&quot;,<br>        &quot;schemas:CreateRegistry&quot;,<br>        &quot;schemas:CreateSchema&quot;,<br>        &quot;secretsmanager:CreateSecret&quot;,<br>        &quot;securityhub:EnableSecurityHub&quot;,<br>        &quot;servicecatalog:CreateApplication&quot;,<br>        &quot;servicecatalog:CreateAttributeGroup&quot;,<br>        &quot;servicecatalog:CreatePortfolio&quot;,<br>        &quot;servicecatalog:CreateProduct&quot;,<br>        &quot;servicediscovery:CreateHttpNamespace&quot;,<br>        &quot;servicediscovery:CreatePrivateDnsNamespace&quot;,<br>        &quot;servicediscovery:CreatePublicDnsNamespace&quot;,<br>        &quot;servicediscovery:CreateService&quot;,<br>        &quot;ses:CreateConfigurationSet&quot;,<br>        &quot;ses:CreateContactList&quot;,<br>        &quot;ses:CreateDedicatedIpPool&quot;,<br>        &quot;ses:CreateDeliverabilityTestReport&quot;,<br>        &quot;ses:CreateEmailIdentity&quot;,<br>        &quot;shield:CreateProtection&quot;,<br>        &quot;shield:CreateProtectionGroup&quot;,<br>        &quot;signer:PutSigningProfile&quot;,<br>        &quot;simspaceweaver:StartSimulation&quot;,<br>        &quot;sms-voice:CreateConfigurationSet&quot;,<br>        &quot;sms-voice:CreateOptOutList&quot;,<br>        &quot;sms-voice:CreatePool&quot;,<br>        &quot;sms-voice:RequestPhoneNumber&quot;,<br>        &quot;snow-device-management:CreateTask&quot;,<br>        &quot;sns:CreateTopic&quot;,<br>        &quot;sqlworkbench:CreateChart&quot;,<br>        &quot;sqlworkbench:CreateConnection&quot;,<br>        &quot;sqlworkbench:CreateNotebook&quot;,<br>        &quot;sqlworkbench:CreateNotebookCell&quot;,<br>        &quot;sqlworkbench:CreateNotebookFromVersion&quot;,<br>        &quot;sqlworkbench:CreateNotebookVersion&quot;,<br>        &quot;sqlworkbench:CreateSavedQuery&quot;,<br>        &quot;sqlworkbench:DuplicateNotebook&quot;,<br>        &quot;sqlworkbench:ImportNotebook&quot;,<br>        &quot;sqlworkbench:RestoreNotebookVersion&quot;,<br>        &quot;sqs:CreateQueue&quot;,<br>        &quot;ssm-contacts:CreateContact&quot;,<br>        &quot;ssm-incidents:CreateReplicationSet&quot;,<br>        &quot;ssm-incidents:CreateResponsePlan&quot;,<br>        &quot;ssm-sap:RegisterApplication&quot;,<br>        &quot;ssm:CreateActivation&quot;,<br>        &quot;ssm:CreateAssociation&quot;,<br>        &quot;ssm:CreateDocument&quot;,<br>        &quot;ssm:CreateMaintenanceWindow&quot;,<br>        &quot;ssm:CreateOpsItem&quot;,<br>        &quot;ssm:CreateOpsMetadata&quot;,<br>        &quot;ssm:CreatePatchBaseline&quot;,<br>        &quot;ssm:PutParameter&quot;,<br>        &quot;ssm:RegisterManagedInstance&quot;,<br>        &quot;sso:CreatePermissionSet&quot;,<br>        &quot;states:CreateActivity&quot;,<br>        &quot;states:CreateStateMachine&quot;,<br>        &quot;storagegateway:ActivateGateway&quot;,<br>        &quot;storagegateway:AssociateFileSystem&quot;,<br>        &quot;storagegateway:CreateCachediSCSIVolume&quot;,<br>        &quot;storagegateway:CreateNFSFileShare&quot;,<br>        &quot;storagegateway:CreateSMBFileShare&quot;,<br>        &quot;storagegateway:CreateSnapshot&quot;,<br>        &quot;storagegateway:CreateSnapshotFromVolumeRecoveryPoint&quot;,<br>        &quot;storagegateway:CreateStorediSCSIVolume&quot;,<br>        &quot;storagegateway:CreateTapePool&quot;,<br>        &quot;storagegateway:CreateTapeWithBarcode&quot;,<br>        &quot;storagegateway:CreateTapes&quot;,<br>        &quot;swf:RegisterDomain&quot;,<br>        &quot;synthetics:CreateCanary&quot;,<br>        &quot;synthetics:CreateGroup&quot;,<br>        &quot;timestream:CreateDatabase&quot;,<br>        &quot;timestream:CreateScheduledQuery&quot;,<br>        &quot;timestream:CreateTable&quot;,<br>        &quot;tnb:CreateSolFunctionPackage&quot;,<br>        &quot;tnb:CreateSolNetworkInstance&quot;,<br>        &quot;tnb:CreateSolNetworkPackage&quot;,<br>        &quot;transcribe:CreateLanguageModel&quot;,<br>        &quot;transcribe:CreateMedicalVocabulary&quot;,<br>        &quot;transcribe:CreateVocabulary&quot;,<br>        &quot;transcribe:CreateVocabularyFilter&quot;,<br>        &quot;transcribe:StartMedicalTranscriptionJob&quot;,<br>        &quot;transcribe:StartTranscriptionJob&quot;,<br>        &quot;transfer:CreateAgreement&quot;,<br>        &quot;transfer:CreateConnector&quot;,<br>        &quot;transfer:CreateProfile&quot;,<br>        &quot;transfer:CreateServer&quot;,<br>        &quot;transfer:CreateUser&quot;,<br>        &quot;transfer:CreateWorkflow&quot;,<br>        &quot;transfer:ImportCertificate&quot;,<br>        &quot;transfer:ImportHostKey&quot;,<br>        &quot;translate:CreateParallelData&quot;,<br>        &quot;translate:ImportTerminology&quot;,<br>        &quot;vendor-insights:CreateDataSource&quot;,<br>        &quot;vendor-insights:CreateSecurityProfile&quot;,<br>        &quot;voiceid:CreateDomain&quot;,<br>        &quot;vpc-lattice:CreateAccessLogSubscription&quot;,<br>        &quot;vpc-lattice:CreateListener&quot;,<br>        &quot;vpc-lattice:CreateRule&quot;,<br>        &quot;vpc-lattice:CreateService&quot;,<br>        &quot;vpc-lattice:CreateServiceNetwork&quot;,<br>        &quot;vpc-lattice:CreateServiceNetworkServiceAssociation&quot;,<br>        &quot;vpc-lattice:CreateServiceNetworkVpcAssociation&quot;,<br>        &quot;vpc-lattice:CreateTargetGroup&quot;,<br>        &quot;waf-regional:CreateRateBasedRule&quot;,<br>        &quot;waf-regional:CreateRule&quot;,<br>        &quot;waf-regional:CreateRuleGroup&quot;,<br>        &quot;waf-regional:CreateWebACL&quot;,<br>        &quot;waf:CreateRateBasedRule&quot;,<br>        &quot;waf:CreateRule&quot;,<br>        &quot;waf:CreateRuleGroup&quot;,<br>        &quot;waf:CreateWebACL&quot;,<br>        &quot;wafv2:CreateIPSet&quot;,<br>        &quot;wafv2:CreateRegexPatternSet&quot;,<br>        &quot;wafv2:CreateRuleGroup&quot;,<br>        &quot;wafv2:CreateWebACL&quot;,<br>        &quot;wellarchitected:CreateWorkload&quot;,<br>        &quot;wellarchitected:ImportLens&quot;,<br>        &quot;wisdom:CreateAssistant&quot;,<br>        &quot;wisdom:CreateAssistantAssociation&quot;,<br>        &quot;wisdom:CreateContent&quot;,<br>        &quot;wisdom:CreateKnowledgeBase&quot;,<br>        &quot;wisdom:CreateSession&quot;,<br>        &quot;worklink:CreateFleet&quot;,<br>        &quot;workspaces-web:CreateBrowserSettings&quot;,<br>        &quot;workspaces-web:CreateNetworkSettings&quot;,<br>        &quot;workspaces-web:CreatePortal&quot;,<br>        &quot;workspaces-web:CreateTrustStore&quot;,<br>        &quot;workspaces-web:CreateUserAccessLoggingSettings&quot;,<br>        &quot;workspaces-web:CreateUserSettings&quot;,<br>        &quot;workspaces:CopyWorkspaceImage&quot;,<br>        &quot;workspaces:CreateConnectionAlias&quot;,<br>        &quot;workspaces:CreateIpGroup&quot;,<br>        &quot;workspaces:CreateStandbyWorkspaces&quot;,<br>        &quot;workspaces:CreateUpdatedWorkspaceImage&quot;,<br>        &quot;workspaces:CreateWorkspaceBundle&quot;,<br>        &quot;workspaces:CreateWorkspaceImage&quot;,<br>        &quot;workspaces:CreateWorkspaces&quot;,<br>        &quot;workspaces:RegisterWorkspaceDirectory&quot;,<br>        &quot;xray:CreateGroup&quot;,<br>        &quot;xray:CreateSamplingRule&quot;,<br>      ],<br>      &quot;Resource&quot;: &quot;*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;Null&quot;: {<br>          &quot;aws:RequestTag/Owner&quot;: &quot;true&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><p>These actions are also constantly evolving. There is no central AWS documentation or location to gather these easily. To enforce tag policies for all resource types, once would need 34 KB of SCPs. That is 7 SCPs :)</p><h3>Conclusion</h3><p>If you don’t have an AWS Organization setup, do it as soon as possible. Take advantage of AWS Control Tower. Invite all existing accounts under organization. Review and implement SCP policies and other controls that come with the Control Tower. Identify and apply SCPs that you can implement outside of what the Control Tower provides. Leave room for adding future SCP policies. Periodically review the SCPs and add additional ones as AWS announces new features. Document and externally track the policies in place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d23b144ec72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CWPP — Agents, Agentless or Hybrid?]]></title>
            <link>https://medium.com/@seshu/cwpp-agents-agentless-or-hybrid-dbad4c87ef91?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbad4c87ef91</guid>
            <category><![CDATA[agentless]]></category>
            <category><![CDATA[cwpp]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Sat, 04 Mar 2023 23:09:47 GMT</pubDate>
            <atom:updated>2023-03-04T23:09:47.010Z</atom:updated>
            <content:encoded><![CDATA[<h3>CWPP — Agents, Agentless or Hybrid?</h3><p>Cloud Workload Protection Platform (CWPP) is a security solution to protect compute workloads like Virtual Machines (VM), containers and serverless resources running in the cloud. It provides security teams visibility into compute resources and monitors for anomalous behavior, malicious activity, unauthorized access, vulnerabilities, secrets, compliance and configuration posture, etc. There are at least two ways of achieving this. One traditional approach is to run endpoint agent software (open-source or proprietary). Agents track activity and ship the information to a security vendor’s platform or SIEM/SOAR. The other approach involves taking snapshots (point-in-time state of a disk) and inspecting the data on it from a different compute resource. Every security vendor pitches advantages of their approach compared to the alternatives. Both approaches has advantages and drawbacks</p><h3>Agents</h3><figure><img alt="Agent running inside compute (courtesy: DALL-E)" src="https://cdn-images-1.medium.com/max/1024/0*cdfofICcDhTqB_QG" /><figcaption>Agent running in a compute (courtesy: DALL-E)</figcaption></figure><p>Deploying and maintaining agents is a pain in the neck even with Golden images, automation, etc. Cloud workloads tend to be ephemeral in nature. It is hard to track the coverage of the agent, especially in large deployments.</p><p>Agents crash, misbehave, or tend to interfere with the workloads running on the VM. The first thing customers do when this happens is shut down the agent, and they lose coverage.</p><p>Agent upgrades are painful. New features and functionality require agent upgrades. Even with seamless self-upgrading agents, the new features can cause misbehavior due to specific types of workloads that the vendor did not test. Eventually, customers tend not to upgrade agents unless they need a specific critical fix or new functionality.</p><p>Security vulnerabilities in agent software can open up new attack surfaces. Unless you have inspected the agent source code inside and out and understand it thoroughly, you are installing third-party software that potentially is a backdoor into your environment.</p><p>Depending on the size of the environment, this approach needs dedicated personnel to keep tabs on missing agent coverage or dealing with performance and other problems.</p><p>Agents may not be compatible with certain operating systems or configurations, making it difficult to protect all types of workloads.</p><p>Depending on the industry or regulatory requirements, using a third-party agent may pose compliance concerns, requiring additional scrutiny.</p><h3>Agentless</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qkTItCaiUGu3kOmf" /><figcaption>Agentless scanning compute from outside (courtesy: DALL-E)</figcaption></figure><p>Only sporadic gathering of information. Initial snapshots of VMs are slow. Even with subsequent snapshots being fast, it takes a while to cycle through all VMs and inspect the disks. The time between examination of snapshots from the same VM might be long. Hours if not days.</p><p>Some implementations might not support different operating systems (Windows, macOS — yes, you can run these on AWS) and disk layouts (multiple disks, RAID configurations, etc.).</p><p>I have seen implementations that don’t analyze containers running on the VMs or support different container runtimes (containerd, CRI-O, docker, etc.).</p><p>Ephemeral information and runtime details like running processes, listening ports, etc., cannot be reliably captured.</p><p>Depending on how the agentless approach is implemented, security vendors might ask you to share the disk encryption keys or the disk itself. Sharing encryption keys or data with third-party vendors is a can of worms. If the VM that scans the snapshots (scanner) is deployable in the customer’s environment, this is not necessary. But then, the scanner might have to be deployed one VM per account/region, or snapshots will have to be copied across regions (slow, expensive).</p><p>You have to rely on external logs like AWS CloudTrail, VPC flow logs, Route53 resolver logs, etc., to reconstruct a holistic picture.</p><p>I am not advocating for agents or agentless. There is no one-size-fits-all. Based on the skills, security staff, compliance requirements, or other needs, pick your poison 😀</p><p>In AWS, there are many ways to analyze VMs with an agentless approach. All approaches involve creating snapshots of VM disks (EBS volumes). Amazon Machine Images (AMI) are already backed by snapshots.</p><h3><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-accessing-snapshot.html">EBS direct API</a></h3><p>The Direct API can be used to read blocks of raw data from the snapshot directly using APIs. I couldn’t find a <a href="https://libfuse.github.io/doxygen/index.html">FUSE</a> implementation for this, but it should be straightforward to read and analyze the snapshot using this approach. It looks like the experimental AWS scanning functionality in Trivy uses this approach. The downside is the API throttling and the cost for APIs and disk block retrieval.</p><h3><a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html">EBS multi attach</a></h3><p>Some volume types, like provisioned io1 and io2, can be attached to multiple VMs. This might not be practical in all cases, but theoretically, these instances can be analyzed without taking snapshots by attaching the volumes to a scanning instance in read-only mode.</p><h3>Scanner VMs in-house</h3><p>A new volume is created from the snapshot that needs to be scanned. This volume is attached to a scanner VM. The data in the mount point for the volume can be analyzed using various tools. <a href="https://wiki.archlinux.org/title/Chroot">chroot</a> can come in handy 😀 Once done, the volume and the transient snapshot can be deleted. Cost overhead should be minimal since the volume and snapshot will be around for minutes. However, the scanner has to be created for every account/region where VMs or AMIs exist. It is slow and expensive to move/copy snapshots across regions. Data or encryption keys are not shared. Only results gathered from analyzing the volume are shared with CSPM or security vendors.</p><h3>Scanner VMs managed by third-party vendor</h3><p>This approach is the same as above, except data (snapshot or volume) is shared with a third-party account. An auto-scaled pool of scanners in the security vendor account takes care of scanning the data. Customers don’t have to deal with creating scanners per account/region, but the security vendor has access to a lot more data than just metadata and security findings.</p><p>Irrespective of the approach taken, there are limitations to what information can be gathered. On Linux, since the <a href="https://docs.kernel.org/filesystems/proc.html">/proc file system</a> will be missing from the snapshot, running processes, listening ports, etc., cannot be easily determined. Some analysis of log file scanning can provide clues, but there is no reliable way. But otherwise, packages, libraries, secrets, failed/successful authentications, SBOM, and the same details for running containers, pods (K8s, ECS…) and a bunch of other data can be easily gathered in a few minutes.</p><h3>Hybrid</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vgfh3qKfJmQqdhln" /><figcaption>Agentless and on-deman agent scanning compute (courtesy: DALL-E)</figcaption></figure><p>What if an agentless approach is complemented with on-demand data gathering using an agent? Gaps in information from agentless approach can be complemented with a non-intrusive approach to gathering data directly from the VMs.</p><p><a href="https://aws.amazon.com/systems-manager/">AWS Systems Manager</a> (SSM) is a service with a plethora of features. I dislike paying for unnecessary AWS services, but many features in SSM are free of cost. My favorite is <a href="https://aws.amazon.com/systems-manager/features/#Session_Manager">Session Manager</a>. Another feature is <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html">Run Command</a>, which allows remote execution of commands on managed instances. Most of the SSM functionality relies on an <a href="https://github.com/aws/amazon-ssm-agent">open-source SSM agent</a> that is already running in most AWS AMIs. However, the agent does not do anything by default because the VM does not have necessary <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html">instance profile or permissions</a> to communicate with SSM. It also works on edge devices (IoT) and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent-technical-details.html#agent-hybrid-installations">on-premises</a>. Recently, AWS announced the <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/managed-instances-default-host-management.html">Default Host Management Configuration</a>, which makes managing instances via SSM easy.</p><p>A hybrid alternative to agent and agentless can be implemented using SSM Send Command. Hand off the command(s) to run on one or more managed instances to the SSM agent using SendCommand. The results can be retrieved from SSM or aggregated in a centralized location, such as an S3 bucket.</p><p>There are many open-source endpoint software options, such as <a href="https://github.com/osquery/osquery">Osquery</a>, <a href="https://github.com/draios/sysdig">Sysdig</a>, and <a href="https://github.com/wazuh/wazuh">Wazuh</a>. There are also open-source vulnerability scanning tools like <a href="https://github.com/aquasecurity/trivy">Trivy</a> (which can also perform other functions, such as secret scanning and SBOM), <a href="https://github.com/quay/clair">Clair</a>, and <a href="https://github.com/anchore/syft">Syft</a>/<a href="https://github.com/anchore/grype">Gripe</a>.</p><p>Using the arsenal of OSS tools, it is now trivial to implement agentless scanning. However, at Ariksa, we have realized that using SSM can be more efficient without introducing yet another constantly running agent. This approach provides more data/visibility than would be possible with an agentless approach. When a VM is not managed by SSM, we fall back to the old approach of doing snapshot scanning. Of course, customers can disable the SSM approach if they do not want to use it. We send commands that have low CPU and memory limits enforced to quickly gather the necessary information. There is no need to snapshot these VMs or create volumes. The commands gather the necessary details and exit. This can be easily orchestrated across many accounts and regions using a single VM or even a Lambda. This provides us with enhanced visibility to gather the necessary data for security detections. Ideally, AWS could bake this functionality into the SSM agent as a plugin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbad4c87ef91" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Review: CloudTrail Lake Integrations]]></title>
            <link>https://medium.com/@seshu/review-cloudtrail-lake-integrations-70ca5b2df362?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/70ca5b2df362</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudtrail-lake]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Sun, 19 Feb 2023 22:24:05 GMT</pubDate>
            <atom:updated>2023-02-19T22:24:05.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVdoGp4id4kKmjDXJZ0zeQ.png" /><figcaption>Lake with Channels (Courtesy DALL-E)</figcaption></figure><p>AWS <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail</a> provides audit capabilities for risk, governance and compliance. <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake.html">CloudTrail Lake</a> (CTL) provides ability to query the audit events using SQL. Recently AWS released a new feature to ingest external audit data into CTL using <a href="https://aws.amazon.com/blogs/aws/new-aws-cloudtrail-lake-supports-ingesting-activity-events-from-non-aws-sources/">PutAuditEvents</a> API. Data is stored as immutable <a href="https://orc.apache.org/">ORC</a> files for up to 7 years (2557 days). Maybe this is AWS take on Security Information and Event Management (SIEM)? They signed up a few partners like CrowdStrike, GitHub, LaunchDarkly, Okta, Snyk.io, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*MstAODSpW0oAEEM3ZlxYjw.png" /><figcaption>CloudTrail Lake Integrations</figcaption></figure><h3>Schema</h3><p>Format of the data ingested should confirm to <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-integration-event-schema.html">CloudTrail like schema</a>. I have published my thoughts on CloudTrail schema before:</p><p><a href="https://medium.com/@seshu/aws-cloudtrail-the-good-the-bad-and-the-ugly-b314c32138d9">AWS CloudTrail — The Good, the Bad, and the Ugly</a></p><p>All the custom audit data is buried in <em>eventData</em> JSON field:</p><pre>&quot;eventData&quot;: {<br>    &quot;version&quot;: String,<br>    &quot;userIdentity&quot;: {<br>        &quot;type&quot;: String,<br>        &quot;principalId&quot;: String,<br>        &quot;details&quot;: {<br>            JSON<br>        }<br>    }, <br>    &quot;userAgent&quot;: String,<br>    &quot;eventSource&quot;: String,<br>    &quot;eventName&quot;: String,<br>    &quot;eventTime&quot;: String,<br>    &quot;UID&quot;: String,<br>    &quot;requestParameters&quot;: {<br>        JSON<br>    },<br>    &quot;responseElements&quot;: {<br>        JSON<br>    },<br>    &quot;errorCode&quot;: String,<br>    &quot;errorMessage&quot;: String,<br>    &quot;sourceIPAddress&quot;: String,<br>    &quot;recipientAccountId&quot;: String,<br>    &quot;additionalEventData&quot;: {<br>        JSON<br>    }<br>}</pre><p><em>version, userIdentity.type, userIdentity.principalId, eventSource, eventName, eventTime, UID</em> and <em>recipientAccountId</em> are required fields. All others are optional. If the external integration has additional data to log, it will have to go into <em>requestParameters</em>, <em>responseElements</em> or <em>additionalEventData </em>as unstructured data.</p><h3>ORC</h3><p>Apache ORC stores data in columnar file format. Depending on the type of data one can get very good compression. Sometimes up to 100x. ORC files are organized into stripes that are independent of each other. Queries can skip stripes that don’t hold relevant data using file and stripe level indices. When dealing with unstructured data like free form JSON, it is not super efficient. It excels when the schema is well defined. For example searching for a <em>sourceIPAddress</em> or <em>eventName </em>but not when you are looking for an arbitrary key, value inside <em>additionalEventData. </em>It would have been great, if CTL did not strictly stick to CloudTrail schema and enhanced it to add additional audit fields at the top level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*TNy2zbOrvZVyaVrj.png" /><figcaption>ORC v1 format</figcaption></figure><h3>Cost</h3><p>Cost for ingestion and storage <em>(price includes seven years of storage) is </em>$2.5 per GB. $0.005 per GB of data scanned when running queries. I am guessing the price is for raw data ingested and stored.</p><p>S3 standard price in us-east for 7 years is $1.932 per GB. Athena scanning costs the same as CTL queries: $0.005 per GB. Like I mentioned, well structured data with simple data types compresses nicely. Even if the data was saved in S3 in raw format and <a href="https://docs.aws.amazon.com/athena/latest/ug/convert-to-columnar.html">converted to ORC</a> nightly, it doesn’t cost more than $0.20 per GB for 7 years (assuming 10x compression).</p><p>Like I mentioned above, if the data is buried in the JSON fields, queries might end up scanning all the data (see <a href="https://aws.amazon.com/athena/pricing/">Athena pricing example 1</a>).</p><h3>Conclusion</h3><ul><li>There are no easy to see metrics in the dashboard. Last even timestamp is available for the channel. How many entries are ingested, stored data size, etc. are not readily available. Have to rely on a couple of CloudWatch metrics: <em>HourlyDataIngested</em> and <em>TotalDataRetained</em>.</li><li>Data cannot be exported. Can only query the data ingested. Making ORC files available for export will avoid lock in. Don’t want to ingest for 7 years with no ability to export TBs of data.</li><li>Compared to S3 with Athena it is expensive. Its even more expensive if you throw in other services <a href="https://aws.amazon.com/blogs/mt/get-visibility-into-the-activity-logs-for-your-workforce-and-customer-identities/">into the mix</a></li><li>Vendors might inconsistently push data to CTL. This can cause confusion when customers query the data across different channels. Publishing some guidelines and enhancing the schema can make this more useful.</li><li>Did not find any details on AWS QuickSight integration. Can only query from CTL dashboard or via CLI/API?</li></ul><p>With the data lock-in and almost 10x price for storage, I will probably stick with S3, Athena or Lake Formation. Will take another look as the features and functionality evolves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70ca5b2df362" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SIEM/SOAR — Red team bypass]]></title>
            <link>https://medium.com/@seshu/siem-soar-red-team-bypass-500467a29910?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/500467a29910</guid>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[bypass]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[azure-sentinel]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 19:05:20 GMT</pubDate>
            <atom:updated>2023-02-08T19:05:20.290Z</atom:updated>
            <content:encoded><![CDATA[<h3>SIEM/SOAR — Red team bypass</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*InJgmVJ8kfDfIIMp" /><figcaption>Hole in the Cloud</figcaption></figure><p>Cloud attacks haven’t yet become very sophisticated. In AWS, most of the external attacks are related to resource mis-configurations and/or stolen credentials. Many audit trail based detections in security products are easy to bypass unless they are comprehensive and complemented with resource details.</p><h3>GetCallerIdentity</h3><p><a href="https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html">GetCallerIdentity</a> is an AWS API call to determine information about credentials. Most security products have detections to see if any temporary credentials made this call followed by other API activity. A well versed attacker does not need to make this call to determine the credentials identity details. Most AWS APIs include details of credential identity when the call fails. For example when I list lambda functions with temporary credentials, I get the following error which includes the caller role, session details, account number, etc.</p><pre>aws lambda list-functions<br><br>An error occurred (AccessDeniedException) when calling the ListFunctions operation: User: arn:aws:sts::468267000000:assumed-role/EC2AccesstoS3/i-0ab5d8a0dd3000000 is not authorized to perform: lambda:ListFunctions on resource: * because no identity-based policy allows the lambda:ListFunctions action</pre><p>When security products check for GetCallerIdentity followed by specific AWS API calls, they are only laying the trap for script kiddies. A well versed attacker don’t need to call GetCallerIdentity</p><h3>Wildcards in policy</h3><p>CloudTrail includes <a href="https://medium.com/@seshu/aws-cloudtrail-the-good-the-bad-and-the-ugly-b314c32138d9">request parameters and response elements</a>. Most APIs requests and responses are logged as JSON in each CloudTrail entry. Many security product rules parse resource or IAM policy in the request/response. Policy actions are not case-sensitive. And also allow * and ? in the action suffix. For example <em>s3:ListBucket</em> can be written as any one of the following:</p><ul><li>s3:ListBucket</li><li>s3:listbucket</li><li>s3:lIST*</li><li>s3:lIsT?UcKet</li><li>…</li></ul><p>Ideally AWS should have normalized the data before logging so that it is uniform. Came across a bunch of products that do not handle case-insensitivity and/or wildcards. So it is easy to bypass most of these detections</p><h3>User agent</h3><p>Many detections check user-agent HTTP header to avoid generating noisy alerts from legitimate AWS services. But attackers can send whatever they want in the user-agent header. So attackers can send user-agent header that escapes the detections</p><h3>AssumeRole</h3><p>Some cloud security products also have detections based on temporary credentials and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html">role chaining</a>. These look fancy in demos and blogs, but I found few issues with these in many security products:</p><ul><li>Same temporary access key ID can be issued repeatedly by AWS. It has different session tokens and secret keys. Some security products are incorrectly identifying the role chain</li><li>Cross account role chaining is another issue that many security products are not properly handling. Data from a single AWS account or region is used to construct the role chain</li><li>Origin identity tracking is not trivial to do but required to deal with rogue role chaining. Irrespective of the number of role chaining hops, if the blue team cannot identify who the origin identity is, it is hard to take remediation actions</li><li>Just like how money can be routed to various countries/banks to hide the tracks, role chaining can cover tracks by hopping between compromised accounts belonging to multiple organizations</li><li>When reviewing role chaining, it should be done with the highest number of hops to least. Ideally there aren’t many use-cases that require 3 or more hops</li></ul><p>AWS could have made this easy for every one by logging origin identity details but for privacy or whatever reason, they are not doing it</p><h3>Microsoft Azure Sentinel</h3><p>I ran into <a href="https://github.com/Azure/Azure-Sentinel/">Microsoft Azure Sentinel open source repository</a> that provides out of the box detections, exploration queries, hunting queries, workbooks, playbooks, etc. Azure Sentinel is a well known SIEM/SOAR solution. There are about 100 detections in this repository <a href="https://github.com/Azure/Azure-Sentinel/tree/master/Solutions/Amazon%20Web%20Services">related to AWS</a>. These are queries on top of CloudTrail data ingested into Azure Sentinel platform. Let’s see how easy it is to bypass some of these detections</p><p><a href="https://github.com/Azure/Azure-Sentinel/tree/master/Solutions/Amazon%20Web%20Services/Analytic%20Rules">Analytical Rules</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f62189432d5fd8625b7947349fedb8b/href">https://medium.com/media/3f62189432d5fd8625b7947349fedb8b/href</a></iframe><p><a href="https://github.com/Azure/Azure-Sentinel/tree/master/Solutions/Amazon%20Web%20Services/Hunting%20Queries">Hunting Queries</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7b49282abf95d2fbdaa28d11671e1c6/href">https://medium.com/media/c7b49282abf95d2fbdaa28d11671e1c6/href</a></iframe><h3>Conclusion</h3><p>Almost all of the Azure Sentinel detections can be rewritten to avoid the bypass techniques. These problems are not unique to Azure Sentinel. Other SIEM/SOAR solutions and some CSPM vendors have similar gaps. As the attacks get sophisticated, hopefully these detection queries will be fixed. Make sure you review the out of the box detections in security products and tweak them to make them robust</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=500467a29910" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server-Side Encryption — Do you need it?]]></title>
            <link>https://medium.com/@seshu/server-side-encryption-do-you-need-it-a4e717b18f33?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4e717b18f33</guid>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[sse]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Wed, 30 Nov 2022 04:41:00 GMT</pubDate>
            <atom:updated>2022-11-30T04:41:00.878Z</atom:updated>
            <content:encoded><![CDATA[<h3>Server-Side Encryption — Do you need it?</h3><p>I run into Server-Side Encryption (SSE) every other day: compliance related alerts, <a href="https://aws.amazon.com/blogs/compute/announcing-server-side-encryption-with-amazon-simple-queue-service-managed-encryption-keys-sse-sqs-by-default/">AWS announcements</a> about some service now supporting SSE. It all started with SSE support for S3 more than a decade ago. Let’s use S3 as an example to see what it provides. There are <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html">six different ways to enable SSE with S3</a>:</p><ol><li>S3 managed encryption keys. These keys are transparently managed by S3. Key and its metadata is not exposed to the customers. This option is <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingServerSideEncryption.html">free of charge</a> and completely transparent to end users</li><li>SSE with Amazon S3 managed keys (SSE-S3). AWS manages the KMS key and it does encryption/decryption on the fly. There is one AWS managed KMS key per account, region, service type that is auto provisioned by AWS. These keys are read-only. Resource policy on these keys cannot be modified. Caller does not need KMS permissions :(</li><li>SSE with keys stored in AWS Key Management Service (SSE-KMS). These are keys created by customers. Keys are expected to have a strong resource policy tied to the key. Key rotation, deletion, policy are managed by the customer. Using this for SSE requires the caller to have one or more KMS permissions</li><li>SSE with customer-provided keys (SSE-C). Customer is expected to provide the encryption key when uploading and also when downloading the object. This means the encryption key is managed by a user or application accessing S3. Securely storing, controlling access to the key, etc. have to be dealt with</li></ol><p>For option 2 and 3, there is an additional setting whether to use a <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-key.html">bucket key</a> or not. Bucket key avoids most of the KMS API calls. A unique key per bucket is created and stored with the bucket. It is then used for encryption and decryption of the objects. If bucket key is not used, <a href="https://carlo.cloud/reducing-aws-kms-costs-with-s3-bucket-encryption-1f934603e921">KMS charges can cost a lot $$$</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*Lw9vF3vZyse5Cbxi" /><figcaption>SSE-KMS with CMK without bucket key :)</figcaption></figure><h3>Under the hood</h3><p>What happens when uploading or downloading an S3 object?</p><ul><li>Create and configure the bucket appropriately for SSE. Ideally a policy condition that restricts object creation without proper encryption is applied as bucket policy</li><li>Object is uploaded to S3 over secure connection (HTTPS)</li><li>S3 service will encrypt the data using the selected SSE mechanism and store it on one or more hard disks. For SSE-KMS, the caller is expected to have KMS key related permissions. For SSE-C, caller has to provide the encryption key in the request</li><li>When downloading an object from S3, the object is retrieved from the disk(s) and decrypted. For SSE-KMS, the caller is expected to have KMS key related permissions. For SSE-C, caller will provide the encryption key in the download request</li><li>Object contents typically are returned over secure connection (it can be over HTTP in plain text also, but that is a different issue)</li></ul><p>S3 encrypts data before storing to disk and decrypts it right after reading from disk</p><p>How does encryption at rest help? For example, my laptop hard disk is encrypted. Before the OS can be booted, I need to provide a password that allows the decryption of the hard disk. If I lose my laptop, there is very little risk of my company’s proprietary information falling in the wrong hands. If it wasn’t encrypted, one can easily mount the hard disk and access the data. So my laptop has SSE :)</p><h3>No SSE?</h3><p>What happens if we don’t use SSE?</p><ul><li>AWS disposes of broken/old storage disk where customers data is stored. Somebody dumpster driving can read the data? AWS <a href="https://aws.amazon.com/compliance/data-center/controls/">claims</a> they follow <a href="https://www.nist.gov/publications/nist-special-publication-800-88-revision-1-guidelines-media-sanitization">NIST 800–88</a>. Long story short, it is impossible to recover any data if they follow the NIST guidelines</li><li>AWS employees might maliciously access critical customer data in raw unencrypted format. In our small start-up, most employees don’t have access to our customer data. For the ones that do, we follow strict guidelines for data access in production such as explicitly obtaining customer permission, logging, peer reviewing, etc. One would expect AWS to have strong controls, processes and vigilance in place before an employee can maliciously access customer data. If we cannot trust AWS with our data, how can KMS keys that are managed by AWS help!</li><li>Portions of disk areas used by one customer are reused by AWS for another customer. For example: If I created an EBS volume and deleted it, the underlying hard-disk is re-used for other customers. According to AWS, they <a href="https://d0.awsstatic.com/whitepapers/aws-security-whitepaper.pdf">wipe the data and disk areas</a> prior to making it available to other customers</li><li>Depending on the SSE option, access to data in the bucket can be restricted by using KMS key policy (even if the S3 bucket or IAM policy allows access to contents). But this can be more trouble. If access can be restricted using IAM policy and/or S3 bucket policy, why bother using one more policy? This gets way more complicated when using cross-account KMS keys for SSE-KMS</li></ul><p>SSE for S3 service has more options compared to EBS or other AWS services. Typically for other services, only AWS managed KMS or customer managed KMS keys are possible options</p><p>Why bother with SSE when there is very little benefit in terms of security posture? Typically SSE is driven by compliance requirements: <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-cis-controls-1.4.0.html#securityhub-cis1.4-controls-2.1.1">CIS</a>, <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-pci-controls.html#pcidss-s3-4">PCI DSS</a>, etc. Many compliance frameworks also dictate the use of KMS keys which rules out the cheaper options (if available). I am not sure what security problem the authors of these compliance frameworks were trying to solve. Maybe they thought <strong><em>encryption at rest</em></strong> benefits in traditional data centers are the same in the cloud?</p><h3>Conclusion</h3><p>Even though I used AWS and S3 as an example, this probably applies to GCP, Azure and others as well</p><ul><li>Review KMS charges in the recent AWS bill</li><li>If it is negligible, leave SSE as-is</li><li>For resources in compliance scope, enable SSE as required</li><li>Resources that offer a free/cheap SSE option, enable it</li><li>Resources that hold sensitive PII information like SSN, etc., use SSE</li><li>For all other resources, feel free to not use SSE. Those $$$ can be spent on services, solutions that improve security posture</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4e717b18f33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CloudTrail — The Good, the Bad, and the Ugly]]></title>
            <link>https://medium.com/better-programming/aws-cloudtrail-the-good-the-bad-and-the-ugly-b314c32138d9?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/b314c32138d9</guid>
            <category><![CDATA[cspm]]></category>
            <category><![CDATA[ciem]]></category>
            <category><![CDATA[cloudtrail]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Tue, 18 Oct 2022 02:49:28 GMT</pubDate>
            <atom:updated>2023-03-08T18:55:11.813Z</atom:updated>
            <content:encoded><![CDATA[<h4>Glue your audit trails together easily</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/0*psEY4BKlv4SU4udM" /><figcaption><a href="https://en.wikipedia.org/wiki/The_Good,_the_Bad_and_the_Ugly#The_trio">The Good</a></figcaption></figure><p>A good audit trail captures sufficient information about <em>who</em>, <em>what</em>, <em>when</em>, and <em>where</em>. If any of these are missing or lacking in details, it becomes a nightmare to glue things together. I spent a decent amount of time analyzing <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">AWS CloudTrail</a> (CT). Many Cloud Security Posture Management (CSPM) and Cloud Infrastructure Entitlement Management (CIEM) use cases rely on CT. Let’s check how good AWS CloudTrail is!</p><h3>The Good</h3><p>eventTime: This captures when an event happened. This is in UTC and properly formatted</p><p>awsRegion: As the name suggests, the region where the AWS event took place. <em>Where </em>would have been complete if the available zone and VPC were also captured</p><p>recipientAccountId: Used for cross-account resource access. This is handy for detecting cross-account activity</p><p>sharedEventID: Can be used to glue events if the same event was delivered to multiple accounts (cross-account, etc.)</p><p>vpcEndpointId: Useful to detect the presence or absence of a VPC endpoint for certain APIs. For example, accessing the S3 bucket over the internet instead of the VPC endpoint</p><p>tlsDetails: This is handy for identifying calls to non-FIPS endpoints, insecure ciphers, or TLS versions</p><p>addendum: If, for some reason, the CT was not delivered or needs to be corrected, this field is used. This is great, but hard to find events with an addendum to check the format and test this 😕.</p><h3>The Bad</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/0*fnH79ghVYdFqTsne" /><figcaption><a href="https://en.wikipedia.org/wiki/The_Good,_the_Bad_and_the_Ugly#The_trio">The Bad</a></figcaption></figure><p>eventName: AWS has approximately 13,000 actions! Action, API call, and permission are used interchangeably. But they are not always the same. eventName captures which API call was made. But in some cases, this is not exactly named after the action/permission. For example, instead of ListTags, ListTags20170331 is logged for Lambda service. If a user/group/role policy uses Lambda permissions, check if your CIEM tool suggests removing the Lambda permissions. Most likely, it is because it is blindly comparing IAM policy permission with the CT eventName.</p><p>eventVersion: Version of the CT record format. Nothing much to see here. All values will be 1.08 (current version). Ideally, this should have been in the CT file name. So the caller can figure out how to parse the JSON. There is no value in baking this with every event. I guess it may be useful if CT logs are enabled in the CT configuration</p><p>eventSource: The service the request was made to. Format is service.amazonaws.com. Ideally, the service in eventSource should match the prefix in IAM Action. AWS documentation: <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">This convention has some exceptions. For example, the </a><a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">eventSource for Amazon CloudWatch is monitoring.amazonaws.com</a>. The IAM action prefix for CloudWatch is cloudwatch. I did not find any documentation on all the possible values for eventSource and all the exceptions. And there is a special signin.amazonaws.com for console login! So customers are left to figure this out on their own</p><p>sourceIPAddress: The IP address the request was made from. There are certain exceptions in the documentation. It would have been great if this field was not overloaded with DNS names or the text AWS Internal. There are other fields that capture the source service, like userIdentity.invokedBy. AWS could have left this out when there was no address to report. If the source is a network-enabled resource like an EC2 instance, AWS could have logged the internal address of the instance in this field</p><p>additionalEventData: This provides useful information that is not a part of the action request or response. But some services decided to create their own fields in CT instead of leveraging additionalEventData. ec2RoleDelivery comes to mind</p><p>readOnly: Instead of a boolean field that logs whether the call is read-only vs non-read-only, AWS could have added a field that captured the permission group which they expose in IAM: Read, List, Write, Permissions, Tagging</p><p>eventCategory: Captures the category of the event. Management vs Data vs Insight. Keep reading to see why this is not very useful and could have been consolidated</p><p>managementEvent: Management event or not. Nothing much to see here. Why is this even logged? Isn’t this already captured in eventCategory?</p><p>eventType: Could AWS have just created one field to replace eventType, managementEvent, readOnly, and eventCategory?</p><p>eventID: AWS documentation: <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">GUID generated by CloudTrail to uniquely identify each event. You can use this value to identify a single event. For example, you can use the ID as a primary key to retrieve log data from a searchable database</a>. I always found duplicate entries given a day&#39;s worth of CT data. If CT entries were inserted in batches, batch insertion of records would fail in some databases if this was used as the primary key</p><p>requestID: The value that identifies the request. The service being called generates this value. Yet to find a good use for this!</p><p>errorCode: Other than checking if this has a value or not, there isn’t significant value in trying to analyze the contents. Each API reports the same error in different forms: AccessDenied, NoSuchEntityException, Client.UnauthorizedOperation, FAILED, etc. AWS and its customers can significantly benefit from standardizing error codes</p><p>errorMessage: <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">Some AWS services provide the errorCode and errorMessage as top-level fields in the event. Other AWS services provide error information as part of responseElements</a>! That says it all.</p><p>apiVersion: Identifies the API version associated with the AwsApiCall eventType. And it has values in arbitrary format: 2020_05_31, 20140328, 2015–08–24 are some examples from real CT logs</p><p>serviceEventDetails: Is this really necessary? Could this have been stuffed into additionalEventData. Again, the JSON format is a complete mystery</p><h3>The Ugly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/0*8uHi3ilsizIe0FpR" /><figcaption><a href="https://en.wikipedia.org/wiki/The_Good,_the_Bad_and_the_Ugly#The_trio">The Ugly</a></figcaption></figure><p>userAgent: The user agent that made the request. In some cases, this is the DNS name. In certain other cases, AWS internal SDK user agent is reported. For example, the access analyzer service reported the following for some calls</p><p>aws-internal/3 aws-sdk-java/1.11.1030 Linux/5.4.200-mr.82.metal1.x86_64 OpenJDK_64-Bit_Server_VM/25.212-b03 java/1.8.0_212 vendor/Oracle_Corporation cfg/retry-mode/standard</p><p>This tells me that the access analyzer is using <a href="https://owasp.org/www-project-top-ten/2017/A9_2017-Using_Components_with_Known_Vulnerabilities">a three-year-old JDK and a one-and-a-half-year-old AWS SDK</a>. AWS can avoid logging this field for internal calls. The DNS names are useless. Next time there is a <em>Log4Shell</em>-like vulnerability, AWS is advertising which services can be targeted by attackers!</p><p>There is another trap here. AWS documentation says: <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">For events originated by AWS, this field is usually AWS Internal/#, where # is a number used for internal purposes</a>. An attacker can make calls by using a custom user agent that starts with AWS Internal. Some Cloud Security tools will ignore these events for certain use cases, thinking they originated from AWS</p><p>requestParameters: This is supposed to capture the request input for the events. This is great because it can be used to get which resources (if any) the API call accessed, created, updated, etc. But unfortunately, the structure or contents of this field is different for each action. To properly parse this field, the JSON format of every action needs to be understood. Good luck deciphering the input format for thousands of APIs. In some cases, this is completely missing. Also, how the request is serialized varies from action to action. In some cases, the top-level request object is captured. In other cases, it is not. One won’t know what they will get until they try the API and check CT logs:</p><pre>{<br>  &quot;GetManagedPrefixListEntriesRequest&quot;: {<br>    &quot;PrefixListId&quot;: &quot;pl-0ced06dee&quot;<br>  }<br>}<br><br>Or?<br><br>{<br>  &quot;PrefixListId&quot;: &quot;pl-0ced06dee&quot;<br>}</pre><p>responseElements: If the API returned a response, this field captures the output in JSON format. Similar to requestParameters, there are thousands of variations of the JSON format depending on the API action. This element is omitted if an action does not change state (for example, a request to get or list objects). So, there is no way to figure out which resources were accessed for read-only requests</p><p>resources: A list of resources accessed in the event. Awesome. But wait, why isn’t this in every CT event? The presence of resources is rare and is absent for most API calls. Ideally, AWS could have skipped responseElements and logged which resources were accessed for each action</p><p><em>Who </em>in CT is mostly covered by userIdentity. It needs its own in-depth analysis, which I will cover in another article. I want to mention a few additional thoughts:</p><ul><li>There is no single source of truth for service names, actions, permissions, etc. Online documentation, in many cases, is incomplete, buggy, or outdated. For example, S3 is the oldest AWS service. There is an action called <a href="https://docs.aws.amazon.com/cli/latest/reference/s3api/head-bucket.html">HeadBucket</a>. It is nowhere to be found in the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazons3.html">S3 actions/permissions</a> documentation. There is no permission called HeadBucket. The ListBucket permission is required to make this API call</li><li>Capturing which permissions were used/required for API calls would help significantly. AWS is evaluating the permissions. Logging them would go a long way in helping customers. For example, iam:PassRole never shows up in eventName, but is a required permission to create hundreds of resource types. There are 750+ permissions that are not actions</li><li>The resources field is great. But this is very rarely logged other than for S3 and a few other services. It would be awesome to split this into two arrays. One to capture resources that were created, updated, or deleted. Another one is to log the resources that are accessed/read. This could also make requestPareters/responseElements redundant</li><li>Many fields in the documentation indicate that they will be truncated if they exceed XY KiloBytes. When it is a JSON field that is getting truncated, how is one supposed to parse it? Maybe this is rare. But attackers could leverage this detail to create events that evade parsing</li><li>The sharedEventID is great, but when assuming a cross-account role, unless the source account CloudTrail is available, it is hard to figure out the user/role/resource performing the action. The level of details logged in both accounts is almost the same, with the source identity ID/ARN missing in the destination account. Maybe AWS thought this was a security concern</li><li>With actions that generate credentials like AssumeRole, AssumeRoleWithSAML, etc., credential details are buried in responseElements. For example, with AssumeRole, STS temporary credentials expiration is logged as Oct 13, 2022, 6:44:41 AM. This important detail should not be logging in some weird data/time format. Also, the temporary ~ is important enough not to be buried in responseElements. These should have been captured in their own fields like issuedAccessKeyId</li></ul><p>Instead of adding a new format with new fields (1.09?) and forcing it on all customers, CT is better off following the VPC flow logs model. When creating CT, customers can select the format they want</p><h3>References</h3><ul><li><a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-record-contents.html">CloudTrail record content</a></li><li><a href="https://en.wikipedia.org/wiki/The_Good,_the_Bad_and_the_Ugly">The Good, the Bad, and the Ugly</a> movie</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b314c32138d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/aws-cloudtrail-the-good-the-bad-and-the-ugly-b314c32138d9">AWS CloudTrail — The Good, the Bad, and the Ugly</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CIEM — Managing Excess Permissions in Public Cloud]]></title>
            <link>https://medium.com/@seshu/ciem-managing-excess-permissions-in-public-cloud-10339a9baf02?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/10339a9baf02</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ami]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Mon, 08 Aug 2022 14:47:58 GMT</pubDate>
            <atom:updated>2022-08-08T14:47:58.006Z</atom:updated>
            <content:encoded><![CDATA[<h3>CIEM — Managing Excess Permissions in Public Cloud</h3><p>Cloud Security teams have heard of Cloud Infrastructure Entitlement Management (CIEM). It’s one of many buzzwords in Cloud Security. One common feature in every CIEM product is mitigating risks due to excess permissions. Excess permissions refer to the permissions an entity (user, resource, etc.) have been given but have not been using. But not all of the excess permission recommendations are the same. Some of these should be prioritized and fixed ASAP. Some excess permissions need not be fixed. This might sound controversial but here is my take on why!</p><p><strong>Identity and Access Management (IAM)</strong></p><p>Let’s use AWS Identity and Access Management (IAM) as an example. AWS IAM is used to manage identities, permissions and a few other related resources. There are 12,700+ permissions in AWS. This is for approximately 200 odd products and services. These numbers probably will be obsolete by the time I post this :). Many AWS services are regional with few exceptions. There are 22 regular regions — to that add a few more Government Cloud regions.</p><p>What can an administrator do in a single AWS account? Approximately 200,000 actions across all regions. Multiply that by the number of AWS accounts you have and that is your blast radius. Many organizations nowadays have 100+ AWS accounts:</p><ul><li>Organization</li><li>Infrastructure(CI/CD)</li><li>Networking</li><li>Security, Log archive</li><li>Dev/Staging/Production for each BU</li><li>DNS management</li><li>…</li></ul><p>There are many types of permissions. But AWS categorizes them into 5 buckets:</p><ul><li>List</li><li>Read</li><li>Tagging</li><li>Write</li><li>Permissions Management</li></ul><p>This is unfortunately a very simplistic categorization of permissions. Ability to read details of a virtual machine is not the same as downloading S3 bucket contents. But AWS puts both these permissions in the <em>Read</em> category. Many permissions allowing users to create/update/delete IAM resources should be treated with higher priority compared to others. AWS added a feature in IAM called <em>permissions boundary</em> to restrict privilege escalation etc, but in practice this is not well understood and widely used. Many CIEM tools also don’t make recommendations for adopting permissions boundaries.</p><p><strong>Excess Permissions</strong></p><p>All CIEM products aggregate CloudTrail (audit trail) data from the customer’s AWS accounts. They then compare what an identity/resource has done in the past 30, 60 or 90 days with the permissions the identity has. Permissions available to the identity but unused in this time-frame are considered excess permissions. Unfortunately IAM policies which grant permissions are a bit complicated. They can include conditional permissions that are evaluated dynamically. Ability to parse and understand the conditions is unfortunately missing in many CIEM products.</p><p>Let’s explore for a moment how permissions are granted in a mid/large organization to a developer or another role:</p><ul><li>Employee does something in AWS console or via CLI and gets permissions denied error</li><li>They identify the necessary permission from the error message and open a ticket</li><li>It might need approval from the manager or some other team</li><li>Ticket goes into some backlog and eventually another team makes the changes to the IAM policy if the request is reasonable</li><li>Employee goes back and retries the action. They may be able to perform the necessary action or hit another permissions issue</li></ul><p>In smaller organizations with one or handful of AWS accounts, this process might be simpler.</p><p>Let’s explore cases where excess permissions should be fixed ASAP:</p><ul><li>Excess permissions for resources. Example: Virtual machine, Lambda, etc. has the ability to read S3 bucket contents, but doesn’t need one. Rule of thumb: If there are wildcards in the policy that grants a resource access to other resources, you most likely have excess permissions</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*Z3b3IPAjAebDnHDF" /><figcaption>Excess permissions due to wildcard in Action and Resource</figcaption></figure><ul><li>Excess permissions in critical accounts like production, infrastructure, networking, security, etc. Before excess permissions are removed, it might be relevant to first review if the user should have access to the environment or not</li><li>Cross account permissions where external users/resources/accounts have excess permissions</li></ul><p>Now to the case where it may not make sense to remove excess permissions: lower environments like dev, test, staging environments. Many CIEM tools do not differentiate between environments that customers maintain in real world deployments — like production, development or other such ones. Assuming less critical environments are not connected to critical ones, it is better to have a measured approach to handling excess permissions — one that makes a successful trade-off between tightened security and agility. Of course, your organization may have different compliance and regulatory requirements, which may require adjustments. This does not mean users in these accounts can do whatever they want. A robust approach is to complement handling excess permissions with guardrails. In AWS, Service Control Policies (SCP) can be used to override excess permissions. At a minimum, the following controls should be in-place:</p><ul><li>A tech radar helps organizations narrow down the list of services to use. Most organizations don’t need to rent satellite antennas (AWS Ground Station service). A SCP with allowed services can be applied to all accounts/environments</li><li>Approved regions. Almost all organizations can restrict the regions where users can create resources. AWS SCP can also be used to control access to the regions</li><li>SCP to deny critical permissions. Example: Ability to turn off CloudTrail (audit), etc</li><li>Creating cost and billing budgets and alerting when the forecast exceeds allocated amount</li></ul><p>Excess permissions should also be prioritized. For example: Fixing IAM related excess permissions first. Most developers hate it when they are given a work desktop/laptop without administrator access. This is a security risk for most organizations, but they put guard rails in place: firewall, EDR, encrypted disk, etc. Same logic applies to cloud environments that are not as critical as production but require security to be present but in a way that does not impede developer urgency.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10339a9baf02" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Security — Network Security (CSNS)]]></title>
            <link>https://medium.com/@seshu/cloud-security-network-security-csns-f6526276d49d?source=rss-cc1a99dd4a50------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6526276d49d</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[securitygroup]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Seshu Pasam]]></dc:creator>
            <pubDate>Fri, 22 Jul 2022 10:10:35 GMT</pubDate>
            <atom:updated>2022-07-22T10:10:35.932Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cloud Security — Network Security (CSNS)</h3><p>Virtual networking in the Cloud has become very complicated. Current crop of security tools focus heavily on only resource misconfigurations, compliance, vulnerabilities etc. But I haven’t seen much focus on network security concerns. Simple construct in the AWS networking is a security group (SG).</p><h3>Security Group</h3><p>It is a firewall around an Elastic (Virtual) Network Interface (ENI). Virtual Machine (EC2), Serverless (Lambda), or any other managed service that needs networking creates an ENI. ENI can be protected by multiple SGs. SG has inbound and outbound firewall rules. Unlike other firewalls, only <em>allow </em>rules can be configured in SG. Anything that is not explicitly allowed is denied. SGs are stateful firewalls. If traffic is allowed inbound, return traffic for that connection is tracked and allowed back out and vice-versa. In the defense in depth philosophy, SG inbound rules are the last line of defense protecting the resource for ingress traffic. Outbound rules are the first to be evaluated for egress traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/0*G0Ju4e3c380cPA4A" /><figcaption>Traffic ingress/egress path for a EC2 Virtual Machine</figcaption></figure><p>Each SG inbound/outbound rule is a 3-tuple: Protocol, Port (range) and Source (for inbound)/Destination (for outbound). Protocol can be one of TCP, UDP, ICMP or All. Rules can be defined for IPv4 or IPv6 or both. Port can be a single port or a consecutive range of ports. Source/Destination can be a specific IP address, CIDR, another SG or a prefix list. Prefix list is just a managed/reusable collection of CIDRs.</p><p>Usually Cloud networking is set up by SecOps or Networking teams. SGs are more often than not created/defined by dev teams.</p><h3>Security Concerns</h3><ul><li>Identical resources that have the same role/purpose should share/reuse SGs. For example VMs in a MongoDB cluster, etc. But in reality, unrelated inbound/outbound rules are added to a SG so that it can be used by other resources</li><li>Ideal SG rule should be a single protocol, port and source/destination referencing another SG. But most of the time, source/destination is set to a subnet CIDR, VPC CIDR or the whole IP address space</li><li>Over time applications evolve and rules are not relevant anymore. Current Cloud Security tools don’t pinpoint and/or clean up unused rules</li><li>SG source/destination are set to broad CIDRs, for example from customers’ own cross-account VPCs and/or Subnets</li><li>Most of the time the default outbound rule which allows all traffic anywhere is not changed or removed. Log4Shell and other related vulnerabilities made it critical to monitor egress traffic destination and ports</li><li>In some cases, the stateful nature of SG is not well understood and customers add both inbound and outbound rules when one or the other is sufficient</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GtzImtEBOKlWUbM1lw3K7g.png" /><figcaption>SG out-bound rules that allow all egress traffic</figcaption></figure><p>Existing security tools simply identify unused SGs and don’t deal with the above mentioned problems. These are not just one-time issues. In most cloud environments, SGs are not periodically reviewed. Manual reviewing and fixing is not ideal and is error-prone. Above issues can lead to unintended exposure of services and ports.</p><p>At Ariksa, we understand potential attack paths that require complex, large-scale analyses beyond simple misconfigurations. We provide a highly scalable and turnkey way to reduce attack entry points, such as eliminating unused inbound/outbound rules and fixing rules to right size the source/destination CIDRs. <em>Next up: AWS Network Firewall :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6526276d49d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>