<?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: nⓐtⓐLiⓔ</title>
    <description>The latest articles on DEV Community by nⓐtⓐLiⓔ (@sheopedia).</description>
    <link>https://dev.to/sheopedia</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F227218%2F76ab29cf-0bd9-4427-854d-cf871ada4487.jpeg</url>
      <title>DEV Community: nⓐtⓐLiⓔ</title>
      <link>https://dev.to/sheopedia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sheopedia"/>
    <language>en</language>
    <item>
      <title>Things to consider before using EKS Auto Mode</title>
      <dc:creator>nⓐtⓐLiⓔ</dc:creator>
      <pubDate>Tue, 03 Dec 2024 07:35:35 +0000</pubDate>
      <link>https://dev.to/aws-builders/things-to-consider-before-using-eks-auto-mode-31bj</link>
      <guid>https://dev.to/aws-builders/things-to-consider-before-using-eks-auto-mode-31bj</guid>
      <description>&lt;p&gt;AWS just announced the new &lt;strong&gt;AWS EKS Auto Mode&lt;/strong&gt; feature that automatically manages the scaling of the EKS nodes in an Amazon EKS cluster. This is a great start for the beginning of abstracting k8s management. I heard a lot about this feature (from the K8s community) at the beginning of the K8s Era, but it seems like it is slowly becoming a reality only now. &lt;/p&gt;

&lt;p&gt;So far, it feels like AWS EKS Auto Mode is a great option if your team is trying to scale the EKS env but doesn't want to spend a lot of time understanding how to scale EKS nodes, basically hands-off teams.&lt;/p&gt;

&lt;p&gt;But there are still some things to consider before enabling this, the main one is Cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the price for AWS Auto Mode?
&lt;/h2&gt;

&lt;p&gt;While using AWS EKS Auto Mode, you are paying for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS EKS cluster&lt;/strong&gt; (per hour fee) based on the cluster’s Kubernetes version. See the screenshot from the official AWS Documentation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1p5qgjtngdx6vjgrzslb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1p5qgjtngdx6vjgrzslb.png" alt="Image description" width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS EKS Auto Mode&lt;/strong&gt; (per hour fee) for the duration and type of Amazon EC2 instances launched and managed by EKS Auto Mode (for Worker Nodes).  Pricing can be found in the AWS &lt;a href="https://calculator.aws/#/" rel="noopener noreferrer"&gt;pricing calculator&lt;/a&gt;. Below is an example of the price in us-east-1 popular general purpose instances usage (m5.2xlarge, m5.24xlarge). Simply, there are extra management fees for the used EC2 instance type.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fitks1pj84h0lakgbum4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fitks1pj84h0lakgbum4a.png" alt="Image description" width="800" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EC2 charges that are still applied are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: EC2 instances come with root volumes, and additional EBS volumes are commonly used for persistent storage. EBS storage (like gp3 or io1) comes with its pricing for storage capacity and IOPS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elastic IP addresses&lt;/strong&gt;: If you are using any Elastic IPs (for external access to worker nodes or load balancers), these are charged when not in use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Additional EKS Costs that are staying the same&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;EBS Storage&lt;/strong&gt;: Costs for persistent storage depend on volume type and size, as well as snapshot charges for backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fargate&lt;/strong&gt;: For serverless Kubernetes (Fargate), you pay based on CPU and memory usage, which is cost-effective for variable workloads but may be pricier for steady workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Networking&lt;/strong&gt;: Charges for VPC and cross-AZ/region data transfer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM Roles&lt;/strong&gt;: While free, complex IAM configurations could incur additional costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add-ons&lt;/strong&gt; (e.g., Helm charts, Route 53, third-party integrations) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How is EKS Auto Mode working within Spot instances ( and spot reservations)?&lt;/strong&gt;&lt;br&gt;
AWS EKS Auto Mode does support &lt;strong&gt;Spot Instances&lt;/strong&gt;, but it doesn't provide native, flexible integration within a single node group. Instead, users must create separate node groups for &lt;strong&gt;On-Demand&lt;/strong&gt; and &lt;strong&gt;Spot Instances&lt;/strong&gt;, which require more management and configuration. &lt;/p&gt;

