<?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: Zeke Sebulino</title>
    <description>The latest articles on DEV Community by Zeke Sebulino (@zekesebulino).</description>
    <link>https://dev.to/zekesebulino</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%2F843432%2Fbb537035-9710-465c-b2c9-76b82e20f507.jpeg</url>
      <title>DEV Community: Zeke Sebulino</title>
      <link>https://dev.to/zekesebulino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zekesebulino"/>
    <language>en</language>
    <item>
      <title>Create Basic Static website with AWS S3 and Terraform</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Mon, 22 May 2023 04:58:37 +0000</pubDate>
      <link>https://dev.to/zekesebulino/create-basic-static-website-with-aws-s3-and-terraform-1c23</link>
      <guid>https://dev.to/zekesebulino/create-basic-static-website-with-aws-s3-and-terraform-1c23</guid>
      <description>&lt;p&gt;variables.tf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="k"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"bucketName"&lt;/span&gt; &lt;span class="p"&gt;{&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;"example-web-app-terraform"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;provider.tf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="k"&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;"ap-southeast-1"&lt;/span&gt;
  &lt;span class="nx"&gt;profile&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"zeke"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;main.tf&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight terraform"&gt;&lt;code&gt;&lt;span class="k"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket"&lt;/span&gt; &lt;span class="s2"&gt;"example"&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="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucketName&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket_public_access_block"&lt;/span&gt; &lt;span class="s2"&gt;"example"&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;example&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;block_public_acls&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;block_public_policy&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;ignore_public_acls&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;restrict_public_buckets&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket_policy"&lt;/span&gt; &lt;span class="s2"&gt;"example-policy"&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;example&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;policy&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;templatefile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"s3-policy.json"&lt;/span&gt;&lt;span class="p"&gt;,&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="kd"&gt;var&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucketName&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nx"&gt;depends_on&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;aws_s3_bucket_public_access_block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_bucket_website_configuration"&lt;/span&gt; &lt;span class="s2"&gt;"example-config"&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;example&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucket&lt;/span&gt;
  &lt;span class="nx"&gt;index_document&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;suffix&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"index.html"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_s3_object"&lt;/span&gt; &lt;span class="s2"&gt;"example-index"&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;example&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;key&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"index.html"&lt;/span&gt;
  &lt;span class="nx"&gt;source&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"./index.html"&lt;/span&gt;
  &lt;span class="nx"&gt;content_type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"text/html"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>terraform</category>
      <category>aws</category>
    </item>
    <item>
      <title>Why Docker?</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sat, 11 Mar 2023 16:29:07 +0000</pubDate>
      <link>https://dev.to/zekesebulino/why-docker-40gj</link>
      <guid>https://dev.to/zekesebulino/why-docker-40gj</guid>
      <description>&lt;p&gt;Hello!&lt;/p&gt;

&lt;p&gt;I've written this brief blog to introduce Docker to some developers in my small community of fellow developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Docker and Why Do You Need it?
&lt;/h2&gt;

&lt;p&gt;If you're a software developer, you may have heard of Docker before, (I'm pretty sure you did already!). But what is Docker, exactly, and why is it such an important technology to learn? &lt;/p&gt;

&lt;p&gt;In this blog, we'll explore the basics of Docker and show you how to get started using it. (Obviously theres a lot of existing youtube / blog that tackles what / why / how Docker is, but I'm glad if you stumbled upon this post and somehow this helped you get started with Docker)&lt;/p&gt;

&lt;p&gt;At its core, Docker is a tool for &lt;strong&gt;containerizing applications&lt;/strong&gt;. That might sound a bit technical, but it just means that Docker allows you to &lt;strong&gt;package up **all the code, dependencies, and configuration needed to run an application into a **single container&lt;/strong&gt;. This container can then be run on any machine that has Docker installed, regardless of the underlying operating system or hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Docker?
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Consistent Environments:
&lt;/h4&gt;

&lt;p&gt;With Docker, you can be sure that the environment in which your application runs is consistent, no matter where it's deployed. This makes it much easier to manage and troubleshoot applications, since you don't have to worry about differences in the underlying infrastructure / os.  (Yup, this solves the "But It works on my machine" issue)&lt;/p&gt;

&lt;h4&gt;
  
  
  Portability:
&lt;/h4&gt;

&lt;p&gt;Since Docker containers can be run on any machine with Docker installed, they can be easily moved between development, testing, and production environments. This makes it much easier to develop and test applications locally before deploying them to production.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scalability:
&lt;/h4&gt;

&lt;p&gt;Docker makes it easy to scale applications horizontally by running multiple containers in parallel. This allows you to handle more traffic or workload without having to invest in expensive hardware or infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get started with Docker
&lt;/h2&gt;

&lt;p&gt;If you're new to Docker, getting started can seem a bit daunting. But don't worry - Docker has a great getting started guide that walks you through the process step by step.&lt;/p&gt;

