<?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"><channel><title><![CDATA[Just a blog]]></title><description><![CDATA[Just a blog]]></description><link>https://just4people.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 01:26:24 GMT</lastBuildDate><atom:link href="https://just4people.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[AWS Boto for DevOps: why it is needed and how it makes an engineer’s life easier]]></title><description><![CDATA[In the projects I work on, in addition to my role as an ML engineer, I also have to work as a DevOps engineer. In this context, working with many AWS services, I encountered the problem that not all tasks are convenient to perform using only Terrafor...]]></description><link>https://just4people.hashnode.dev/aws-boto-for-devops-why-it-is-needed-and-how-it-makes-an-engineers-life-easier</link><guid isPermaLink="true">https://just4people.hashnode.dev/aws-boto-for-devops-why-it-is-needed-and-how-it-makes-an-engineers-life-easier</guid><category><![CDATA[Devops]]></category><category><![CDATA[AWS]]></category><category><![CDATA[boto3]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Sergii Levshchanov]]></dc:creator><pubDate>Fri, 13 Feb 2026 12:15:15 GMT</pubDate><content:encoded><![CDATA[<p>In the projects I work on, in addition to my role as an ML engineer, I also have to work as a DevOps engineer. In this context, working with many AWS services, I encountered the problem that not all tasks are convenient to perform using only Terraform, CloudFormation, or CDK, which are suitable for declarative models, mass resource creation, repeatability, and version control. However, when it is necessary to automate something complex or manage resources flexibly step by step, a tool is needed that allows you to write logic programmatically, for procedural models, convenient for dynamic logic, event-driven reactions, and custom automation.</p>
<p>For me, such a tool became Boto3 — the official AWS SDK for Python.</p>
<p><a target="_blank" href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html">https://boto3.amazonaws.com/v1/documentation/api/latest/index.html</a></p>
<p>Boto3 allows managing all AWS services via API, in other words, it provides programmatic access to many AWS capabilities, including EC2, S3, IAM, RDS, Lambda, EKS, CloudWatch, Organizations, and more.</p>
<p>In my work as a DevOps engineer, the main tasks consist of automating operations, managing the resource lifecycle, integrating services, and creating internal platform tools, which are often difficult to accomplish with Terraform. Terraform describes infrastructure declaratively, but very often there are tasks that do not fit well into a declarative model, for example: deleting all EBS snapshots older than 30 days; finding unused Elastic IPs; generating reports on IAM users without MFA; applying tags in bulk based on complex logic; responding to dynamic events.</p>
<p>In this regard, such tasks are best solved with procedural code, which is convenient using Boto3.<br />Below is an example of a script that automatically finds and deletes EBS snapshots older than 30 days:</p>
<p><code>import boto3</code></p>
<p><code>from datetime import datetime, timedelta</code></p>
<p><code>import logging</code></p>
<p><code># Set up logging</code></p>
<p><code>logging.basicConfig(level=</code><a target="_blank" href="http://logging.INFO"><code>logging.INFO</code></a><code>, format='%(asctime)s - %(levelname)s - %(message)s')</code></p>
<p><code># Create EC2 client</code></p>
<p><code>ec2 = boto3.client('ec2')</code></p>
<p><code># Get list of own snapshots</code></p>
<p><code>snapshots = ec2.describe_snapshots(OwnerIds=['self'])</code></p>
<p><code># Define threshold date (30 days ago)</code></p>
<p><code>threshold = datetime.utcnow() - timedelta(days=30)</code></p>
<p><code># Counter for deleted snapshots</code></p>
<p><code>deleted_count = 0</code></p>
<p><code>for snapshot in snapshots['Snapshots']:</code></p>
<p>    <code>snapshot_time = snapshot['StartTime'].replace(tzinfo=None)</code></p>
<p>    <code>snapshot_id = snapshot['SnapshotId']</code></p>
<p>    <code>if snapshot_time &lt; threshold:</code></p>
<p>        <code>try:</code></p>
<p>            <code>ec2.delete_snapshot(SnapshotId=snapshot_id)</code></p>
<p>            <a target="_blank" href="http://logging.info"><code>logging.info</code></a><code>(f"Deleted snapshot {snapshot_id} from {snapshot_time}")</code></p>
<p>            <code>deleted_count += 1</code></p>
<p>        <code>except ec2.exceptions.ClientError as e:</code></p>
<p>            <code>logging.error(f"Failed to delete snapshot {snapshot_id}: {e}")</code></p>
<p><a target="_blank" href="http://logging.info"><code>logging.info</code></a><code>(f"Total snapshots deleted: {deleted_count}")</code></p>
<p>Closing Public S3 Buckets (Public Access Block)</p>
<p><code>import boto3</code></p>
<p><code>import logging</code></p>
<p><code># Set up logging</code></p>
<p><code>logging.basicConfig(level=</code><a target="_blank" href="http://logging.INFO"><code>logging.INFO</code></a><code>, format='%(asctime)s - %(levelname)s - %(message)s')</code></p>
<p><code>s3 = boto3.client('s3')</code></p>
<p><code># Get a list of all buckets</code></p>
<p><code>buckets = s3.list_buckets()['Buckets']</code></p>
<p><code>for bucket in buckets:</code></p>
<p>    <code>bucket_name = bucket['Name']</code></p>
<p>    <code>try:</code></p>
<p>        <code># Get current public access settings</code></p>
<p>        <code>pab = s3.get_public_access_block(Bucket=bucket_name)['PublicAccessBlockConfiguration']</code></p>
<p>        <code># If any settings are open, close them</code></p>
<p>        <code>if not all(pab.values()):</code></p>
<p>            <code>s3.put_public_access_block(</code></p>
<p>                <code>Bucket=bucket_name,</code></p>
<p>                <code>PublicAccessBlockConfiguration={</code></p>
<p>                    <code>'BlockPublicAcls': True,</code></p>
<p>                    <code>'IgnorePublicAcls': True,</code></p>
<p>                    <code>'BlockPublicPolicy': True,</code></p>
<p>                    <code>'RestrictPublicBuckets': True</code></p>
<p>                <code>}</code></p>
<p>            <code>)</code></p>
<p>            <a target="_blank" href="http://logging.info"><code>logging.info</code></a><code>(f"Updated public access settings for bucket: {bucket_name}")</code></p>
<p>    <code>except s3.exceptions.NoSuchPublicAccessBlockConfiguration:</code></p>
<p>        <code># If the configuration does not exist, create it</code></p>
<p>        <code>s3.put_public_access_block(</code></p>
<p>            <code>Bucket=bucket_name,</code></p>
<p>            <code>PublicAccessBlockConfiguration={</code></p>
<p>                <code>'BlockPublicAcls': True,</code></p>
<p>                <code>'IgnorePublicAcls': True,</code></p>
<p>                <code>'BlockPublicPolicy': True,</code></p>
<p>                <code>'RestrictPublicBuckets': True</code></p>
<p>            <code>}</code></p>
<p>        <code>)</code></p>
<p>        <a target="_blank" href="http://logging.info"><code>logging.info</code></a><code>(f"Created public access block for bucket: {bucket_name}")</code></p>
<p>    <code>except Exception as e:</code></p>
<p>        <code>logging.error(f"Error processing bucket {bucket_name}: {e}")</code></p>
<p>Based on my experience using Boto3 for effectively solving DevOps tasks, I have outlined in the table below the main directions, methods, and examples that I consider important.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>Direction (Why it matters)</strong></td><td><strong>How Boto is used (Techniques)</strong></td><td><strong>Examples (Real-life scenarios)</strong></td></tr>
</thead>
<tbody>
<tr>
<td><strong>Infrastructure as Code + logic</strong></td><td>Extending IaC (Terraform, CloudFormation) with programmatic logic</td><td>Pre-check scripts; Post-deploy automation; Compliance automation; Dynamic role creation</td></tr>
<tr>
<td><strong>Internal DevOps tools</strong></td><td>Foundation for internal platform solutions</td><td>CLI utilities; Self-service platforms; DevOps API gateways; ChatOps bots; Internal portals</td></tr>
<tr>
<td><strong>Multi-account architecture management</strong></td><td>Centralized management of dozens of AWS accounts</td><td>AssumeRole via STS; AWS Organizations management; SCP and IAM validation; Data aggregation</td></tr>
<tr>
<td><strong>CI/CD integration</strong></td><td>Usage inside pipelines</td><td>GitLab CI; GitHub Actions; Jenkins; CodeBuild</td></tr>
<tr>
<td><strong>Event-driven DevOps</strong></td><td>Reactive automation based on events</td><td>Integration with EventBridge; Lambda + Boto3; Step Functions</td></tr>
<tr>
<td><strong>Security &amp; Compliance automation</strong></td><td>DevSecOps and audit automation</td><td>Detection of open S3 buckets; Public Security Groups validation; IAM policy control; Automatic remediation</td></tr>
</tbody>
</table>
</div><p>Based on the above, I want to add that, in my opinion, Boto3 is not just an SDK; it is an operational tool for a DevOps engineer that:<br />allows you to write infrastructure logic, helps build internal platforms, automates security, and also scales together with the organization.</p>
<p>And my advice to you is that when you first start using Boto3, begin with small scripts, and then gradually build internal platform solutions.</p>
]]></content:encoded></item><item><title><![CDATA[How Boto is helping me automate my routine]]></title><description><![CDATA[If you work with AWS and Python, you have probably at least once encountered repetitive operations in the AWS Management Console, such as uploading files to S3, deploying models, and configuring resources. These are time- and labor-intensive processe...]]></description><link>https://just4people.hashnode.dev/how-boto-is-helping-me-automate-my-routine</link><guid isPermaLink="true">https://just4people.hashnode.dev/how-boto-is-helping-me-automate-my-routine</guid><category><![CDATA[Machine Learning]]></category><category><![CDATA[AWS]]></category><category><![CDATA[Cloud]]></category><category><![CDATA[boto3]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Sergii Levshchanov]]></dc:creator><pubDate>Sat, 31 Jan 2026 20:55:21 GMT</pubDate><content:encoded><![CDATA[<p>If you work with AWS and Python, you have probably at least once encountered repetitive operations in the AWS Management Console, such as uploading files to S3, deploying models, and configuring resources. These are time- and labor-intensive processes that need and can be automated.</p>
<p>Recently, I completed an introductory AWS Boto course and applied these skills and knowledge in practice. It is well known that Boto or AWS SDK for Python — is the official Python library for managing AWS, allowing you to manage AWS from code just like regular Python objects.</p>
<p>Previously, I handled most tasks in AWS through the AWS Management Console, which essentially represents a daily routine scenario:<br />go to AWS Console → find the desired service → click 20 times → get the result</p>
<p>But this creates a lot of problems, including repeating the same actions, inability to integrate this into pipelines, and increased risk of errors due to manual operations. With Boto, however, it is enough to write just a few lines of code:</p>
<p>s3.upload_file("model.pkl", "ml-models", "v1/model.pkl")</p>
<p>From my practice, I have seen significant benefits from AWS Boto for two directions: ML Engineer and DevOps. But I will talk about DevOps and AWS Boto in the next article.</p>
<p>For an ML Engineer, working with data in S3 is the foundation of everything. Boto helps automate processes for reading and writing data in S3, loading datasets, saving models and checkpoints, versioning artifacts — and all this with simple code, whether locally, on a server, or in a pipeline:</p>
<p>import boto3</p>
<p>s3 = boto3.client("s3")<br /><a target="_blank" href="http://s3.download">s3.download</a>_file("datasets", "train.csv", "train.csv")</p>
<p>This eliminates the use of FTP, <code>scp</code>, and manual uploads. Boto also helps ML Engineers automate model storage and deployment: it saves the model in S3, then triggers deployment and updates the version:</p>
<p>s3.upload_file("<a target="_blank" href="http://model.pt">model.pt</a>", "models", "fraud/v2/<a target="_blank" href="http://model.pt">model.pt</a>")</p>
<p>For me, practical experience using Boto has shown that everyday AWS tasks can be made reproducible, automated, and manageable.</p>
]]></content:encoded></item><item><title><![CDATA[Monitoring in Data Science and Data Engineering Using AWS and Popular Tools — or Why Monitoring Is Crucial for Data Science and Data Engineering]]></title><description><![CDATA[In the era of big data and cloud computing, monitoring has become an essential component of successful projects in fields such as Data Science and Data Engineering. It involves tracking the state of ETL processes, the performance of ML models, and in...]]></description><link>https://just4people.hashnode.dev/monitoring-in-data-science-and-data-engineering-using-aws-and-popular-tools-or-why-monitoring-is-crucial-for-data-science-and-data-engineering</link><guid isPermaLink="true">https://just4people.hashnode.dev/monitoring-in-data-science-and-data-engineering-using-aws-and-popular-tools-or-why-monitoring-is-crucial-for-data-science-and-data-engineering</guid><category><![CDATA[Data Science]]></category><category><![CDATA[Devops]]></category><category><![CDATA[dataengineering]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[data-engineering]]></category><dc:creator><![CDATA[Sergii Levshchanov]]></dc:creator><pubDate>Thu, 23 Oct 2025 16:29:58 GMT</pubDate><content:encoded><![CDATA[<p>In the era of big data and cloud computing, monitoring has become an essential component of successful projects in fields such as Data Science and Data Engineering. It involves tracking the state of ETL processes, the performance of ML models, and infrastructure health — helping to identify bottlenecks, failures, and anomalies in a timely manner. Without effective monitoring, it is impossible to ensure the stable operation of complex pipelines or to optimize computational resources efficiently.</p>
<p>  Although monitoring tools are typically used by DevOps engineers, cloud engineers, and system administrators, they are also extremely valuable for Data Engineers and Data Scientists. In this article, we will explore how popular monitoring systems integrate with AWS and how they help maintain performance and reliability in AWS-based projects.</p>
<p>  Amazon CloudWatch serves as the foundation for monitoring within AWS, allowing the collection of metrics, logs, and events from nearly all AWS services.<br />Official Amazon CloudWatch documentation:<br /><a target="_blank" href="https://docs.aws.amazon.com/cloudwatch/index.html">https://docs.aws.amazon.com/cloudwatch/index.html</a></p>
<p>  Prometheus + Grafana is a popular monitoring stack where Prometheus collects metrics using a powerful query model, and Grafana visualizes the data. In AWS, Prometheus can be easily used to gather metrics through the CloudWatch Exporter.</p>
<p>How it works:<br />The CloudWatch Exporter retrieves metrics from CloudWatch and exposes them in a format that Prometheus can understand. Grafana then connects either to Prometheus or directly to CloudWatch via a built-in data source to display the data visually.</p>
<p><em>Example configuration of CloudWatch Exporter:</em></p>
<p>region: us-east-1</p>
<p>metrics:</p>
<ul>
<li><p>aws_namespace: AWS/EC2</p>
<p>aws_metric_name: CPUUtilization</p>
<p>aws_dimensions: [InstanceId]</p>
<p>aws_statistics: [Average]</p>
<p>period_seconds: 300</p>
<p>range_seconds: 600</p>
</li>
</ul>
<p>Setting Up Grafana to Connect to CloudWatch</p>
<p>Configuring Grafana to connect to CloudWatch is quite straightforward:</p>
<ol>
<li><p>In Grafana, go to Configuration &gt; Data Sources.</p>
</li>
<li><p>Add a new data source — AWS CloudWatch.</p>
</li>
<li><p>Enter your AWS access parameters (Access Key, Secret Key, Region).</p>
</li>
</ol>
<p>Documentation for Prometheus CloudWatch Exporter:<br /><a target="_blank" href="https://github.com/prometheus/cloudwatch_exporter">https://github.com/prometheus/cloudwatch_exporter</a></p>
<p>Documentation for Grafana AWS CloudWatch Data Source:<br /><a target="_blank" href="https://grafana.com/docs/grafana/latest/datasources/cloudwatch/">https://grafana.com/docs/grafana/latest/datasources/cloudwatch/</a></p>
<p>  Another popular monitoring system is Zabbix, which supports integration with AWS CloudWatch via API and automatic discovery of AWS resources using IAM roles. This is convenient for monitoring services such as EC2, RDS, ELB, S3, and EMR.</p>
<p>Setup steps:</p>
<ol>
<li><p>Create an IAM role with permissions to access CloudWatch.</p>
</li>
<li><p>Configure Zabbix to use the AWS API with this role.</p>
</li>
<li><p>Set up data items and triggers to track metrics.</p>
</li>
</ol>
<p>Official Zabbix AWS Integration Guide:<br /><a target="_blank" href="https://www.zabbix.com/documentation/current/manual/config/items/aws">https://www.zabbix.com/documentation/current/manual/config/items/aws</a></p>
<p>  Another popular monitoring system, New Relic, supports integration with AWS through AWS Integration and OpenTelemetry for collecting metrics, logs, and traces. This allows monitoring of Lambda, ECS, SageMaker, and other AWS services.</p>
<p>The main benefits for Data Engineers and Data Scientists include the ability to monitor ML inference performance as well as latency and errors in data pipelines.</p>
<p>New Relic AWS Integration Documentation:<br /><a target="_blank" href="https://docs.newrelic.com/docs/integrations/amazon-integrations/aws-integrations-list/aws-integration-installation/">https://docs.newrelic.com/docs/integrations/amazon-integrations/aws-integrations-list/aws-integration-installation/</a></p>
<p>  AWS provides native integration with Datadog, enabling monitoring of services such as Lambda, SageMaker, Glue, EMR, and Step Functions — making it ideal for DataOps and MLOps workflows.</p>
<p><em>Example of Datadog Integration with AWS Lambda:</em></p>
<p># Installing the Datadog Lambda Layer</p>
<p><em>aws lambda update-function-configuration \</em></p>
<p>  <em>--function-name my-function \</em></p>
<p>  <em>--layers arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python37:32</em></p>
<p>Datadog AWS Integration Documentation:<br /><a target="_blank" href="https://docs.datadoghq.com/integrations/amazon_web_services/">https://docs.datadoghq.com/integrations/amazon_web_services/</a></p>
<p>  The SolarWinds Orion monitoring system also supports AWS monitoring through CloudWatch and the AWS API, and is primarily focused on infrastructure control — such as EC2, RDS, and DynamoDB — but is less suitable for ML-related tasks.</p>
<p>SolarWinds AWS Monitoring Documentation:<br /><a target="_blank" href="https://documentation.solarwinds.com/en/success_center/orionplatform/content/core-orion-platform-aws-monitoring.htm">https://documentation.solarwinds.com/en/success_center/orionplatform/content/core-orion-platform-aws-monitoring.htm</a></p>
<p>  In conclusion, monitoring is the foundation of reliable operation for analytical and ML systems. Using tools such as Prometheus + Grafana, Zabbix, New Relic, SolarWinds Orion and Datadog in combination with AWS services not only enables infrastructure health tracking but also provides detailed metrics on the performance of ETL processes and ML models.</p>
]]></content:encoded></item></channel></rss>