&lt;p&gt;There are other considerations about the usage and pricing for AWS EKS Auto Mode.&lt;br&gt;
I answered some of them, but do let me know if I missed something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can we leverage the Amazon EC2 instance purchase options with EKS Auto Mode?&lt;/strong&gt;&lt;br&gt;
Yes, absolutely. &lt;strong&gt;On-Demand&lt;/strong&gt;, &lt;strong&gt;Compute Savings Plans&lt;/strong&gt;, and &lt;strong&gt;Spot Instances&lt;/strong&gt; plans are all included.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is EKS Auto Mode similar to managed Karpenter? Or is it the same feature?&lt;/strong&gt;&lt;br&gt;
Unlike Karpenter, EKS Auto Mode also manages and patches core EKS addons (CoreDNS, kube-proxy, VPC CNI) and other EBS CSI controllers and AWS load balancer controllers. Basically, as users, we are now managing fewer things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use AWS Autoscaler with EKS Auto mode?&lt;/strong&gt;&lt;br&gt;
[Update, thank you &lt;a class="mentioned-user" href="https://dev.to/bryantbiggs"&gt;@bryantbiggs&lt;/a&gt;]: EKS Auto Mode uses Karpenter for compute autoscaling, which automatically provisions and scales EC2 instances based on demand. However, pod autoscaling (such as Horizontal Pod Autoscaler - HPA) must still be configured by the user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can EKS Auto Mode be enabled on the current clusters?&lt;/strong&gt;&lt;br&gt;
Yes, this AWS official article shows steps on &lt;a href="https://aws.amazon.com/blogs/aws/streamline-kubernetes-cluster-management-with-new-amazon-eks-auto-mode/" rel="noopener noreferrer"&gt;how to do it manually&lt;/a&gt;, so you can get an idea, but do not follow this - use any IaC to enable it. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If EKS Auto Mode is enabled on the current clusters, can I disable it?&lt;/strong&gt;&lt;br&gt;
Yes, &lt;a href="https://docs.aws.amazon.com/eks/latest/userguide/auto-disable.html#:~:text=You%20can%20disable%20EKS%20Auto,operated%20by%20EKS%20Auto%20Mode." rel="noopener noreferrer"&gt;here is the AWS official article&lt;/a&gt; that shows how to disable it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does EKS Auto Mode simplify the IAM role and policy management for worker nodes?&lt;/strong&gt;&lt;br&gt;
Yes, by handling the creation and assignment of required roles and permissions automatically.&lt;br&gt;
EKS Auto Mode automatically provisions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the necessary IAM roles for EC2 instances (worker nodes) during node group creation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;applies predefined, least-privileged policies to the roles, ensuring worker nodes have only the required permissions to interact with EKS and AWS services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;manages IAM roles and permissions for core add-ons like CoreDNS, kube-proxy, and VPC CNI, reducing configuration overhead.&lt;br&gt;
If customization is needed, as users we can still modify IAM roles and policies attached to worker nodes via the AWS Management Console, CLI, or SDK.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Terraform support?&lt;/strong&gt;&lt;br&gt;
It is coming. The terraform PR is on the way. &lt;a href="https://github.com/hashicorp/terraform-provider-aws/releases/tag/v5.79.0" rel="noopener noreferrer"&gt;Tag v5.79.0&lt;/a&gt;.&lt;br&gt;
Support for aws-terraform modules is out from &lt;a href="https://github.com/terraform-aws-modules/terraform-aws-eks/releases/tag/v20.31.0" rel="noopener noreferrer"&gt;v20.31.0.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In short, &lt;strong&gt;AWS EKS Auto Mode&lt;/strong&gt; is great for simplifying management, but it’s important to understand the pricing structure and consider your scaling needs.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awscost</category>
      <category>eks</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Exploring the "Requester Pays" Feature for AWS S3 Buckets. Use Cases and Cost Analysis</title>
      <dc:creator>nⓐtⓐLiⓔ</dc:creator>
      <pubDate>Wed, 08 May 2024 01:55:30 +0000</pubDate>
      <link>https://dev.to/aws-builders/exploring-the-requester-pays-feature-for-aws-s3-buckets-use-cases-and-cost-analysis-3jk4</link>
      <guid>https://dev.to/aws-builders/exploring-the-requester-pays-feature-for-aws-s3-buckets-use-cases-and-cost-analysis-3jk4</guid>
      <description>&lt;p&gt;As infrastructure architects, we need to manage cloud resources with cost in mind, so understanding features like &lt;em&gt;Requester Pays&lt;/em&gt; for AWS S3 is useful for cost optimization.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;Requester Pays&lt;/em&gt; feature of AWS S3 buckets is a good option to explore in "&lt;em&gt;some cases&lt;/em&gt;" because it can potentially help with optimizing the cost of AWS S3 buckets.&lt;/p&gt;