&lt;p&gt;Here are the basic steps you'll need to follow:&lt;/p&gt;

&lt;h4&gt;
  
  
  Install Docker:
&lt;/h4&gt;

&lt;p&gt;The first step is to install Docker on your machine. Docker has installation instructions for all major operating systems on their website. See &lt;a href="https://docs.docker.com/get-docker/"&gt;HERE&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Build Your First Image:
&lt;/h4&gt;

&lt;p&gt;Once you have Docker installed, you can build your first Docker image. An image is basically a snapshot of your application and its dependencies at a particular point in time. To build an image, you'll need to create a Dockerfile, which is a script that tells Docker how to build the image. Once you have a Dockerfile, you can run the docker build command to build the image.&lt;/p&gt;

&lt;h4&gt;
  
  
  Run Your Container:
&lt;/h4&gt;

&lt;p&gt;Once you have an image, you can run it in a container. A container is basically an instance of an image that's running on your machine. To run a container, you'll use the docker run command, which tells Docker to start a new container from the specified image.&lt;/p&gt;

&lt;p&gt;And that's it! Of course, there's a lot more to Docker than just these basic steps, but they should be enough to get you started.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>devops</category>
    </item>
    <item>
      <title>AWS Codebuild - List all projects and output into a file.</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Mon, 06 Mar 2023 13:17:18 +0000</pubDate>
      <link>https://dev.to/zekesebulino/aws-codebuild-list-all-projects-and-output-into-a-file-4d34</link>
      <guid>https://dev.to/zekesebulino/aws-codebuild-list-all-projects-and-output-into-a-file-4d34</guid>
      <description>&lt;p&gt;Hey there! So, I recently had to tackle the challenge of identifying all of our AWS CodeBuilds that were using soon-to-be-deprecated Linux images. Given the large number of builds in our project, manually sifting through each one would have taken forever.&lt;/p&gt;

&lt;p&gt;To save time, I turned to the AWS CLI and crafted a command that would help me list out all of our CodeBuilds alongside their corresponding Linux images. This way, I could quickly identify the builds that needed updating.&lt;/p&gt;

&lt;p&gt;Here's the command I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws codebuild list-projects | jq &lt;span class="s1"&gt;'.projects[]'&lt;/span&gt; | xargs &lt;span class="nt"&gt;-I&lt;/span&gt;&lt;span class="o"&gt;{}&lt;/span&gt; sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'aws codebuild batch-get-projects --names "$1" | jq -r "\"\(.projects[].name) : \(.projects[].environment.image)\"" '&lt;/span&gt; _ &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; list.txt

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a bit of a mouthful, but essentially what it does is use the list-projects command to fetch all CodeBuild projects, pipe them to jq to extract the project names, and then use xargs to pass each project name to the batch-get-projects command, which fetches the full project details including the Linux image. Finally, I used jq again to format the output as "project name : Linux image", and wrote the results to a file called list.txt.&lt;/p&gt;

&lt;p&gt;Hope this helps you save some time too!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Running Your Node.js Backend on an AWS EC2 Machine: Making it Production-Ready</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Mon, 06 Mar 2023 12:21:07 +0000</pubDate>
      <link>https://dev.to/zekesebulino/running-your-nodejs-backend-on-an-aws-ec2-machine-making-it-production-ready-49ma</link>
      <guid>https://dev.to/zekesebulino/running-your-nodejs-backend-on-an-aws-ec2-machine-making-it-production-ready-49ma</guid>
      <description>&lt;h1&gt;
  
  
  Running Your Node.js Express Backend on an EC2 Machine: Making it Production-Ready
&lt;/h1&gt;

&lt;p&gt;If you're looking to run your Node.js Express backend on an EC2 machine, then there are a few key concepts that you should know to make it production-ready. In this post, we'll cover the most important concepts you need to know to make your backend reliable, scalable, and secure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security
&lt;/h2&gt;

&lt;p&gt;When running your Node.js Express backend on an EC2 instance, security should be your top priority. Here are a few best practices to follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use SSH key pairs for secure remote access&lt;/li&gt;
&lt;li&gt;Configure a firewall (Security Group) to restrict access to only the necessary ports&lt;/li&gt;
&lt;li&gt;Use SSL/TLS certificates to encrypt traffic&lt;/li&gt;
&lt;li&gt;Configure Identity and Access Management (IAM) roles to manage permissions for accessing AWS resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Scalability
&lt;/h2&gt;

&lt;p&gt;Scalability is crucial for any production-ready backend. To make sure your backend can handle a growing number of requests and users, you can use the following techniques:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Elastic Load Balancing (ELB) to distribute incoming traffic to multiple EC2 instances running your Node.js Express app&lt;/li&gt;
&lt;li&gt;Use Auto Scaling to automatically add or remove instances based on demand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Monitoring
&lt;/h2&gt;

