<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aayush Bhadana</title>
    <description>The latest articles on DEV Community by Aayush Bhadana (@maxin_fc5ef26718835f32fde).</description>
    <link>https://dev.to/maxin_fc5ef26718835f32fde</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4092455%2F29e1fbf7-a993-4bb6-b745-e85a924ff927.png</url>
      <title>DEV Community: Aayush Bhadana</title>
      <link>https://dev.to/maxin_fc5ef26718835f32fde</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maxin_fc5ef26718835f32fde"/>
    <language>en</language>
    <item>
      <title>AWS IAM Security Best Practices: Enforcing Least Privilege via CLI</title>
      <dc:creator>Aayush Bhadana</dc:creator>
      <pubDate>Mon, 24 Aug 2026 14:17:15 +0000</pubDate>
      <link>https://dev.to/maxin_fc5ef26718835f32fde/aws-iam-security-best-practices-enforcing-least-privilege-via-cli-42ck</link>
      <guid>https://dev.to/maxin_fc5ef26718835f32fde/aws-iam-security-best-practices-enforcing-least-privilege-via-cli-42ck</guid>
      <description>&lt;p&gt;Identity and Access Management (IAM) is the backbone of AWS security. However, misconfigured IAM policies often grant excessive permissions, leading to potential data breaches and unauthorized resource access.&lt;br&gt;
Adhering to the Principle of Least Privilege (PoLP) ensures that users, roles, and services only possess the exact permissions required to perform their tasks. In this guide, we will audit and enforce basic IAM security hardening using the AWS CLI.&lt;br&gt;
&lt;u&gt;&lt;strong&gt;&lt;em&gt;Prerequisites&lt;/em&gt;&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
*AWS CLI installed and authenticated with administrative privileges.&lt;br&gt;
*Basic understanding of JSON policy syntax.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Enforcing Strong Password Policies for IAM Users
&lt;/h2&gt;

&lt;p&gt;If your organization uses IAM users alongside AWS SSO, enforcing a strict password policy across the account is mandatory.&lt;br&gt;
Run the following command to enforce minimum password length, symbol requirements, and password expiration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam update-account-password-policy &lt;span class="nt"&gt;--minimum-password-length&lt;/span&gt; 14 &lt;span class="nt"&gt;--require-symbols&lt;/span&gt; &lt;span class="nt"&gt;--require-numbers&lt;/span&gt; &lt;span class="nt"&gt;--require-uppercase-characters&lt;/span&gt; &lt;span class="nt"&gt;--require-lowercase-characters&lt;/span&gt; &lt;span class="nt"&gt;--allow-users-to-change-password&lt;/span&gt; &lt;span class="nt"&gt;--max-password-age&lt;/span&gt; 90 &lt;span class="nt"&gt;--password-reuse-prevention&lt;/span&gt; 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify the updated account policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam get-account-password-policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Auditing Unused Credentials and Access Keys
&lt;/h2&gt;

&lt;p&gt;Stale access keys are a major vulnerability. AWS allows you to generate a Credential Report to audit inactive access keys and MFA status across all users.&lt;br&gt;
Generate the report:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam generate-credential-report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fetch and decode the generated CSV report using standard Linux CLI tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam get-credential-report &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Content'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text | &lt;span class="nb"&gt;base64&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review the output to identify users who haven't logged in recently or lack Multi-Factor Authentication (MFA).&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Deactivating and Deleting Unused Access Keys
&lt;/h2&gt;