&lt;p&gt;Note: Please keep in mind that I used the term "&lt;em&gt;some cases&lt;/em&gt;" because different use cases will likely require different resources and configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples of such practical cases include:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Large Data Sets&lt;/strong&gt;: Companies provide large datasets used for training machine learning (ML) models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefit&lt;/strong&gt; from enabling Requester Pays because they can reduce the high costs associated with accessing training datasets for AI and ML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commercial Distribution&lt;/strong&gt;: Platforms that offer video editing directly in the cloud, where users stream large video files during the editing process (an example of such an app mostly likely already installed on your phone :) )&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefit&lt;/strong&gt;: Users will pay for the data they consume, and the platform will provide high-performance editing tools, saving on costs with usage for scalable service offerings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-Account Access&lt;/strong&gt;: This is when users from other AWS accounts frequently access S3 objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefit&lt;/strong&gt;: Users will pay the cross-account data transfer costs&lt;/p&gt;

&lt;h2&gt;
  
  
  How to enable the Requester Pays feature
&lt;/h2&gt;

&lt;p&gt;Using Terraform, we can create the &lt;code&gt;aws_s3_bucket_request_payment_configuration&lt;/code&gt; resource for an AWS S3 bucket. For the payer attribute (described later in this blog), we can select &lt;code&gt;BucketOwner or Requester&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;BucketOwner&lt;/code&gt; is the default setting for all new S3 buckets if no specific request payment configuration is applied.&lt;/p&gt;