&lt;p&gt;To ensure your backend is performing well, you should monitor key metrics such as CPU usage, memory usage, and network traffic. You can use AWS CloudWatch to collect and analyze these metrics and set up alerts for any abnormal behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  High Availability
&lt;/h2&gt;

&lt;p&gt;To minimize downtime in case of failures, you should design your backend for high availability. Here are some ways to achieve this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use multiple Availability Zones (AZs) to host your EC2 instances&lt;/li&gt;
&lt;li&gt;Configure Elastic IP addresses to ensure that your instances have a consistent IP address even if they are stopped or restarted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deployment / CICD
&lt;/h2&gt;

&lt;p&gt;A well-defined and automated deployment process is crucial for making changes to your backend without causing downtime or introducing bugs. You can use tools such as AWS CodeDeploy  / Jenkins / github actions / gitlab ci to automate your deployment process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Logging
&lt;/h2&gt;

&lt;p&gt;Proper logging is essential for debugging issues and investigating errors. You can use tools such as AWS CloudWatch Logs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Optimizing your backend for performance is critical to ensuring a smooth user experience. Here are a few ways to improve performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minimize database queries&lt;/li&gt;
&lt;li&gt;Optimize code&lt;/li&gt;
&lt;li&gt;Leverage caching solutions such as Redis or Memcached&lt;/li&gt;
&lt;li&gt;Use Amazon CloudFront to cache static assets and improve the performance of your application.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By following these key concepts, you can ensure that your Node.js backend running on an EC2 machine is production-ready and can handle the demands of your users. Remember to prioritize security, scalability, monitoring, high availability, deployment, logging, and performance. With these key concepts in mind, you can be confident that your backend will be reliable, fast, and secure.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AWS CodePipeline - Codebuild Error - npm ERR! code EPIPE</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Wed, 01 Mar 2023 12:48:57 +0000</pubDate>
      <link>https://dev.to/zekesebulino/aws-codepipeline-codebuild-error-npm-err-code-epipe-4f9i</link>
      <guid>https://dev.to/zekesebulino/aws-codepipeline-codebuild-error-npm-err-code-epipe-4f9i</guid>
      <description>&lt;h2&gt;
  
  
  Fixing the npm ERR! code EPIPE Error in AWS CodeBuild
&lt;/h2&gt;

&lt;p&gt;You may have experienced the npm ERR! code EPIPE error while running npm ci in AWS CodeBuild. This error typically indicates an issue with writing data to a file or a stream. There are various reasons why this error can occur, such as network connectivity issues, file permission issues, or conflicts with other processes running on the same system.&lt;/p&gt;

&lt;p&gt;One potential solution to fix the npm ERR! code EPIPE error in AWS CodeBuild is to invalidate the CodeBuild project cache. This can be done using the AWS Management Console, the AWS CLI, or the AWS SDKs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Invalidate the CodeBuild Project Cache in AWS Management Console:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open the AWS Management Console and navigate to the CodeBuild console.&lt;/li&gt;
&lt;li&gt;Select the CodeBuild project that is encountering the npm ERR! code EPIPE error.&lt;/li&gt;
&lt;li&gt;Click on the "Build History" tab and find the build that failed with the error.&lt;/li&gt;
&lt;li&gt;Click on the build ID to open the build details.&lt;/li&gt;
&lt;li&gt;Click on the "Invalidate Build Cache" button to invalidate the CodeBuild project cache.&lt;/li&gt;
&lt;li&gt;Re-run the build and check if the npm ERR! code EPIPE error has been resolved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Invalidate the CodeBuild Project Cache Using the AWS CLI:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open a terminal or command prompt and install the AWS CLI if you haven't already done so.&lt;/li&gt;
&lt;li&gt;Run the following command to invalidate the CodeBuild project cache:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws codebuild invalidate-project-cache --project-name &amp;lt;project-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Replace  with the name of the CodeBuild project that is encountering the npm ERR! code EPIPE error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Re-run the build and check if the npm ERR! code EPIPE error has been resolved.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Error message example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;Container] 2023/03/01 12:13:31 Running &lt;span class="nb"&gt;command &lt;/span&gt;npm ci
npm ERR! code EPIPE
npm ERR! syscall write
npm ERR! errno &lt;span class="nt"&gt;-32&lt;/span&gt;
npm ERR! write EPIPE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>welcome</category>
      <category>introduction</category>
      <category>community</category>
    </item>
    <item>
      <title>NodeJs Backend Application - Folder Structure / Boilerplate</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sat, 25 Feb 2023 00:59:24 +0000</pubDate>
      <link>https://dev.to/zekesebulino/nodejs-backend-application-folder-structure-boilerplate-31pc</link>
      <guid>https://dev.to/zekesebulino/nodejs-backend-application-folder-structure-boilerplate-31pc</guid>
      <description>&lt;p&gt;Building a Node.js backend service can be a challenging task, especially when it comes to organizing the codebase in a way that is easy to understand and maintain. In this post, we'll explore the best folder structure and setup for working with a Node.js application for a backend service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is folder structure important?