&lt;p&gt;Once an inactive access key is identified, deactivate it immediately before permanent deletion.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam update-access-key &lt;span class="nt"&gt;--user-name&lt;/span&gt; dev-user-01 &lt;span class="nt"&gt;--access-key-id&lt;/span&gt; AKIAIOSFODNN7EXAMPLE &lt;span class="nt"&gt;--status&lt;/span&gt; Inactive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete the access key after verifying no services break:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws iam delete-access-key &lt;span class="nt"&gt;--user-name&lt;/span&gt; dev-user-01 &lt;span class="nt"&gt;--access-key-id&lt;/span&gt; AKIAIOSFODNN7EXAMPLE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;u&gt;Summary&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;Securing AWS IAM is a continuous process. By regularly auditing credential reports, enforcing strong password rules, and removing stale access keys via the AWS CLI, you significantly shrink your cloud attack surface.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>security</category>
      <category>devops</category>
    </item>
    <item>
      <title>Hardening Arch Linux Cloud Servers using UFW and Fail2Ban: A Practical Guide</title>
      <dc:creator>Aayush Bhadana</dc:creator>
      <pubDate>Mon, 24 Aug 2026 14:12:10 +0000</pubDate>
      <link>https://dev.to/maxin_fc5ef26718835f32fde/hardening-arch-linux-cloud-servers-using-ufw-and-fail2ban-a-practical-guide-1hac</link>
      <guid>https://dev.to/maxin_fc5ef26718835f32fde/hardening-arch-linux-cloud-servers-using-ufw-and-fail2ban-a-practical-guide-1hac</guid>
      <description>&lt;p&gt;Deploying an Arch Linux server in the cloud gives you absolute control over your environment, but out-of-the-box minimal installations leave your SSH port exposed to automated brute-force botnets.&lt;br&gt;
To secure a cloud instance effectively, implementing a network firewall combined with an automated intrusion prevention system is essential. In this guide, we will configure Uncomplicated Firewall (UFW) and Fail2Ban on Arch Linux to lock down non-essential ports and automatically ban malicious IP addresses.&lt;br&gt;
&lt;strong&gt;&lt;em&gt;&lt;u&gt;Prerequisites&lt;/u&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
*A running Arch Linux instance with sudo privileges.&lt;br&gt;
*Basic familiarity with Systemd services (systemctl).&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Installing and Configuring UFW (Uncomplicated Firewall)
&lt;/h2&gt;

&lt;p&gt;While Arch Linux defaults to iptables or nftables, UFW provides a manageable CLI interface to handle packet filtering without syntax overhead.&lt;br&gt;
First, update your package database and install UFW:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman &lt;span class="nt"&gt;-Syy&lt;/span&gt; ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before enabling the firewall, always explicitly allow SSH traffic, otherwise you will immediately lock yourself out of your remote server.&lt;br&gt;
Set default policies to deny incoming and allow outgoing traffic&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw default deny incoming
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw default allow outgoing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Allow SSH traffic (Port 22 or your custom SSH port)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 22/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Optional) Allow standard web traffic if running Nginx/Apache&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 80/tcp
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 443/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable the UFW service and ensure it starts on system boot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw &lt;span class="nb"&gt;enable
sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;ufw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify active rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw status verbose
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Preventing Brute-Force Attacks with Fail2Ban
&lt;/h2&gt;

&lt;p&gt;While UFW restricts open ports, botnets can still spam your open SSH port with thousands of authentication attempts. Fail2Ban inspects log files (like journalctl) and alters UFW rules to dynamically ban offending IPs.&lt;br&gt;
Install Fail2Ban via pacman:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; fail2ban
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fail2Ban uses a local configuration file jail.local to override default settings safely. Create and edit this file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /etc/fail2ban/jail.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the following baseline security configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[DEFAULT]&lt;/span&gt;
&lt;span class="py"&gt;bantime&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1h&lt;/span&gt;
&lt;span class="py"&gt;findtime&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;10m&lt;/span&gt;
&lt;span class="py"&gt;maxretry&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;3&lt;/span&gt;
&lt;span class="nn"&gt;[sshd]&lt;/span&gt;
&lt;span class="py"&gt;enabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;span class="py"&gt;port&lt;/span&gt;    &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;ssh&lt;/span&gt;
&lt;span class="py"&gt;logpath&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;%(sshd_log)s&lt;/span&gt;
&lt;span class="py"&gt;backend&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;systemd&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the file, then enable and start the Fail2Ban service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; fail2ban
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Monitoring Banned IPs and Testing
&lt;/h2&gt;