&lt;p&gt;Simple terraform code snippet ( of course, not &lt;strong&gt;production-friendly&lt;/strong&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"aws"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-east-1"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"request_payer"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;description&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;-&lt;/span&gt;&lt;span class="no"&gt;EOD&lt;/span&gt;&lt;span class="sh"&gt;
    (Optional) Specifies who should bear the cost of Amazon S3 data transfer. 
    It can be either BucketOwner or Requester. By default, the owner of the S3 
    bucket would incur the costs of any data transfer. See Requester Pays 
    Buckets developer guide for more information.
&lt;/span&gt;&lt;span class="no"&gt;  EOD
&lt;/span&gt;  &lt;span class="nx"&gt;type&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;default&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Requester"&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"this"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;bucket&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"in-n-out-editme"&lt;/span&gt;
  &lt;span class="nx"&gt;force_destroy&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;foo&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"bar"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket_request_payment_configuration"&lt;/span&gt; &lt;span class="s2"&gt;"this"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
  &lt;span class="nx"&gt;payer&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request_payer&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"bucket_name"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_s3_bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucket&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="s2"&gt;"requester_pays_status"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;aws_s3_bucket_request_payment_configuration&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payer&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: &lt;code&gt;aws_s3_bucket_request_payment_configuration&lt;/code&gt; resource cannot be used with S3 directory buckets.&lt;/p&gt;

&lt;h2&gt;
  
  
  View in the AWS Console UI
&lt;/h2&gt;

&lt;p&gt;The result of the above code (&lt;strong&gt;Enabled&lt;/strong&gt; feature) can be found in the AWS console under the S3 Bucket overview and navigating to the &lt;em&gt;Requester Pays UI&lt;/em&gt; view (refer to the screenshot below)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnxwsi8ap2xa2rwyz6ty.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnxwsi8ap2xa2rwyz6ty.png" alt="Image description" width="800" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Cost breakdown
&lt;/h2&gt;

&lt;p&gt;Charges are handled differently in AWS S3 when using the Requester Pays feature compared to the standard S3 pricing model.&lt;/p&gt;

&lt;p&gt;Normally, the &lt;code&gt;bucket owner&lt;/code&gt; pays for all data transfer and request charges associated with the bucket. However, in the Requester Pays model, these costs are shifted to the person or service accessing the data (&lt;code&gt;requester&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bucket Owner Costs&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Storage&lt;/strong&gt;: the data stored in the S3 bucket regardless of access patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requester Costs&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Transfer Out&lt;/strong&gt;: When data is transferred from the S3 bucket to the internet or another AWS region, the requester pays for the data transfer costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;S3 Requests&lt;/strong&gt;: for initiated operations, such as PUT, GET, POST, and LIST.&lt;/p&gt;

&lt;p&gt;Including when request &lt;em&gt;authentication&lt;/em&gt; fails and the &lt;em&gt;request is anonymous&lt;/em&gt;, both resulting in an HTTP 403 error.&lt;/p&gt;

&lt;h2&gt;
  
  
  How are Requesters billed?
&lt;/h2&gt;

&lt;p&gt;When accessing the &lt;em&gt;Requester Pays&lt;/em&gt; S3 buckets, &lt;strong&gt;requesters&lt;/strong&gt; must include billing details: &lt;code&gt;x-amz-request-payer: requester&lt;/code&gt; in the request header. This indicates that they agree to pay for the data transfer and request costs. AWS utilizes this header to ensure that costs are billed to the &lt;strong&gt;requester&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This setup prevents unauthorized &lt;strong&gt;requesters&lt;/strong&gt; from being charged without their consent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requesters&lt;/strong&gt; also need IAM permissions to ensure that only authorized users can access the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to View Payment Split in AWS Console
&lt;/h2&gt;

&lt;p&gt;Here are the steps to check how the payment is split for &lt;em&gt;Requester Pays&lt;/em&gt; S3 buckets:&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Billing and Cost Management Dashboard&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the Billing and Cost Management Dashboard.&lt;/li&gt;
&lt;li&gt;Use the &lt;strong&gt;Cost Explorer&lt;/strong&gt; to get detailed information about S3.&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Cost Explorer&lt;/strong&gt;: filter your data by service ( which in this case would be Amazon S3)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Detailed Billing Reports:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enable &lt;strong&gt;Detailed Billing Reports&lt;/strong&gt; with Resources and Tags to see detailed information about your S3 usage. If you have &lt;em&gt;Requester Pays&lt;/em&gt; enabled, these reports will include information on requester-initiated transactions.&lt;/p&gt;

&lt;p&gt;Reports can be set to show which bucket incurred which costs so you can see the split between what you pay as the &lt;strong&gt;bucket owner&lt;/strong&gt; (for storage and owner-initiated data transfers) and what &lt;strong&gt;requesters&lt;/strong&gt; pay (for their data transfers).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tagging&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Add cost allocation tags on your S3 buckets. Once tagged, activate these tags in the &lt;strong&gt;Cost Allocation Tag&lt;/strong&gt; section of the Billing Dashboard to include them in your reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Visualizing with AWS QuickSight Integration&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;It is possible to download &lt;strong&gt;Detailed Billing Reports&lt;/strong&gt; reports from the S3 bucket specified and analyze them using tools like Amazon QuickSight.&lt;/p&gt;

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

&lt;p&gt;When implementing the &lt;em&gt;Requester Pays&lt;/em&gt; model on an S3 bucket, &lt;strong&gt;it's important to ensure that potential data users are aware that they will incur charges for their data access&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is important to Monitor Access to your S3 buckets at all times. Use S3 access logs or AWS CloudTrail to &lt;strong&gt;monitor who is accessing your S3 buckets&lt;/strong&gt; to manage data transfer and associated costs (maybe one day I will write a blog about this setup)&lt;/p&gt;

&lt;p&gt;Understanding the &lt;em&gt;Requester Pays&lt;/em&gt; model allows all of us, AWS users, to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;deploy cost-effective data-sharing solutions in AWS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;manage costs associated with data stored in AWS S3&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;help to build cost-effective services aligned with organizational or project goals.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Official documentation link&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html?icmpid=docs_amazons3_console"&gt;https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html?icmpid=docs_amazons3_console&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>cloudcost</category>
      <category>s3</category>
    </item>
    <item>
      <title>Navigating AWS IAM Policies: Restricting Access to Billing and Cost Management</title>
      <dc:creator>nⓐtⓐLiⓔ</dc:creator>
      <pubDate>Mon, 25 Dec 2023 08:13:26 +0000</pubDate>
      <link>https://dev.to/sheopedia/navigating-aws-iam-policies-restricting-access-to-billing-and-cost-management-3ncg</link>
      <guid>https://dev.to/sheopedia/navigating-aws-iam-policies-restricting-access-to-billing-and-cost-management-3ncg</guid>
      <description>&lt;p&gt;You most likely heard that AWS has retired AWS Identity and Access Management (IAM) actions for the Billing, Cost Management, and Account Consoles under the service prefix aws-portal and two actions under the purchase order namespace. These have been replaced by more granular, service-specific permissions, enhancing control over Billing, Cost Management, and Account Services access. As a result, if your AWS organization hadn't previously set up strict access controls, you might now find that all members can view sensitive financial information such as billing, taxes, and cost data.&lt;/p&gt;

&lt;p&gt;Not every employee in an organization needs, or should have, access to sensitive financial details like billing and taxes. Not every employee should have access to sensitive financial details like billing and taxes. This kind of information is typically meant for the eyes of specific departments, such as Finance or Accounting.&lt;/p&gt;

&lt;p&gt;One of the ways to address this is to create a policy to restrict access to Billing, Cost Management, Account Services, and Tax information. A practical approach is to develop a policy that specifically limits access and apply it across the organization at the account level. It’s important to note that the implementation of this policy will vary based on your organization’s account setup, whether it’s IAM policy-based, uses SSO with permission sets, or Service Control Policies (SCP). For more detailed guidance on these setups, refer to the AWS documentation.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;IAM Policy Example: *&lt;/em&gt;&lt;br&gt;
Here’s an IAM policy snippet designed to deny access to various billing and cost-related actions across AWS resources:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "DenyBillingViewOnHomepage",
            "Effect": "Deny",
            "Action": [
                "aws-portal:View*",
                "billing:*",
                "purchase-orders:*",
                "tax:*",
                "payments:*",
                "cur:*",
                "ce:*"
            ],
            "Resource": "*"
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ONE MORE TIP:&lt;/p&gt;

&lt;p&gt;Unchecking “Linked Account Access” in Cost Management Preferences under Billing and Cost Management might seem like a quick fix to restrict access to cost and usage data in Cost Explorer and the AWS Console HomeView. However, this doesn’t completely solve the issue, as users will still see a link to access Bills, Tax information, etc. Therefore, I recommend implementing a comprehensive IAM policy rather than relying on this setting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fex6rv1e9390x44d6k11d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fex6rv1e9390x44d6k11d.png" alt="Image description" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cost</category>
      <category>iam</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