&lt;/h2&gt;

&lt;p&gt;Before we dive into the details of the folder structure, it's important to understand why it's so important. A well-organized folder structure can make it easier to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand the overall structure of the application&lt;/li&gt;
&lt;li&gt;Find specific files and code quickly&lt;/li&gt;
&lt;li&gt;Maintain the codebase over time&lt;/li&gt;
&lt;li&gt;Scale the application as it grows&lt;/li&gt;
&lt;li&gt;Without a clear folder structure, the codebase can quickly become chaotic and difficult to work with.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The best folder structure for a Node.js backend service
&lt;/h2&gt;

&lt;p&gt;So, what does the best folder structure for a Node.js backend service look like? While there's no one-size-fits-all answer to this question, there are some general principles that can guide the organization of the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  src
&lt;/h3&gt;

&lt;p&gt;First and foremost, it's important to keep the source code separate from other files and directories in the project. For this reason, we'll create a src directory to hold all the source code for the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  config
&lt;/h3&gt;

&lt;p&gt;Next, we'll create a config directory to hold configuration files for the application. This might include environment variables, database connection settings, and other configuration options.&lt;/p&gt;

&lt;h3&gt;
  
  
  controllers
&lt;/h3&gt;

&lt;p&gt;Controllers are responsible for handling incoming requests and sending responses back to the client. For this reason, we'll create a controllers directory to hold all the controllers for the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  models
&lt;/h3&gt;

&lt;p&gt;Models represent the data structures used by the application. For example, if the application is interacting with a database, models might represent tables or collections in the database. We'll create a models directory to hold all the models for the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  routes
&lt;/h3&gt;

&lt;p&gt;Routes define the endpoints for the API. We'll create a routes directory to hold all the routes for the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  services
&lt;/h3&gt;

&lt;p&gt;Services encapsulate the business logic of the application. They might interact with models, controllers, and other parts of the codebase. We'll create a services directory to hold all the services for the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  utils
&lt;/h3&gt;

&lt;p&gt;Finally, we'll create a utils directory to hold utility functions that are used across the application. These might include functions for error handling, validation, and other common tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting it all together
&lt;/h3&gt;

&lt;p&gt;With these principles in mind, here's what the overall folder structure for a Node.js backend service might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/
├── .env
├── .gitignore
├── package.json
├── tsconfig.json
├── src/
│   ├── app.ts
│   ├── config/
│   ├── controllers/
│   ├── models/
│   ├── routes/
│   ├── services/
│   └── utils/
└── ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, this structure is designed to keep the code organized and modular, making it easier to maintain and scale the application over time. By separating concerns into different directories, it becomes easier to make changes to specific parts of the application without affecting other parts.&lt;/p&gt;

&lt;p&gt;I would also love to recommend to you to check the following so you can start write off the bat without manually creating your own boilerplate + a lot of utility tools it provides!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nx.dev/" rel="noopener noreferrer"&gt;nx.dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lerna.js.org/" rel="noopener noreferrer"&gt;lerna&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>discuss</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Datadog - export more than 5000 records.</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Tue, 21 Feb 2023 04:18:24 +0000</pubDate>
      <link>https://dev.to/zekesebulino/datadog-export-more-than-5000-records-1ofp</link>
      <guid>https://dev.to/zekesebulino/datadog-export-more-than-5000-records-1ofp</guid>
      <description>&lt;p&gt;You can use the following code to fetch more than 5000 records from Datadog API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;RUMEvent&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Define the properties of a RUM event here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;RUMResponse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RUMEvent&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="nl"&gt;links&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="nl"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;after&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getRUMData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;rumApplicationID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;RUMEvent&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@application.id:0070aef4-9021-4b1a-8af8-85682b7d3f68 @action.name:element_timing @action.type:custom @type:action&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="na"&gt;rumData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RUMEvent&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;hasMoreData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hasMoreData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://api.datadoghq.com/api/v2/rum/events/search&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;page&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nx"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DD-API-KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;DD-APPLICATION-KEY&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rumApplicationID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RUMResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;rumData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;rumData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;after&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`current page response count : &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`current collected : &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;responseData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;hasMoreData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;rumData&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;writeRUMDataToFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RUMEvent&lt;/span&gt;&lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="nx"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createWriteStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;once&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;open&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;\n`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
      &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Example usage&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;apiKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;YOUR_API_KEY&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rumApplicationID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;YOUR_APPLICATION_KEY&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1676949491156&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;endTime&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1676950331699&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;getRUMData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rumApplicationID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;startTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;endTime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;writeRUMDataToFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rum_data.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Data written to file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>security</category>
      <category>cloudnative</category>
      <category>cicd</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Verify if your code is running in AWS Lambda / Serverless</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Mon, 20 Feb 2023 14:19:20 +0000</pubDate>
      <link>https://dev.to/zekesebulino/verify-if-your-code-is-running-in-aws-lambda-serverless-4aa8</link>
      <guid>https://dev.to/zekesebulino/verify-if-your-code-is-running-in-aws-lambda-serverless-4aa8</guid>
      <description>&lt;p&gt;Are you developing a Node.js app to be deployed on AWS Lambda? If so, you may need to detect whether your code is running in the AWS Lambda environment or not. One way to do this is by examining the LAMBDA_TASK_ROOT environment variable. In this post, we'll explore how you can use this variable to detect if your Node.js app code is running on AWS Lambda.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is &lt;strong&gt;LAMBDA_TASK_ROOT&lt;/strong&gt;?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;LAMBDA_TASK_ROOT&lt;/strong&gt; is an environment variable that is automatically set by AWS Lambda for all Node.js functions. This variable contains the path to the directory where the code for the Lambda function is located. In other words, it points to the root directory of the Lambda function.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to detect if your code is running on AWS Lambda?