&lt;p&gt;To verify that Fail2Ban is actively parsing logs and protecting your SSH daemon, check the status of the sshd jail:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;fail2ban-client status sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If an attacker fails 3 password attempts within 10 minutes, Fail2Ban automatically appends a temporary drop rule directly to your UFW engine. To manually unban an IP (e.g., if you accidentally lock yourself out from another network):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;fail2ban-client &lt;span class="nb"&gt;set &lt;/span&gt;sshd unbanip &amp;lt;TARGET_IP_ADDRESS&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;u&gt;Summary&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;Combining UFW's static packet filtering with Fail2Ban's dynamic log monitoring establishes a robust baseline defense for any Arch Linux cloud server. This layered approach stops port scanners and mitigates automated SSH attacks before they can consume system resources.&lt;/p&gt;

</description>
      <category>security</category>
      <category>linux</category>
      <category>cybersecurity</category>
      <category>archlinux</category>
    </item>
    <item>
      <title>How to Secure AWS S3 Buckets Using AWS CLI on Linux: Step-by-Step</title>
      <dc:creator>Aayush Bhadana</dc:creator>
      <pubDate>Mon, 24 Aug 2026 14:02:45 +0000</pubDate>
      <link>https://dev.to/maxin_fc5ef26718835f32fde/how-to-secure-aws-s3-buckets-using-aws-cli-on-linux-step-by-step-378j</link>
      <guid>https://dev.to/maxin_fc5ef26718835f32fde/how-to-secure-aws-s3-buckets-using-aws-cli-on-linux-step-by-step-378j</guid>
      <description>&lt;p&gt;Exposed AWS S3 buckets are one of the most common vectors for cloud data breaches. While the AWS Management Console provides a GUI to configure bucket policies, using the AWS CLI on a Linux environment offers a faster, scriptable, and audit-friendly approach to security hardening.&lt;br&gt;
In this guide, we will walk through restricting public access, enabling server-side encryption, and enforcing HTTPS-only traffic for S3 buckets using the AWS CLI.&lt;br&gt;
Prerequisites&lt;br&gt;
AWS CLI installed and configured with valid IAM credentials.&lt;br&gt;
Basic familiarity with Linux terminal commands and JSON syntax.&lt;br&gt;
Step 1: Block All Public Access&lt;br&gt;
The first line of defense is ensuring public access to your bucket is completely blocked at the bucket level.&lt;br&gt;
Run the following command to apply the PublicAccessBlock configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-public-access-block &lt;span class="nt"&gt;--bucket&lt;/span&gt; your-secure-bucket-name &lt;span class="nt"&gt;--public-access-block-configuration&lt;/span&gt; &lt;span class="s2"&gt;"BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To verify the configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api get-public-access-block &lt;span class="nt"&gt;--bucket&lt;/span&gt; your-secure-bucket-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 2: Enable Default Server-Side Encryption (SSE-S3)&lt;br&gt;
Encrypting data at rest is critical. You can enforce AES-256 encryption on all newly uploaded objects using this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-encryption &lt;span class="nt"&gt;--bucket&lt;/span&gt; your-secure-bucket-name &lt;span class="nt"&gt;--server-side-encryption-configuration&lt;/span&gt; &lt;span class="s1"&gt;'{"Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "AES256"}}]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3: Enforce HTTPS Transport (SSL Only) via Bucket Policy&lt;br&gt;
To prevent man-in-the-middle (MitM) attacks, configure a bucket policy that denies any unencrypted HTTP requests&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(aws:SecureTransport: false)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;.&lt;br&gt;
Create a policy with the following JSON structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AllowSSLRequestsOnly"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Deny"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::your-secure-bucket-name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::your-secure-bucket-name/*"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Condition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"Bool"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"aws:SecureTransport"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"false"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the policy using AWS CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api put-bucket-policy &lt;span class="nt"&gt;--bucket&lt;/span&gt; your-secure-bucket-name &lt;span class="nt"&gt;--policy&lt;/span&gt; file://policy.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Summary&lt;br&gt;
By automating S3 security hardening via the AWS CLI, you significantly reduce human error and align with AWS cloud security best practices. Integrating these commands into deployment pipelines ensures that infrastructure remains secure by default.&lt;/p&gt;

</description>
      <category>security</category>
      <category>aws</category>
      <category>cloud</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