&lt;/h3&gt;

&lt;p&gt;To check if your Node.js app code is running on AWS Lambda, you can examine the LAMBDA_TASK_ROOT environment variable. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LAMBDA_TASK_ROOT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Running on AWS Lambda&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Not running on AWS Lambda&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code checks if the &lt;strong&gt;LAMBDA_TASK_ROOT&lt;/strong&gt; environment variable is set. If it is, it assumes that the code is running on AWS Lambda. If it's not set, it assumes that the code is not running on AWS Lambda.&lt;/p&gt;

&lt;p&gt;It's important to note that this method is not foolproof. In some cases, the &lt;strong&gt;LAMBDA_TASK_ROOT&lt;/strong&gt; environment variable may not be set even if the code is running on AWS Lambda. However, for most cases, it should be reliable.&lt;/p&gt;

&lt;p&gt;If you encounter any issues, you can explore other environment variables that are set by AWS Lambda, such as &lt;strong&gt;AWS_LAMBDA_FUNCTION_NAME&lt;/strong&gt;, &lt;strong&gt;AWS_REGION&lt;/strong&gt;, and &lt;strong&gt;AWS_EXECUTION_ENV&lt;/strong&gt;, among others.&lt;/p&gt;

</description>
      <category>vibecoding</category>
    </item>
    <item>
      <title>AWS SES - Core Concepts</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sun, 19 Feb 2023 19:32:04 +0000</pubDate>
      <link>https://dev.to/zekesebulino/aws-ses-core-concepts-229a</link>
      <guid>https://dev.to/zekesebulino/aws-ses-core-concepts-229a</guid>
      <description>&lt;p&gt;Hello, everyone!&lt;/p&gt;

&lt;p&gt;In this blog post, I'm going to give you a rundown of the core concepts you need to know about &lt;strong&gt;Amazon Web Services Simple Email Service (AWS SES)&lt;/strong&gt;. &lt;strong&gt;AWS SES&lt;/strong&gt; is a cloud-based email service that allows you to send and receive email using your own email addresses and domains. Let's dive into the key concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verified Senders
&lt;/h2&gt;

&lt;p&gt;Before you can start sending email with AWS SES, you need to verify your email addresses and domains. This involves proving that you own the email address or domain you want to use. Once you've verified your email address or domain, you'll be able to send email from that address or domain using AWS SES.&lt;/p&gt;

&lt;h2&gt;
  
  
  Email Sending Limits
&lt;/h2&gt;

&lt;p&gt;AWS SES has limits on how much email you can send. These limits are in place to ensure the service remains reliable and available for all users. There are two types of limits you need to be aware of:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sending Limits&lt;/strong&gt;: The maximum number of emails you can send per 24-hour period.&lt;br&gt;
&lt;strong&gt;Sending Rate Limits&lt;/strong&gt;: The maximum number of emails you can send per second.&lt;br&gt;
It's important to monitor your usage and stay within these limits to avoid any interruptions in your email service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Email Receiving
&lt;/h2&gt;

&lt;p&gt;In addition to sending email, AWS SES also allows you to receive email. When you receive an email, AWS SES can store the email in an Amazon S3 bucket or deliver the email to an Amazon SNS topic. You can also configure AWS Lambda to process incoming emails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bounce and Complaint Handling
&lt;/h2&gt;

&lt;p&gt;When you send email using AWS SES, there's a chance that some of your emails may bounce or be marked as spam by the recipient. AWS SES provides mechanisms for handling these bounces and complaints. You can configure AWS SES to send bounce and complaint notifications to an Amazon SNS topic or an email address of your choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  DKIM and SPF Authentication
&lt;/h2&gt;

&lt;p&gt;To ensure your emails aren't marked as spam, it's important to configure DomainKeys Identified Mail (DKIM) and Sender Policy Framework (SPF) authentication. DKIM and SPF help verify that the email is coming from a trusted source and can help improve deliverability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reputation Management
&lt;/h2&gt;

&lt;p&gt;Maintaining a good reputation is critical when it comes to email deliverability. AWS SES provides tools for managing your email reputation, such as the ability to view your sending statistics and feedback loops. You can use this information to identify any issues and improve your email deliverability.&lt;/p&gt;

&lt;p&gt;That's a brief overview of the core concepts of AWS SES. I hope this post has been helpful in getting you started with AWS SES. If you have any questions or comments, feel free to leave them below. And as always, happy coding!&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>AWS SQS Core Concepts: A Beginner's Guide</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sat, 18 Feb 2023 23:44:09 +0000</pubDate>
      <link>https://dev.to/zekesebulino/aws-sqs-core-concepts-a-beginners-guide-hph</link>
      <guid>https://dev.to/zekesebulino/aws-sqs-core-concepts-a-beginners-guide-hph</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;AWS SQS (Simple Queue Service) is a fully managed message queuing service that enables you to decouple and scale your distributed microservices and serverless applications. SQS eliminates the complexity and overhead associated with managing and operating message oriented middleware, while providing a highly scalable, reliable, and secure messaging service.&lt;/p&gt;

&lt;p&gt;In this blog post, we will explore the core concepts of AWS SQS and their uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Queues
&lt;/h2&gt;

&lt;p&gt;Queues are the foundation of AWS SQS. They provide a way to store messages that are waiting to be processed by your application. A queue is a logical grouping of messages that can be processed by one or more consumers. Messages are stored in the queue until they are consumed by a consumer or until they expire. AWS SQS provides two types of queues: standard and FIFO.&lt;/p&gt;

&lt;h2&gt;
  
  
  Standard Queues
&lt;/h2&gt;

&lt;p&gt;Standard queues provide a highly scalable and durable messaging system for distributed systems that do not require the exact ordering of messages. Messages are stored in the order they are received, but are not guaranteed to be delivered in the same order. Standard queues provide at-least-once delivery, which means that messages can be delivered more than once, but never lost.&lt;/p&gt;

&lt;h2&gt;
  
  
  FIFO Queues
&lt;/h2&gt;

&lt;p&gt;FIFO (First-In-First-Out) queues provide the exact ordering of messages that is required by many applications. Messages are processed in the order in which they are received and are delivered exactly once. FIFO queues provide exactly-once processing, which means that messages are processed only once and are never duplicated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Messages
&lt;/h2&gt;

&lt;p&gt;Messages are the payloads of data that are sent between producers and consumers. They can be any string, up to 256KB in size. Messages can contain structured data in JSON, XML, or other formats, and can also contain metadata in the form of message attributes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Producers
&lt;/h2&gt;

&lt;p&gt;Producers are applications that send messages to a queue. A producer can be any application that has access to AWS SQS, including EC2 instances, Lambda functions, and external applications. When a producer sends a message, it specifies the queue to which the message is sent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consumers
&lt;/h2&gt;

&lt;p&gt;Consumers are applications that retrieve messages from a queue and process them. A consumer can be any application that has access to AWS SQS, including EC2 instances, Lambda functions, and external applications. When a consumer retrieves a message, it specifies the queue from which the message is retrieved. A queue can have one or more consumers, and each consumer retrieves and processes messages independently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visibility Timeout
&lt;/h2&gt;

&lt;p&gt;When a consumer retrieves a message from a queue, the message becomes invisible to other consumers for a certain period of time, called the visibility timeout. This ensures that the message is not processed by multiple consumers at the same time. If the consumer does not delete the message within the visibility timeout period, the message becomes visible to other consumers again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dead-Letter Queues
&lt;/h2&gt;

&lt;p&gt;Dead-letter queues are queues that receive messages that could not be processed by the main queue. These messages are called "dead-letter messages" and can be analyzed to diagnose and fix the issues that caused them to be rejected. Dead-letter queues are useful for ensuring that messages are not lost, and for troubleshooting issues in your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this blog post, we've covered the core concepts of AWS SQS and their uses. Queues are the foundation of AWS SQS, and messages are the payloads of data that are sent between producers and consumers. Producers send messages to a queue, and consumers retrieve messages from a queue and process them. Visibility timeouts ensure that messages are not processed by multiple consumers at the same time, and dead-letter queues are useful for troubleshooting issues in your application.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AWS IAM Core Concepts: Understanding Identity and Access Management</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sat, 18 Feb 2023 23:28:12 +0000</pubDate>
      <link>https://dev.to/zekesebulino/aws-iam-core-concepts-understanding-identity-and-access-management-ljn</link>
      <guid>https://dev.to/zekesebulino/aws-iam-core-concepts-understanding-identity-and-access-management-ljn</guid>
      <description>&lt;h1&gt;
  
  
  AWS IAM Core Concepts
&lt;/h1&gt;

&lt;p&gt;AWS Identity and Access Management (IAM) is a service that allows you to manage access to AWS resources. It enables you to create and manage AWS users and groups, as well as define permissions that allow or deny access to specific resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Concepts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Users
&lt;/h3&gt;

&lt;p&gt;An IAM user is an identity within your AWS account that you can use to securely access your resources. You can create and manage multiple users within your account and control their access to resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Groups
&lt;/h3&gt;

&lt;p&gt;An IAM group is a collection of IAM users. You can use groups to specify permissions for a set of users, making it easier to manage their access to resources. &lt;/p&gt;

&lt;h3&gt;
  
  
  Roles
&lt;/h3&gt;

&lt;p&gt;An IAM role is an AWS identity that you can create in your account that has specific permissions. You can assume a role to temporarily take on the permissions assigned to the role. This is useful for granting access to resources to services or applications that run on AWS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Policies
&lt;/h3&gt;

&lt;p&gt;An IAM policy is a set of permissions that you can attach to an IAM user, group, or role. A policy defines what actions are allowed or denied on specific resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;p&gt;Here are some best practices to follow when working with AWS IAM:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use unique and strong passwords for IAM users.&lt;/li&gt;
&lt;li&gt;Use IAM groups to manage permissions for multiple users.&lt;/li&gt;
&lt;li&gt;Follow the principle of least privilege, giving users only the permissions they need to perform their tasks.&lt;/li&gt;
&lt;li&gt;Use IAM roles to grant access to resources for services or applications.&lt;/li&gt;
&lt;li&gt;Regularly review and rotate access keys for IAM users to ensure security.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Analogies to help you more understand things.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Imagine you are the owner of a company with multiple departments, and each department has specific job roles with different levels of access to company resources.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;IAM users can be thought of as individual employees, each with their own unique login credentials and permissions. Users have access to only the resources that the owner has explicitly granted them access to.&lt;/p&gt;

&lt;p&gt;IAM roles can be thought of as job titles that define a set of responsibilities and permissions that are necessary to perform a particular job function. For example, a "manager" role might have access to all employee files, while a "salesperson" role might have access only to customer data.&lt;/p&gt;

&lt;p&gt;IAM groups can be thought of as teams of employees who have similar job functions or permissions. For example, a "marketing" group might have access to marketing materials, while an "engineering" group might have access to source code.&lt;/p&gt;

&lt;p&gt;Managed policies can be thought of as company policies that are standardized across all departments. These policies define rules for access to company resources and are managed centrally by the owner. For example, a "security" policy might require that all users enable multi-factor authentication, while a "compliance" policy might require that all employees complete regular training.&lt;/p&gt;

&lt;p&gt;In summary, IAM roles, users, groups, and managed policies work together to ensure that employees have access only to the resources they need to do their jobs, while the owner maintains control and oversight over all company resources.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Imagine a university with various buildings and rooms, and each room has a different level of access control. The university's security team needs to manage who has access to each room.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;IAM Users are like individual students, each with their own unique ID and access to certain rooms. Users have their own login credentials and can be granted access to specific resources, such as EC2 instances or S3 buckets.&lt;/p&gt;

&lt;p&gt;IAM Groups are like student clubs, with multiple users who share similar access needs. The security team can create groups based on specific permissions or job roles, and then assign users to those groups. This makes it easier to manage permissions for multiple users at once, rather than having to manage them individually.&lt;/p&gt;

&lt;p&gt;IAM Roles are like temporary visitor badges. They are created to provide temporary access to resources to users or AWS services without the need to create an IAM user. For example, an EC2 instance can be assigned an IAM role, which allows it to access specific resources for a set amount of time.&lt;/p&gt;

&lt;p&gt;Managed Policies are like the university's access control policy, which is defined by the security team. The policy determines which rooms can be accessed by which users or groups, and what actions they can take within those rooms. Similarly, a managed policy in IAM is a set of permissions that can be assigned to multiple users, groups, or roles. It simplifies permission management and ensures consistent access control across your organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AWS IAM is a powerful service that allows you to manage access to your AWS resources. By following the key concepts and best practices outlined above, you can ensure that your resources are secure and your users have the appropriate level of access. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding AWS SNS</title>
      <dc:creator>Zeke Sebulino</dc:creator>
      <pubDate>Sat, 18 Feb 2023 17:26:14 +0000</pubDate>
      <link>https://dev.to/zekesebulino/understanding-aws-sns-in-a-nutshell-3dca</link>
      <guid>https://dev.to/zekesebulino/understanding-aws-sns-in-a-nutshell-3dca</guid>
      <description>&lt;p&gt;&lt;strong&gt;Amazon Simple Notification Service (SNS)&lt;/strong&gt; is a fully managed messaging service provided by Amazon Web Services (AWS) that enables you to publish messages to a variety of endpoints or subscribers, such as email, SMS, mobile push notifications, and HTTP endpoints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SNS&lt;/strong&gt; is designed to be highly available, durable, and scalable, making it suitable for sending large volumes of messages, including high-velocity events and notifications. SNS offers a pay-as-you-go pricing model, so you only pay for what you use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SNS&lt;/strong&gt; works by allowing you to create topics, which are essentially channels for sending messages. You can then subscribe endpoints or subscribers to these topics, which will receive any messages that are published to the topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SNS&lt;/strong&gt; offers several features, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Message filtering&lt;/strong&gt;: allows you to set up subscription filter policies, so subscribers only receive messages that match their interests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Message encryption&lt;/strong&gt;: allows you to encrypt messages using AWS Key Management Service (KMS) for enhanced security.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Message fan-out&lt;/strong&gt;: allows you to send the same message to multiple endpoints or subscribers simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Delivery status tracking&lt;/strong&gt;: allows you to track the delivery status of messages and receive notifications when messages are successfully delivered or when delivery fails.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are some key features of AWS SNS:&lt;/p&gt;

&lt;p&gt;Topics: A topic is a logical access point for sending and receiving messages. You can create a topic for a specific use case and then publish messages to the topic. Subscribers can then receive messages from the topic.&lt;/p&gt;

&lt;p&gt;Subscriptions: A subscription is a connection between a topic and a subscriber. You can subscribe to a topic using email, SMS, mobile push notifications, HTTP/S endpoints, or AWS Lambda functions.&lt;/p&gt;

&lt;p&gt;Publish: You can publish a message to a topic using the AWS Management Console, AWS CLI, or API. SNS will then deliver the message to all subscribed endpoints.&lt;/p&gt;

&lt;p&gt;Filtering: SNS supports message filtering based on message attributes. This allows you to deliver messages to specific subscribers based on their interests or preferences.&lt;/p&gt;

&lt;p&gt;Encryption: SNS supports message encryption using AWS Key Management Service (KMS) to encrypt messages in transit and at rest.&lt;/p&gt;

&lt;p&gt;Mobile push notifications: SNS supports mobile push notifications for Android, iOS, and Amazon devices. You can use SNS to send notifications to mobile app users in real-time.&lt;/p&gt;

&lt;p&gt;Cost-effective: SNS is a pay-as-you-go service, meaning you only pay for what you use. There are no upfront costs or minimum fees.&lt;/p&gt;

&lt;p&gt;In summary, AWS SNS is a flexible and scalable messaging service that enables you to send messages to a large number of subscribers or endpoints. It's a cost-effective way to deliver notifications, alerts, or messages in real-time across different channels.&lt;/p&gt;

&lt;p&gt;Overall, AWS SNS is a powerful and flexible messaging service that can help you to send notifications and messages to your users or customers through multiple channels.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analogies that can help you understand more about this service.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Think of AWS SNS as a news broadcasting system. Just like how a news broadcaster delivers breaking news to a large number of viewers, AWS SNS delivers messages to a large number of subscribers or endpoints.
&lt;/h3&gt;

&lt;p&gt;In this analogy, the news broadcaster is the publisher, the viewers are the subscribers, and the breaking news is the message. Just as the news broadcaster can send breaking news to a large number of viewers across different channels (TV, radio, internet), AWS SNS can send messages to a large number of subscribers across different endpoints (mobile devices, email, SMS, HTTP endpoints, and more).&lt;/p&gt;

&lt;p&gt;Moreover, just as the news broadcaster can customize the breaking news based on viewer preferences (e.g. sports news, weather news, politics news), AWS SNS can customize the message based on subscriber preferences using message filtering based on message attributes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Think of AWS SNS as a megaphone that you can use to broadcast messages to a large group of people. Just like a megaphone amplifies your voice so that it can be heard by a crowd, SNS allows you to send messages to a large number of subscribers across various channels.
&lt;/h3&gt;

&lt;p&gt;Imagine you are the organizer of a music festival, and you need to make an announcement to all festival-goers at once. Instead of shouting the announcement to the crowd, you could use a megaphone to amplify your message and ensure that everyone can hear it. Similarly, you could use AWS SNS to send a message to all festival attendees via SMS, email, or push notifications.&lt;/p&gt;

&lt;p&gt;In this analogy, the festival attendees represent the subscribers, and the megaphone represents AWS SNS. By using SNS, you can quickly and easily send messages to all subscribers in one go, without having to manually contact each individual separately.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>inclusion</category>
      <category>career</category>
    </item>
  </channel>
</rss>
