<?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: Mohamed Fayaz</title>
    <description>The latest articles on DEV Community by Mohamed Fayaz (@mohamedfayaz).</description>
    <link>https://dev.to/mohamedfayaz</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%2F403686%2F504b2790-413e-4685-984a-f59318b9898c.png</url>
      <title>DEV Community: Mohamed Fayaz</title>
      <link>https://dev.to/mohamedfayaz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohamedfayaz"/>
    <language>en</language>
    <item>
      <title>AWS CodeCommit and GitKraken Basics: The Essential Skills for Every Developer</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Thu, 06 Apr 2023 07:13:10 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-codecommit-and-gitkraken-basics-the-essential-skills-for-every-developer-4ki1</link>
      <guid>https://dev.to/aws-builders/aws-codecommit-and-gitkraken-basics-the-essential-skills-for-every-developer-4ki1</guid>
      <description>&lt;p&gt;Git is a source code management system that keeps track of the changes made to their codebase and collaborates with other team members. It is commonly used for source code management in software development, but it can track changes to any set of files.&lt;/p&gt;

&lt;p&gt;In a version control system, every time a file is modified, a new version is created and saved. This allows users to go back to previous versions of the file, and it also makes multiple engineers collaborate simultaneously without overwriting each other's changes.&lt;/p&gt;

&lt;p&gt;Git keeps track of changes to a repository, a central location where files are stored. When a user wants to change a file, they first create a copy of the file, make their changes to the copy, and then commit the changes, which saves the modified version of the file to the repository. Other users can then pull the updated version of the file from the repository and merge it into their copies.&lt;/p&gt;

&lt;p&gt;Git also includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Features for comparing different file versions.&lt;/li&gt;
&lt;li&gt;Resolving conflicts when multiple people have made changes to the same file.&lt;/li&gt;
&lt;li&gt;Tracking the history of changes to a file over time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is a powerful tool widely used in software development and other fields where version control is essential.&lt;/p&gt;

&lt;h2&gt;
  
  
  👷🏼‍♀️️Git Workflow
&lt;/h2&gt;

&lt;p&gt;The Git workflow is the series of steps people follow when using Git to manage a project. Here is a general outline of the Git workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create a repository: A repository is a central location where all the files for a project are stored. To create a repository, you can use the &lt;strong&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/strong&gt; command to initialize an empty repository on your local machine or create a repository on a remote server and clone it to your local machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a branch: you are creating a snapshot of your project at that point in time and diverging from the main development branch. You can then change your codebase on the new branch without affecting the "main" branch. This allows you to experiment and work on new features without worrying about breaking the main codebase. When you are ready, you can merge your changes back into the "main" branch to incorporate them into the codebase. You can create a new branch using the &lt;strong&gt;&lt;code&gt;git branch&lt;/code&gt;&lt;/strong&gt; command, and switch to a different branch using the &lt;strong&gt;&lt;code&gt;git checkout&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make changes: Once you have a repository set up, you can start changing the files in the repository. When you change a file, Git will recognize that the file has been modified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stage changes: Before you commit your changes, you need to stage them. This involves adding the modified files to a staging area, a list of changes that will be included in the next commit. You can stage changes by using the &lt;strong&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit changes: When you are ready to save your changes, you can commit them to the repository. A commit is a snapshot of the repository at a particular point in time, and it includes all the staged changes. You can commit your changes by using the &lt;strong&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Push changes: If you are working with a repository on a remote server, you will need to push your changes to the server for them to be shared with others. You can do this by using the &lt;strong&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pull changes: If other people have made changes to the repository and pushed them to the server, you can pull those changes to your local machine by using the &lt;strong&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/strong&gt; command. This will merge the changes into your local repository.&lt;br&gt;
There are many other Git commands available, and you can learn more about them in the Git documentation or by using the &lt;strong&gt;&lt;code&gt;git help&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ♛ Branching Strategy
&lt;/h2&gt;

&lt;p&gt;Git branching allows developers to work on multiple features or bug fixes simultaneously within a single Git repository. By using branches, developers can isolate their work from the main codebase and merge their changes back in when they are ready. There are several strategies for using branches in Git, including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;"Gitflow"&lt;/strong&gt; strategy, involves creating long-lived branches for development and releases, as well as short-lived branches for hotfixes and features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;"Feature Branch"&lt;/strong&gt; strategy, involves creating a new branch for each feature or bug fix and merging the branches back into the main codebase when the work is complete.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;"Trunk-Based Development"&lt;/strong&gt; strategy, involves working directly on the main codebase (also known as the "trunk") and using short-lived branches for quick bug fixes or experiments.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The best branching strategy will depend on the specific needs and workflow of your development team.&lt;/p&gt;

&lt;p&gt;If you prefer a graphical interface over using the command line, then &lt;strong&gt;GitKraken&lt;/strong&gt; is free and a useful tool. It has a user-friendly interface that allows you to perform all the Git operations via the interface and can save time for beginners.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚒️ GitKraken
&lt;/h2&gt;

&lt;p&gt;GitKraken is a popular Git client for developers that offers a user-friendly interface and a variety of features to make working with Git easier. It is available for Windows, Mac, and Linux and can be used with a wide range of Git hosting services, including GitHub, GitLab, and Bitbucket.&lt;/p&gt;

&lt;p&gt;One of the key features of GitKraken is its intuitive graphical user interface, which makes it easy to visualize and manage Git repositories. The interface includes a visual representation of the commit history, called the &lt;strong&gt;&lt;code&gt;commit graph&lt;/code&gt;&lt;/strong&gt;, which allows users to see the changes made to the repository over time easily. It also includes a "Git flow" feature, which helps users follow best practices when working with Git branches.&lt;/p&gt;

&lt;p&gt;In addition to its graphical interface, GitKraken also offers a range of advanced features for developers. It includes tools for code review, such as leaving inline comments on code changes. It supports a range of collaboration features, including the ability to assign tasks to team members. It also includes integration with popular tools like JIRA and Slack, making it easy to connect your Git workflow with other tools you use.&lt;/p&gt;

&lt;p&gt;Managing work in progress, pull requests, and branches for issues across multiple repositories can be challenging. That's why the release of &lt;a href="https://help.gitkraken.com/gitkraken-client/current/#version-9-0-0" rel="noopener noreferrer"&gt;GitKraken Client 9.0&lt;/a&gt; is so exciting. This major version release is expected to significantly improve the development workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's demonstrate how to use AWS CodeCommit as a version control system and GitKraken as the graphical user interface to manage your Git workflow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Install GitKraken: Download and install GitKraken on your local machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Set up an AWS account: If you don't have one, you'll need to create one if you choose to use AWS CodeCommit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; Connect GitKraken to your AWS CodeCommit Repository: Before we connect, we need to &lt;a href="https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html?icmpid=docs_acc_console_connect_np" rel="noopener noreferrer"&gt;generate credentials to clone the CodeCommit repo over HTTPS&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Go to AWS IAM &amp;gt; Users &amp;gt; Security Credentials &amp;gt; Generate Credentials.&lt;br&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%2Fzsefxv3ih5n3qrhqcmsq.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%2Fzsefxv3ih5n3qrhqcmsq.png" alt="Generate CodeCommit Credentials" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Create a CodeCommit repository: Log in to the AWS Management Console and navigate to the CodeCommit dashboard. Click the "Create repository" button and follow the prompts to create a new repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Clone the repository: In GitKraken, go to File &amp;gt; Clone Repo and enter the URL of your CodeCommit repository. This will create a local copy of the repository on your machine.&lt;/p&gt;&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%2Fo0mn091m9vax8eaieqt7.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%2Fo0mn091m9vax8eaieqt7.png" alt="Clone URL" width="800" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Enter the username and password generated in step 4.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Make changes and commit: Make any desired changes to the files in your local repository and use GitKraken to stage and commit the changes.&lt;/p&gt;&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%2Fl2ak1m9v74o7q912wfyf.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%2Fl2ak1m9v74o7q912wfyf.png" alt="Commit and Push" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Step 9:&lt;/strong&gt; Push changes to CodeCommit: Use GitKraken to push your local commits to the CodeCommit repository, which will make them available to other users.&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%2F1tk1s667bf0qjmvse4s0.gif" 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%2F1tk1s667bf0qjmvse4s0.gif" alt="Meme" width="640" height="594"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;A tool like GitKraken is very helpful if you are switching between various repos across different accounts. Also while GUI like GitKraken can be useful for users who are new to Git or who prefer a graphical interface, many experienced Git users prefer to use the command line interface (CLI) because it offers more control and flexibility.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;✍️ About the Author&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;Stay ahead of the curve with &lt;strong&gt;Mohamed Fayaz&lt;/strong&gt;, a visionary Data &amp;amp; AI consultant and insightful technical blogger. He provides expert commentary on vital topics such as Software Engineering, Big Data Analytics, Cybersecurity, and Cloud Engineering. Follow him on &lt;a href="https://www.linkedin.com/in/mohamedfayazz/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or &lt;a href="https://twitter.com/0xfayaz" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; for the latest updates.&lt;/p&gt;




</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Privacy-Preserving AI: What It Is and Why It Matters?</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Sat, 25 Mar 2023 09:18:36 +0000</pubDate>
      <link>https://dev.to/mohamedfayaz/privacy-preserving-ai-what-it-is-and-why-it-matters-e43</link>
      <guid>https://dev.to/mohamedfayaz/privacy-preserving-ai-what-it-is-and-why-it-matters-e43</guid>
      <description>&lt;p&gt;Let’s start with an example; suppose your employer uses an AI system to analyze employee data and make decisions about hiring and promotion. In that case, there’s a chance it could use your race or gender as one of its criteria features for making those decisions. If this happens without your knowledge or consent, especially if you don’t agree with how they’re being used, then there could be legal implications for both the company and the employees. This problem has been at least partially addressed by restricting access to certain types of sensitive information like faces and gender while still allowing access through other channels such as text search terms or GPS coordinates. However, these solutions still don’t fully solve all privacy concerns since there will always be ways around them.&lt;/p&gt;

&lt;p&gt;This problem has been at least partially addressed by restricting access to certain types of sensitive information like faces and gender while still allowing access through other channels such as text search terms or GPS coordinates, but these solutions still don’t fully solve all privacy concerns since there will always be ways around them; someone could not take pictures without including any faces at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It Matters
&lt;/h2&gt;

&lt;p&gt;Now imagine if Facebook had been able to use facial recognition software on all those photos uploaded over the years; they could easily build up an extensive database containing thousands upon thousands of faces without ever asking permission from any users. Likewise, a government agency or corporation could use an AI system like this one at airports or checkpoints without asking permission from anyone who might pass through those checkpoints or considering how many times we’ve seen companies like Facebook ask us for access so that “our friends” can see what we’re doing (and vice versa). This is particularly concerning because many applications where users can share their data with friends and family members. In these cases, sharing personal information may be voluntary but still allow outsiders access due to default privacy settings in most apps that makes sensitive data available publicly by default or require affirmative action from users before making any changes (such as turning off location services).&lt;/p&gt;

&lt;h2&gt;
  
  
  What Can Be Done?
&lt;/h2&gt;

&lt;p&gt;AI solutions should be designed in such a way that they can learn without being able to identify individuals by name or other direct identifiers. This is important because it ensures that your data remains anonymous and private while allowing the machine-learning algorithm to make accurate predictions. An example of this kind of AI system is one that predicts whether someone will be diagnosed with a specific disease in the future based on their genome sequence data. In this case, before making any predictions about an individual’s likelihood of developing cancer or Alzheimer’s disease based on their genetic makeup, all personal information should be removed from the dataset (e.g., names, religion, nationality, and so on). This allows researchers to study trends across large populations without compromising anyone’s privacy. These types of systems are called “de-identified,” meaning any information about the individuals in the dataset is removed before it is used. It is a privacy protection measure that allows researchers and other individuals with access to de-identified datasets to analyze the information without compromising the privacy of those represented within it. Now, de-identifying is not the same as anonymizing data: anonymized datasets may still contain indirect identifiers like zip codes, birthdates, or phone numbers, which could be used to identify individuals if they were linked together with other sources (such as census records). For example, your 10-digit mobile number may be changed with a different set of digits, but this would still be the same across the dataset.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approaches for Making AI More Private and Secure
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Differential Privacy
&lt;/h3&gt;

&lt;p&gt;Differential privacy is a widely used technique for privacy-preserving ML. The goal of differential privacy is to protect the privacy of individual data points in a dataset by adding noise to the data. The noise is added to ensure that the ML model’s output is not affected significantly. It involves adding a carefully calibrated amount of noise to the data, making it difficult to identify an individual’s data. The amount of noise added to the data is determined by a parameter called epsilon. The higher the epsilon value, the more noise is added to the data and the greater the privacy protection. However, as the number of noise increases, the accuracy of the ML model decreases. Therefore, finding an optimal value for epsilon is crucial to achieving a balance between privacy and accuracy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Federated Learning
&lt;/h3&gt;

&lt;p&gt;Various applications have used Federated learning, including natural language processing, image classification, and recommendation systems. In addition, federated learning can be used in situations where data privacy is crucial and can also be used in situations where data is not easily transferable to a central location. For example, it can be used for training ML models on mobile devices, where users may not want to share their data with a central server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Homomorphic Encryption
&lt;/h3&gt;

&lt;p&gt;Homomorphic encryption allows the system to perform operations on the encrypted data without decrypting it. This technique can be used to train ML models on encrypted data, ensuring that the data remains private. Homomorphic encryption can be applied to various ML models, including linear regression, decision trees, and neural networks. Encryption involves using mathematical operations on encrypted data without decrypting it. This technique is particularly useful when working with sensitive data that cannot be shared, such as medical records or financial data. However, homomorphic encryption is computationally expensive, which makes it less practical for some applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Libraries to Build Privacy-Preserving Models
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/tensorflow/privacy"&gt;Differential privacy in Tensorflow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/OpenMined/PySyft"&gt;Federated Learning in PyTorch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/mpc-msri/EzPC"&gt;MPC in Tensorflow&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Privacy is becoming an increasingly important concern in the field of AI. Fortunately, there are several techniques available for developing privacy-preserving models. Differential privacy, federated learning, and homomorphic encryption are just a few examples of these techniques. With the right approach, we can continue to make progress in the field of machine learning while also addressing privacy concerns.&lt;/p&gt;

&lt;p&gt;I hope this article gives you a better understanding of why it is essential to have privacy-preserving systems and how best we can protect individual privacy while developing a more robust and advanced Artificial Intelligence system.&lt;/p&gt;




&lt;p&gt;✍️ Want to Connect?&lt;/p&gt;

&lt;p&gt;Mohamed Fayaz is a Data &amp;amp; AI Consultant and a technical blogger who writes and speaks about the topics such as Software Engineering, Big Data Analytics, and Cloud Engineering. Connect with him on LinkedIn or follow him on Twitter for updates.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ethicalai</category>
      <category>ai</category>
    </item>
    <item>
      <title>Why Data Competency Is Critical for Cyber Intelligence</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Mon, 20 Feb 2023 01:45:09 +0000</pubDate>
      <link>https://dev.to/mohamedfayaz/why-data-competency-is-critical-for-cyber-intelligence-1jch</link>
      <guid>https://dev.to/mohamedfayaz/why-data-competency-is-critical-for-cyber-intelligence-1jch</guid>
      <description>&lt;p&gt;It's no secret that data engineering skills are a must for cyber intelligence pros. But what exactly is data engineering? It's the ability to understand the meaning behind complex algorithms, and the discipline of applying those algorithms to make sense of large amounts of data. Data engineers are also adept at building systems that process and store information in ways that allow people to understand it—and even use it to predict future events.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Hackers to Cyber Intelligence
&lt;/h2&gt;

&lt;p&gt;Data engineering is a skill that's used to collect and analyze data. It can be used to understand the quality of the data, as well as make predictions about it. This makes it an important skill for cyber intelligence professionals because they must ensure that their systems collect good quality information to make accurate predictions.&lt;/p&gt;

&lt;p&gt;Data science is a large field with many different sub-specialties within it—and data engineering is one such specialty. Its focus on understanding how systems work means that these professionals have an affinity for building things from scratch; this includes programming languages like Python or R rather than just using pre-existing software packages available via third-party vendors (such as Google Analytics).&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Engineering for Understanding
&lt;/h2&gt;

&lt;p&gt;To begin any analysis, it's crucial to comprehend the initial data. Data engineers play a vital role in extracting valuable insights from raw data and converting it into informative data. This process includes discovering patterns, trends, and connections within data sets that aid cyber intelligence experts in making educated decisions about their field of focus. &lt;/p&gt;

&lt;p&gt;Data engineering skills are also needed when working with big datasets (such as social media or web usage). These types of data sets have many variables that need to be analyzed individually; however, they often have similar properties across different groups within those groups. To understand what these properties mean and how they relate together, you need someone who understands how each variable behaves individually—and then aggregates their results onto larger scales (e.g., country-wide).&lt;/p&gt;

&lt;h2&gt;
  
  
  A Pipeline for Cyber Intelligence
&lt;/h2&gt;

&lt;p&gt;Data engineering is a necessary skill for cyber intelligence. It's the process of building a pipeline to collect data and then analyze it. A pipeline consists of data sources, a data store, and an analysis tool. This can be done in several steps:&lt;/p&gt;

&lt;p&gt;First, you'll need to define your queries or use pre-built tools that help you find specific information from your source (e.g., search history). Then draw connections between different pieces of information using indexes or keywords; these connections are called joins in databases because they join together multiple rows into one result set (the "join" part comes from joining data sets). You may also want to export this data so that it can be used elsewhere without having access directly through its original source—this is called ETL (extraction transformation load) or ETL/ELT (extraction transformation load/export). Finally, visualize graphs representing all results and any additional analyses performed on them - this process is called BI (business intelligence).&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of Cyber Threats
&lt;/h2&gt;

&lt;p&gt;The future of cyber threats is a digital arms race. It will be a battle for data, for the cloud and for AI.&lt;/p&gt;

&lt;p&gt;In this digital warfare, intelligence agencies have been forced to act quickly in order to stay ahead of their adversaries' capabilities. They need to understand how these technologies work so that they can intercept communications or take over control systems before it's too late—and they need more data scientists who are trained in machine learning techniques like deep learning (DL), which uses neural networks as part of its predictive analytics process. This means that even if you're not a coder yourself (or don't know what one looks like), you could still benefit from taking classes on DL theory at your local community college or university program.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data engineering skills are vital for cyber intelligence pros.
&lt;/h2&gt;

&lt;p&gt;Data engineering skills are vital for cyber intelligence pros. They're needed to analyze data and make it more useful, as well as to create insights from large sets of information.&lt;/p&gt;

&lt;p&gt;Data engineers work on projects that require them to pull together large sets of structured or unstructured data into a cohesive whole. They often use the tools available in their field: SQL databases, text analysis software like Natural Language Toolkit (NLTK), statistical packages with R and Python, but also visualizations such as Tableau or D3js.&lt;/p&gt;

&lt;p&gt;Data engineering is a complex skill set that can be mastered by anyone with the right mindset and training. It’s an essential skill for cyber intelligence pros, who need to understand how the systems they work with work, as well as how they are used. Data engineers have a crucial role to play in protecting organizations from cyber threats and ensuring that their data is safe from hackers or other malicious actors. With all of these skills under your belt, you’ll be able to make smart decisions when it comes time for action.&lt;/p&gt;

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

&lt;p&gt;In conclusion, implementing standards such as the Open Cybersecurity Schema Framework (OSCF) enables data engineers to standardize data collection and mapping, leading to a streamlined process for security teams. This results in a common language for data analysis and threat detection, facilitating collaboration between data scientists, analysts, and security teams. The ultimate aim of any framework is to serve as a widely accepted open standard that complements existing security practices and processes.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;✍️ About the Author&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Mohamed Fayaz&lt;/strong&gt; is a Data &amp;amp; AI Consultant, and a technical blogger who writes and speaks about the topics such as &lt;strong&gt;Software Engineering&lt;/strong&gt;, &lt;strong&gt;Big Data Analytics&lt;/strong&gt;, and &lt;strong&gt;Cloud Engineering&lt;/strong&gt;. Connect with him on &lt;a href="https://www.linkedin.com/in/mohamedfayazz/"&gt;LinkedIn&lt;/a&gt; or follow him on &lt;a href="https://twitter.com/0xfayaz"&gt;Twitter&lt;/a&gt; for updates.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>cybersecurity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Introduction to AWS AppSync - Fully managed GraphQL Service</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Thu, 02 Feb 2023 02:44:54 +0000</pubDate>
      <link>https://dev.to/aws-builders/introduction-to-aws-appsync-fully-managed-graphql-service-4mff</link>
      <guid>https://dev.to/aws-builders/introduction-to-aws-appsync-fully-managed-graphql-service-4mff</guid>
      <description>&lt;p&gt;Build, deploy, and manage mobile and web apps that need real-time or offline data are simple with AWS AppSync, a fully managed serverless GraphQL service. Your apps may securely access and work with data stored in AWS services like Amazon DynamoDB, Amazon Elasticsearch Service, and AWS Lambda by building GraphQL APIs using AppSync.&lt;/p&gt;

&lt;p&gt;One of the key benefits of using AppSync is that it allows you to build scalable, responsive applications without the need to manage complex server infrastructure. AppSync handles all of the underlying network and security protocols for you, allowing you to focus on building great user experiences.&lt;/p&gt;

&lt;p&gt;In addition to providing real-time and offline data access, AppSync also offers a number of other features that make it a powerful tool for building modern applications. These features include:&lt;/p&gt;

&lt;p&gt;⦿ GraphQL Transform: This is a tool that helps you build GraphQL APIs quickly and easily by providing a set of pre-built, customizable GraphQL resolvers.&lt;/p&gt;

&lt;p&gt;⦿ Subscriptions: AppSync allows you to create real-time subscriptions that allow your clients to receive updates in real-time when certain events occur, such as when data is updated or deleted.&lt;/p&gt;

&lt;p&gt;⦿ Data manipulation: AppSync provides a number of powerful data manipulation capabilities, including the ability to create, update, and delete data, as well as the ability to perform complex queries and mutations on data.&lt;/p&gt;

&lt;p&gt;⦿ Security: AppSync integrates with AWS Identity and Access Management (IAM), AWS Cognito, and API Keys to provide fine-grained access controls and protect your data from unauthorized access.&lt;/p&gt;

&lt;p&gt;Some other key security features of AWS AppSync include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Data encryption: All data is encrypted in transit and at rest using industry-standard encryption algorithms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Identity and access management (IAM): You can use IAM to control access to your AWS AppSync resources and data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VPC Endpoints: You can use VPC Endpoints to securely access your AppSync APIs from within your Amazon VPC, without exposing your APIs to the public internet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Resource-level permissions: You can use resource-level permissions to control access to specific GraphQL operations and fields.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon Cognito authentication: You can use Amazon Cognito to authenticate users and authorize access to your AppSync APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OAuth 2.0 support: You can use OAuth 2.0 to authenticate users and authorize access to your AppSync APIs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Identity federation: You can use identity federation to authenticate users with third-party identity providers, such as Google or Facebook.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1️⃣️ Schema
&lt;/h2&gt;

&lt;p&gt;In AppSync, the schema defines the shape of your data and the operations that can be performed on it. The schema is written in GraphQL, which is a language for querying and mutating data. The schema consists of types, fields, and relationships between those types.&lt;/p&gt;

&lt;h2&gt;
  
  
  2️⃣ Resolvers
&lt;/h2&gt;

&lt;p&gt;Resolvers are functions that resolve a GraphQL query to a specific data source. When a client issues a query to the GraphQL API, the query is forwarded to the appropriate resolver for handling. The resolver retrieves the requested data from the data source and returns it to the client.&lt;/p&gt;

&lt;h2&gt;
  
  
  3️⃣️ Mutations
&lt;/h2&gt;

&lt;p&gt;AppSync also allows you to define mutations, which are operations that modify data. Mutations work similarly to queries, but they require a resolver to handle the data modification and return the updated data to the client.&lt;/p&gt;

&lt;p&gt;The schema defines the structure of the data and the operations that can be performed on it, while the resolvers handle the actual retrieval and modification of data from the data sources.&lt;/p&gt;

&lt;p&gt;For example, consider a schema that has a type called "Post" and fields called "title" and "content". To retrieve the data for a specific Post, you might define a resolver that queries a DynamoDB table for the Post with a specific ID. The resolver would return the Post's title and content to the client as a response to the query. Mutations helps to make any update to the title or post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fjljgmzn6c2d8zmvgyv6k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fjljgmzn6c2d8zmvgyv6k.gif" alt="AWS Meme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🎥 Demo
&lt;/h2&gt;

&lt;p&gt;First, let’s create a GraphQL endpoint to retrieve the title and content from post DynamoDB. &lt;/p&gt;

&lt;p&gt;Step 1: Login to the console and go to AppSync&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fln1wgj5br5dglw6n9cks.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fln1wgj5br5dglw6n9cks.png" alt="AWS AppSync Console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Choose Create with wizard and Create a model. The &lt;code&gt;model&lt;/code&gt; should contains the list of fields you want to store and retrieve from DynamoDB Table. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fd61xdyp3vijiylzoc9vp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fd61xdyp3vijiylzoc9vp.png" alt="AppSync Creation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: Click &lt;strong&gt;Create&lt;/strong&gt;, and on the next screen name your API "&lt;strong&gt;My AppSync App API&lt;/strong&gt;". Click &lt;strong&gt;Create&lt;/strong&gt;. &lt;br&gt;
The AppSync console will deploy your DynamoDB table and create your AppSync schema. The schema includes autogenerated queries, mutations, and subscriptions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Ff6xuxxzxoh3n1hv52fou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ff6xuxxzxoh3n1hv52fou.png" alt="create AppSync"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 4: On the left, you can see the list of tabs such as &lt;strong&gt;Schema, Data Sources, Functions, Queries, Caching, Setting and Monitoring.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fabxa44qaam3kkm24motr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fabxa44qaam3kkm24motr.jpeg" alt="AppSync Tabs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Schema: The schema defines the types, fields, and operations (queries, mutations, and subscriptions) that clients can execute on the API. The schema is written in the GraphQL schema definition language (SDL) and is used to validate client requests and generate a client-side code generation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Sources&lt;/strong&gt;: AppSync allows you to connect to various data sources, such as DynamoDB tables, Lambda functions, and Elasticsearch domains, to retrieve and manipulate data in your API. You can also use AppSync's built-in data sources for authentication and authorization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt;: AppSync allows you to write custom Lambda functions to perform additional logic or data manipulation before or after data is retrieved from a data source. These functions can be triggered by specific events, such as a client query or mutation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Queries&lt;/strong&gt;: Clients can use the GraphQL query operation to retrieve data from the API. AppSync automatically maps the client query to the appropriate data source and resolves any fields in the query that are defined in the schema.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Caching&lt;/strong&gt;: AppSync allows you to enable caching for specific queries to improve the performance of your API. Cached data is stored in an in-memory cache and is automatically invalidated when the data in the data source is updated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Setting and Monitoring&lt;/strong&gt;: AppSync provides a variety of settings and monitoring options that allows you to customize the behavior of your API and monitor its usage. You can set up logging and tracing for debugging and troubleshooting, configure caching and connection pooling, and use CloudWatch for monitoring metrics and log streams.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s go to schema and look for the schema, resolvers and query to be able to fetch the title and content from the DynamoDB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;MyModelType&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ID!&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;title:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;content:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;String&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;getMyModelType(id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ID!):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;MyModelType&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the right, you can see the Resolvers are set to the Dynamo table. &lt;/p&gt;

&lt;p&gt;Now to query the table by Id, we can go to the &lt;code&gt;queries&lt;/code&gt; tab and run this below snippet to fetch the information&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;query&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;DemoQuery&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;getMyModelType(id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"123"&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;id&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;content&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;title&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.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%2F5ujvfjg5fpv48m9sxuzs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F5ujvfjg5fpv48m9sxuzs.png" alt="AppSync Query"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The endpoint uses the API Key to authenticate the requests. With this API Key and the URL we can also use the Postman to try running the query. &lt;/p&gt;

&lt;h3&gt;
  
  
  Go to Settings tab to get the credentials
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fou706lgs7utdo5a8v013.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fou706lgs7utdo5a8v013.png" alt="AppSync Creds"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Now in the Postman..
&lt;/h2&gt;

&lt;p&gt;Enter the copied URL and API key, and the query in the Body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fp6ls7rrwysxvbm34tqcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fp6ls7rrwysxvbm34tqcd.png" alt="GraphQL Postman Auth"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fb8otd8mrektich4q8mk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fb8otd8mrektich4q8mk0.png" alt="GraphQL Postman Query"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now in this demo, we have seen how GraphQL fetches the data from DynamoDB. Similarly you can have a different Resolver such as Lambda Function to handle the request. &lt;/p&gt;

&lt;h2&gt;
  
  
  Securing your AppSync Endpoint..
&lt;/h2&gt;

&lt;p&gt;AWS Web Application Firewall (WAF) is a web security service that helps protect web applications from common web exploits that could affect availability, compromise security, or consume excessive resources.&lt;/p&gt;

&lt;p&gt;To secure an AppSync endpoint with WAF, you can create a WAF rule and associate it with the AppSync endpoint. The rule can be configured to block or allow traffic based on certain criteria, such as IP address or request headers. This can help protect against common web attacks such as SQL injection, cross-site scripting, and others. Additionally, you can also use WAF to rate-limit requests to the AppSync endpoint to prevent denial-of-service attacks.&lt;/p&gt;

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

&lt;p&gt;AWS AppSync is a powerful tool that makes it easy to build, deploy, and manage real-time and offline applications that require data access and manipulation. It supports various use cases from Data Ingestion to pub/sub services.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;✍️ About the Author&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Mohamed Fayaz&lt;/strong&gt; is a Data &amp;amp; AI Consultant, and a technical blogger who writes and speaks about the topics such as &lt;strong&gt;Software Engineering&lt;/strong&gt;, &lt;strong&gt;Big Data Analytics&lt;/strong&gt;, and &lt;strong&gt;Cloud Engineering&lt;/strong&gt;. Connect with him on &lt;a href="https://www.linkedin.com/in/mohamedfayazz/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or follow him on &lt;a href="https://twitter.com/0xfayaz" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; for updates.&lt;/p&gt;




</description>
      <category>aws</category>
      <category>graphql</category>
      <category>datascience</category>
      <category>python</category>
    </item>
    <item>
      <title>Data &amp; Analytics Services at AWS re:Invent 2022: A Recap</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Tue, 03 Jan 2023 10:16:52 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-reinvent-2022-recap-data-analytics-services-51em</link>
      <guid>https://dev.to/aws-builders/aws-reinvent-2022-recap-data-analytics-services-51em</guid>
      <description>&lt;p&gt;&lt;strong&gt;AWS re:Invent&lt;/strong&gt; is a learning conference hosted for the global cloud computing community with in-person and virtual content where they announced many new features and updates. &lt;/p&gt;

&lt;p&gt;This post is the summary of the list of changes within the Data &amp;amp; Analytics services&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS DataZone
&lt;/h3&gt;

&lt;p&gt;Amazon DataZone is a tool that helps organizations catalog and share data across the company. It allows data producers (such as data engineers and data scientists) to share data securely and with the right context, and allows data consumers (such as analysts) to find answers to business questions and share them with others in the organization.&lt;/p&gt;

&lt;p&gt;DataZone is intended to provide an easy way to organize and discover data across the organization. It allows users to share, search, and discover data at scale across organizational boundaries through a unified data analytics portal that provides a personalized view of all the data while enforcing governance and compliance policies. &lt;/p&gt;

&lt;p&gt;The tool creates a usage flywheel, where data producers share data securely and with the right context with others in the organization, and data consumers find answers to business questions and share them with others in the organization. This helps improve operational efficiency and enables business and data teams to work with data faster and make informed decisions based on the data. DataZone also aims to remove the burden of governing data and making it accessible to everyone in the organization, giving organizations a competitive edge by turning data into an organizational asset.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Clean Room
&lt;/h2&gt;

&lt;p&gt;AWS Clean Rooms is a solution that enables companies to collaborate on shared data sets while still protecting the underlying raw data. This is particularly useful for companies in industries such as financial services, healthcare, and advertising that need to collaborate with partners while also improving data security and protecting underlying data. The traditional methods for leveraging data in collaboration with partners, such as providing copies of data and relying on contractual agreements, can be at odds with protecting data. &lt;/p&gt;

&lt;p&gt;AWS Clean Rooms allows customers to create a secure data clean room in minutes and collaborate with other companies on the AWS Cloud to generate insights about advertising campaigns, investment decisions, and research and development without having to share or reveal raw data. &lt;/p&gt;

&lt;p&gt;Some features and benefits of AWS Clean Rooms include the ability to create a clean room and start collaborating in a few clicks, the ability to collaborate with hundreds of thousands of companies on AWS without sharing or revealing underlying data, the use of privacy-enhancing controls to protect underlying data, and the ability to use easy-to-configure analysis rules to tailor queries to specific business needs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AWS Clean Rooms will be available in early 2023 in US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Seoul), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Europe (Frankfurt), Europe (Ireland), Europe (London), and Europe (Stockholm).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  AWS OpenSearch (Serverless)
&lt;/h2&gt;

&lt;p&gt;Amazon OpenSearch Serverless is a new option offered by Amazon OpenSearch Service that simplifies the process of running search and analytics workloads at a large scale without the need to configure, manage, or scale OpenSearch clusters. It automatically provisions and scales the necessary resources to deliver fast data ingestion and query responses for even the most demanding workloads, and users only pay for the resources that are consumed. &lt;/p&gt;

&lt;p&gt;OpenSearch Serverless decouples compute and storage and separates the indexing (ingestion) components from the search (query) components, using Amazon Simple Storage Service (S3) as the primary data storage for indexes. This allows the search and indexing functions to scale independently of each other and of the indexed data in S3. With OpenSearch Serverless, developers can create new collections, which are logical groupings of indexed data that work together to support a workload. &lt;/p&gt;

&lt;p&gt;It also supports the same ingest and query APIs as OpenSearch, making it easy to get started with existing clients and applications, and it can be used to build data visualizations with serverless OpenSearch Dashboards.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Glue Updates
&lt;/h2&gt;

&lt;p&gt;⦿ &lt;strong&gt;AWS Glue 4.0&lt;/strong&gt; – Access to the latest Spark and Python releases so builders can develop, run, and scale their data integration workloads and get insights faster.&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;AWS Glue Data Quality&lt;/strong&gt; - Automatic data quality rule recommendations based on your data&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;AWS Glue for Ray&lt;/strong&gt; - Data integration with Ray (&lt;a href="http://ray.io/" rel="noopener noreferrer"&gt;ray.io&lt;/a&gt;), a popular new open-source compute framework that helps you scale Python workloads&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;AWS Glue for Apache Spark&lt;/strong&gt; - Supports three open source data lake storage frameworks: Apache Hudi, Apache Iceberg, and Linux Foundation Delta Lake.&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;AWS Glue Custom Visual Transform&lt;/strong&gt; - Create and share your own ETL logic, input rules, etc. on Studio. Available on the Transform tab of Glue Studio. Master administrators in Glue Studio can improve efficiency for other workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Redshift Updates
&lt;/h2&gt;

&lt;p&gt;⦿ &lt;strong&gt;Apache Spark Integration&lt;/strong&gt; - Author Apache Spark applications using Java, Python, Scala, with access to rich, curated data in your data warehouse&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Streaming Ingestion Support&lt;/strong&gt; - Kinesis Data Streams (KDS) and Managed Streaming for Apache Kafka (MSK) without staging in S3&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Dynamic Data Masking&lt;/strong&gt; - Easily protect sensitive data by managing data masking policies through an SQL interface&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Auto-Copy From Amazon S3&lt;/strong&gt; - Simple, low code data ingestion&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;New Query sets&lt;/strong&gt; – MERGE,ROLLUP,CUBE,GROUPING SETS&lt;/p&gt;

&lt;p&gt;⦿ Supporting &lt;strong&gt;large JSON object&lt;/strong&gt; – Up to 16MB (from 1MB)&lt;/p&gt;

&lt;p&gt;⦿ Multi-AZ deployment&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS QuickSight Updates
&lt;/h2&gt;

&lt;p&gt;The new Amazon QuickSight feature that expands API capabilities allows customers to programmatically manage their QuickSight assets (analyses and dashboards) in their DevOps pipeline. Developers can now version control, back-up and deploy assets programmatically, thereby promoting faster changes that enable innovation in a competitive market place. This feature also accelerates migration from legacy BI tools to the cloud, supported by our migration partners.&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Paginated Reports&lt;/strong&gt; - Create, schedule, and share highly formatted multipage reports&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Q Automated Data Prep&lt;/strong&gt; - AI-enhanced automated data preparation, making it fast and straightforward to augment existing dashboards for natural language questions&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;QuickSight API&lt;/strong&gt; - Access underlying data models of Amazon QuickSight dashboards, reports, analyses and templates via the AWS Software Development Kit (SDK&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;2 new questions types&lt;/strong&gt; – “forecast” and “why”. “forecast” created dynamic forecast dashboard, and “why” determines its data driver which related a specific data change&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Athena for Spark
&lt;/h2&gt;

&lt;p&gt;Amazon Athena for Apache Spark is a new feature that allows organizations to perform complex data analysis using Apache Spark without the need to configure and manage separate infrastructure. It allows users to build distributed applications using expressive languages like Python, and it offers a simplified notebook experience in the Athena console or through Athena APIs. &lt;/p&gt;

&lt;p&gt;Athena is deeply integrated with other AWS services, making it easy to query data from various sources, chain multiple calculations together, and visualize the results of analyses. The feature enables interactive Spark applications to start in under a second and run faster with an optimized Spark runtime, saving users time and allowing them to focus on insights rather than waiting for results. With Amazon Athena for Apache Spark, there are no servers to manage and no minimum fee or setup cost; users only pay for the queries they run.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Aurora zero-ETL Feature
&lt;/h2&gt;

&lt;p&gt;Amazon Aurora now supports zero-ETL integration with Amazon Redshift, allowing users to perform near real-time analytics and machine learning using Redshift on large amounts of transactional data from Aurora. &lt;br&gt;
With this integration, data is available in Redshift within seconds of being written into Aurora, eliminating the need to build and maintain complex data pipelines for ETL operations.&lt;/p&gt;

&lt;p&gt;The zero-ETL integration also enables users to analyze data from multiple Aurora database clusters in the same Amazon Redshift instance, providing a holistic view of data across multiple applications or partitions. &lt;br&gt;
This allows users to leverage Redshift's analytics and capabilities, such as built-in machine learning, materialized views, data sharing, and federated access to multiple data stores and data lakes, to derive insights from transactional and other data in near real-time.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS LakeFormation Data Sharing Access Control
&lt;/h2&gt;

&lt;p&gt;AWS Lake Formation is a fully managed service that makes it easy to build, secure, and manage a data lake. A data lake is a central repository that allows you to store all your structured and unstructured data at any scale. You can then use the data lake to build a centralized data repository, which can be used for a variety of tasks such as analytics, data warehousing, machine learning, and more.&lt;/p&gt;

&lt;p&gt;The new feature makes it easier for customers to designate the right level of access to various users without having to run complex queries or manually identify who has access to specific data shares. It also improves the security of data by enabling administrators to provide granular, row-level and column-level access to data shares within Lake Formation. This is particularly useful for customers who want to share and work with consistent data across regions and accounts, but want to enforce granular access to different users.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS DocumentDB Elastic Cluster
&lt;/h2&gt;

&lt;p&gt;AWS DocumentDB with MongoDB compatibility offers flexible scaling to store petabytes of data and handle millions of read/write requests per second. The infrastructure is managed by AWS, so there is no need for instance creation or scaling operations. &lt;br&gt;
It also provides high availability across 3 availability zones (AZs) with data replicated to 6 locations across 3 AZs for high durability.&lt;/p&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%2Fma485ocwy6mj6te74qub.jpeg" 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%2Fma485ocwy6mj6te74qub.jpeg" alt="AWS Recap by Mohamed Fayaz" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;✍️ About the Author&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Mohamed Fayaz&lt;/strong&gt; is a Data &amp;amp; AI Consultant, and a technical blogger who writes and speaks about the topics such as &lt;strong&gt;Software Engineering&lt;/strong&gt;, &lt;strong&gt;Big Data Analytics&lt;/strong&gt;, and &lt;strong&gt;Cloud Engineering&lt;/strong&gt;. Connect with him on &lt;a href="https://www.linkedin.com/in/mohamedfayazz/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or follow him on &lt;a href="https://twitter.com/0xfayaz" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; for updates.&lt;/p&gt;




</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Effortlessly Manage Your AWS Applications with Just a Few Messages</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Wed, 21 Dec 2022 10:38:09 +0000</pubDate>
      <link>https://dev.to/aws-builders/control-your-aws-apps-with-a-simple-message-1595</link>
      <guid>https://dev.to/aws-builders/control-your-aws-apps-with-a-simple-message-1595</guid>
      <description>&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%2Fubbueo4mdsd1gd6q8i4t.gif" 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%2Fubbueo4mdsd1gd6q8i4t.gif" alt="AWS Slack Operations" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Several tools in the market that enable the engineering teams to easily roll out the application changes in various environments from a simple config to major code changes. But it often requires some level of technical understanding to make those updates.&lt;/p&gt;

&lt;p&gt;Imagine empowering the non-technical business individuals to make those updates themselves by sending a message in a simple language (not in Python language tho 😂) which would save a lot of time on both ends.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🤨 How to make this happen?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It is possible with the combination of a few tools and by developing the solutions in such a way that it can accept parameters to control the features and behaviours.&lt;/p&gt;

&lt;p&gt;In this post, we will take a look at how it can be done using &lt;strong&gt;Slack&lt;/strong&gt; as our messaging platform, and &lt;strong&gt;AWS AppConfig&lt;/strong&gt; to host and manage the configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 ChatOps
&lt;/h2&gt;

&lt;p&gt;ChatOps is a term used to describe the use of chat platforms, such as &lt;strong&gt;Slack&lt;/strong&gt; or &lt;strong&gt;Microsoft Teams&lt;/strong&gt;, for communicating about and automating tasks related to software development, infrastructure, and operations. The goal of ChatOps is to allow team members to collaborate and work more efficiently by providing a central location for communication, task execution, and status updates.&lt;/p&gt;

&lt;p&gt;In ChatOps, team members can use chat commands to trigger automated tasks and processes, as well as view the status and output of those tasks in the chat platform. This allows team members to communicate and collaborate in real-time, without having to switch between multiple tools or applications.&lt;/p&gt;

&lt;p&gt;For example, a team member could use a chat command to deploy code to a production environment, view the status of a continuous integration (CI) pipeline, or get the latest logs from a server. This can help teams to streamline their workflow and reduce the time and effort required to complete tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ AppConfig
&lt;/h2&gt;

&lt;p&gt;AWS AppConfig is a fully managed service that enables developers to quickly and easily roll out new features and updates to their applications. It allows you to create and manage application configurations, and deploy those configurations to specific environments or groups of users.&lt;/p&gt;

&lt;p&gt;One of the main benefits of using AppConfig is that it helps you to deploy new features and updates to your applications more quickly and safely. With AppConfig, you can create and test new configurations in a staging environment before rolling them out to your production environment. This helps to reduce the risk of downtime or other issues that can arise when deploying updates to your application.&lt;/p&gt;

&lt;p&gt;AppConfig also makes it easy to manage and track the deployment of your configurations. It provides many tools for monitoring the status of your deployments, including real-time alerts and detailed metrics. This allows you to quickly identify and resolve any issues that may arise during the deployment process.&lt;/p&gt;

&lt;p&gt;In addition to its deployment capabilities, AppConfig also offers several other features that make it a powerful tool for managing application configurations. These features include:&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Validation&lt;/strong&gt;: AppConfig allows you to validate the configuration such as verifying the datatype and the formats.&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Versioning&lt;/strong&gt;: AppConfig provides built-in versioning capabilities, allowing you to track changes to your configurations and roll back to previous versions if needed.&lt;/p&gt;

&lt;p&gt;⦿ &lt;strong&gt;Integration with other AWS services&lt;/strong&gt;: AppConfig integrates with most of the AWS services, including Amazon CloudWatch and AWS CloudFormation, making it easier to manage and deploy your configurations.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Let's dive into the design&lt;/strong&gt;
&lt;/h2&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%2Fzasqc70fuc4z76zeiqve.jpg" 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%2Fzasqc70fuc4z76zeiqve.jpg" alt="AWS Slack Integration" width="691" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on the diagram above, the user sends a message in the Slack channel such as&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/app-update {"background-colour": "black"}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/app-update deploy-to-prod&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/edh-generate-report today&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;any message which starts with &lt;code&gt;/&lt;/code&gt; can invoke a call to the endpoint in Slack, so in this case, we are calling AWS Lambda Function URL to process the message. It can update the configurations in AppConfig, to trigger the pipeline for production deployment or any workflow. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🎥 Demo&lt;/strong&gt;
&lt;/h2&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%2F3pbuyjgcnw765pt9eij8.gif" 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%2F3pbuyjgcnw765pt9eij8.gif" alt="AWS AppConfig and Slack Demo" width="600" height="364"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;👍 Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In this demo, we invoked a call to the AWS Lambda Function URL with a payload and it returned the response to us as a message. &lt;/p&gt;

&lt;p&gt;AppConfig helps to streamline the process of updating your applications and ensures that you can deliver new features and functionality to your users in a timely and reliable manner.&lt;/p&gt;

&lt;p&gt;One of the alternatives to this is to build a web-based portal to manage these configurations to be edited by the individuals. Then the question arises whether we need an individual portal for each of those applications, managing user access controls, deployments and so on. Hence investing in a tool like AppConfig and creating a culture will help the organization to stay effective and efficient.&lt;/p&gt;


&lt;br&gt;

&lt;h2&gt;
  
  
  
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;✍️ About the Author&lt;/strong&gt;:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Mohamed Fayaz&lt;/strong&gt; is a Data &amp;amp; AI Consultant, and a technical blogger who writes and speaks about the topics such as &lt;strong&gt;Software Engineering&lt;/strong&gt;, &lt;strong&gt;Big Data Analytics&lt;/strong&gt;, and &lt;strong&gt;Cloud Engineering&lt;/strong&gt;. Connect with him on &lt;a href="https://www.linkedin.com/in/mohamedfayazz/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; or follow him on &lt;a href="https://twitter.com/0xfayaz" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; for updates.&lt;/p&gt;




</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>👨‍💻 DynamoDB for every developer</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Mon, 20 Dec 2021 09:21:20 +0000</pubDate>
      <link>https://dev.to/aws-builders/dynamodb-for-every-developers-3n6n</link>
      <guid>https://dev.to/aws-builders/dynamodb-for-every-developers-3n6n</guid>
      <description>&lt;h4&gt;
  
  
  Understanding the databases is important for every developer, and the arising cloud services bring the best in class tools and technologies for every developer to build applications in hours.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Database is a critical component for any application. NoSQL database has become a widely popular choice for various solutions from web to machine learning applications.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Let's understand one of the most popular cloud database services called DynamoDB.
&lt;/h4&gt;

&lt;h2&gt;
  
  
  ❓What is DynamoDB?
&lt;/h2&gt;

&lt;p&gt;DynamoDB is a fully managed NoSQL database from Amazon Web Services (AWS). It is a document database which means the data is stored in key/value pairs. The  DynamoDB stores the data across 3 different availability zones in a region. &lt;/p&gt;

&lt;p&gt;Since it is a fully managed service, DynamoDB is well suited for various workloads with any amount of data that require auto-scaling from small to large and anywhere in between. &lt;/p&gt;

&lt;h2&gt;
  
  
  📌 Key Benefits of using DynamoDB
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;⚡ Elasticity and Performance &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Generally scaling databases is hard and risky, but DynamoDB gives you the ability to auto-scale based on the usage which allows your system to adjust according to the traffic and other needs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🦾 Security &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Access control policies and encryptions are available for your tables, so it makes the database more secure and accessible to the appropriate users without any bottlenecks. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; 🏁 Real-time event streaming &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DynamoDB streams enable developers to access the data when it happens which makes the DynamoDB suitable for many complex solutions. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; 🧰 Database Management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DynamoDB creates and keeps the backup of your data safely on the cloud, so in the event of any occurrence, you can safely retrieve the data. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; ⏲️ Time to Live&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TTL allows you to define when to expire the items in a table so they get deleted automatically from the database. &lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Considerations
&lt;/h3&gt;

&lt;p&gt;Some of the important guidelines to assess your suitability of using DynamoDB are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB is well suitable for any business-critical applications which require higher scalability and is predominantly used for transactions processing (OLTP)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DynamoDB is not suitable for data warehousing and OLAP purposes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⭐ &lt;strong&gt;Read and Write Consistency&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB supports two types of reading such as &lt;strong&gt;Eventually Consistent Read&lt;/strong&gt; and &lt;strong&gt;Strongly Consistent Read&lt;/strong&gt;, By default, it is set to Eventually Consistent Read. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the Eventually consistent read, data may not be consistent as the copies of data will generally be available in 1 second. Whereas, a Strongly consistent read will always be up-to-date since it fetches the straight from the leader node. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DynamoDB does not support strongly consistent reads across AWS regions &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🌋Throughputs and Capacity Management
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB offers two capacity modes, &lt;strong&gt;Provisioned&lt;/strong&gt; and &lt;strong&gt;On-Demand&lt;/strong&gt;. In the Provisioned mode, the developer would need to define the read and write capacity of the database. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On-demand mode is a flexible way to provision your DynamoDB tables to serve thousands of requests without doing any capacity planning.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switching between provisioned and on-demand modes can be done once every 24 hours.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  👨‍🔬 Calculating Read and Write Capacity Units
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Read Capacity Units (RCU)
&lt;/h3&gt;

&lt;p&gt;Read capacity units represents one strongly consistent read per second or two eventually consistent reads per second for an item of up to 4KB.&lt;/p&gt;

&lt;p&gt;Let's see how we calculate RCU for strongly consistent read: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 read RCU = 1 strongly consistent read of up to 4kb, So let's take an example of 50 reads at 40KB: &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;= 50 X 40/4 = 500 RCUs &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For eventually consistent reads, it's two reads of up to 4KB. As an example of the same 50 reads at 40 KB:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;= 50/2 X 40/4 = 250  RCUs&lt;/p&gt;

&lt;h3&gt;
  
  
  Write Capacity Units (WCU)
&lt;/h3&gt;

&lt;p&gt;One write capacity unit represents one write of 1 KB per second, so for example, if we need 50 writes of 40 KB per item:&lt;/p&gt;

&lt;p&gt;= 50 X 40 = 2000 WCUs&lt;/p&gt;

&lt;h2&gt;
  
  
  📑 Partitions
&lt;/h2&gt;

&lt;p&gt;The partitions in DynamoDB slice the table as multiple chunks of data for faster reads. It automatically creates partitions on every 10GB of data or when your application exceeds 3000 RCUs or 1000 WCUs in a single partition. Generally, DynamoDB will try to evenly distribute the RCU and WCU capacities across the partitions. &lt;/p&gt;

&lt;h2&gt;
  
  
  🔑 Primary Key (HASH) and Sort Key (RANGE)
&lt;/h2&gt;

&lt;p&gt;The primary key determines the partition to store the data, so it is important to get the primary key correct to be able to distribute the data across the partitions for better performance. &lt;/p&gt;

&lt;p&gt;DynamoDB can have two keys &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primary Key&lt;/li&gt;
&lt;li&gt;Sort Key &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Primary Key&lt;/strong&gt; can either be simple or composite keys. Composite keys consist of both a partition and a sort key. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sort Key&lt;/strong&gt; helps to organize the data in DynamoDB. So sort keys logically group the data in one place for efficient querying purposes. &lt;/p&gt;

&lt;h2&gt;
  
  
  🤖 Secondary Indexes
&lt;/h2&gt;

&lt;p&gt;DynamoDB allows your application to query the table using an alternate key, in addition to queries against the primary key. The two types of indexes are as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Global Secondary Index (GSI) &lt;br&gt;
An index with a partition key and sort key that can be different. It only supports eventually consistent reads, and it can be created or modified at any time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local Secondary Index (LSI) &lt;br&gt;
An index that has the same partition key as the table, but a different sort key. It supports strongly or eventual consistent reads, and it can be created only during the initial table creation. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🚀 DAX
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DAX can reduce the response times to microseconds. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DAX only supports the server-side encryption &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DAX is not ideal for write-intensive workloads &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⛑️ Backups and Monitoring
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DynamoDB provides on-demand backup capability as well as enable point-in-time recovery for your DynamoDB tables. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Backups includes the data, indexes, streams and provisioned capacity of RCU's and WCU's &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DynamoDB usage can be monitored using CloudWatch and CloudTrail. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>python</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Building a Twitter Bot with AWS Serverless</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Tue, 03 Aug 2021 05:20:01 +0000</pubDate>
      <link>https://dev.to/aws-builders/running-twitter-bot-on-aws-serverless-mohamed-fayaz-b9</link>
      <guid>https://dev.to/aws-builders/running-twitter-bot-on-aws-serverless-mohamed-fayaz-b9</guid>
      <description>&lt;p&gt;Sharing my experience of how I am running the Twitter Bot on AWS for almost free using AWS serverless technologies. &lt;/p&gt;

&lt;p&gt;Social Bot is nothing but a program that mimics the behaviours of a user based on the rules you set. Twitter is one of the BOT friendly platforms where you can automate a lot of things from liking, re-posting, follow, unfollow and messaging using their API. &lt;/p&gt;

&lt;p&gt;Before we get down to the nitty-gritty of how it works, there is an &lt;a href="https://help.twitter.com/en/rules-and-policies/twitter-automation" rel="noopener noreferrer"&gt;official guidelines&lt;/a&gt; from Twitter to follow whenever we create a bot.  &lt;/p&gt;

&lt;h2&gt;
  
  
  My Bot account
&lt;/h2&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1409561715813982212-537" src="https://platform.twitter.com/embed/Tweet.html?id=1409561715813982212"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1409561715813982212-537');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1409561715813982212&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;I've created this account last year June 2020, but it outperformed my other account which I have been using for 10+ years with a lot more followers, tweets and engagements so the same content I post in this account reaches much more audience than the actual one. &lt;/p&gt;

&lt;p&gt;To create your bot all we need is a Twitter account and an AWS account to host your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution Overview
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fcj6j0tegx9uso6sr06xf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fcj6j0tegx9uso6sr06xf.jpg" alt="TwitterBOT"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Lambda
&lt;/h3&gt;

&lt;p&gt;Lambda is a serverless compute service from AWS that let you write and run your own code without managing any servers. Lambda comes with 1 million execution and 400,000 GB-seconds of compute time for free. It also supports multiple languages such as Node.js, Python, Java and many more. I've used Python to develop this bot which will run multiple times a day to source the best content based on the keywords and hashtags. &lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Secrets Manager
&lt;/h3&gt;

&lt;p&gt;Secrets Manager helps to keep our secret keys secure within AWS. The cost is based on the number of keys so it may cost you ~$1 to keep our Twitter access keys securely.&lt;/p&gt;

&lt;p&gt;Alternatively, you can also keep the keys in your Lambda environment variable which won't cost you anything, but never store your keys straight in the code as a best practice.    &lt;/p&gt;

&lt;h3&gt;
  
  
  AWS DynamoDB
&lt;/h3&gt;

&lt;p&gt;DynamoDB is a NoSQL database from AWS which allows you to store the data in key-value pairs. I am using this to store the metadata of the content I shared on my Twitter to avoid repetitive content in my feed. Since am using on-demand, the cost is based on the read and writes so in my case it's costing me less than $1 per month. &lt;/p&gt;

&lt;h3&gt;
  
  
  AWS CloudWatch
&lt;/h3&gt;

&lt;p&gt;CloudWatch is a monitoring and observability tool which provides data to make actionable insights to monitor our application. I am writing all the Lambda logs back to CloudWatch to keep track of how it is progressing. We can run this within the free tier so there is no additional cost to keep these logs. &lt;/p&gt;

&lt;h3&gt;
  
  
  Slack
&lt;/h3&gt;

&lt;p&gt;Lastly, I am using Slack to monitor the content it shares. Now you may have a question why can't we directly use the Twitter app to check now and then, having that comes as a message in Slack is so much more comfortable than checking my Twitter feed. &lt;/p&gt;

&lt;h2&gt;
  
  
  Final words
&lt;/h2&gt;

&lt;p&gt;Serverless architectures provide great benefits, but mainly the scalability and the cost. There are paid services to manage your Twitter content, but to run our own is nearly free using a platform like AWS. Similarly, there are several applications and use-cases you can develop using serverless technologies. &lt;/p&gt;

</description>
      <category>twitter</category>
      <category>python</category>
      <category>aws</category>
    </item>
    <item>
      <title>AWS Managed Airflow for your complex workflows</title>
      <dc:creator>Mohamed Fayaz</dc:creator>
      <pubDate>Sun, 18 Jul 2021 01:43:38 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-managed-airflow-for-your-complex-workflows-16d</link>
      <guid>https://dev.to/aws-builders/aws-managed-airflow-for-your-complex-workflows-16d</guid>
      <description>&lt;p&gt;&lt;strong&gt;Airflow&lt;/strong&gt; is a tool to orchestrate complex workflow which was created at Airbnb in 2014. Airflow gained significant traction across several organizations in recent days due to the ability to create complex data pipelines with ease. The Airflow user interface (UI) serves as an operational dashboard to schedule, monitor and control any scripts or applications. &lt;/p&gt;

&lt;p&gt;Despite Airflow has been adopted by several organizations, deploying and managing the infrastructure has always been challenging and introduces operational overhead. To combat this problem many companies came up with the idea of introducing managed Airflow Infrastructure such as MWAA from Amazon Web Services (AWS). AWS takes the responsibility for keeping your infrastructure with almost no downtime and up-to-date security patches in place along with the latest version readily available to use. &lt;/p&gt;

&lt;p&gt;Besides, the other key benefits of using AWS MWAA is its elasticity, the ability to scale up and down based on the workload, and the easiness of building and deploying production-grade secure infrastructure with seamless integration with other AWS Services. &lt;/p&gt;

&lt;h2&gt;
  
  
  Airflow Basics
&lt;/h2&gt;

&lt;p&gt;Let's dive into some key concepts of Airflow :)&lt;/p&gt;

&lt;p&gt;In Airflow, workflows are defined in a Python file which is also referred to as DAG. You can imagine a DAG as a single job that can have multiple tasks in general. There are three common parts in every DAG those are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DAG Initialization &lt;/li&gt;
&lt;li&gt;Tasks &lt;/li&gt;
&lt;li&gt;Tasks Dependencies &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  DAG (Directed Acyclic Graphs)
&lt;/h3&gt;

&lt;p&gt;DAGs are written in Python and are often identified by their unique &lt;code&gt;dag_id&lt;/code&gt;. During the initialization, we specify when to start, scheduled time and so forth. Here is a simple DAG below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;airflow.models&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DAG&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;airflow.utils.dates&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;days_ago&lt;/span&gt;

&lt;span class="n"&gt;dag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DAG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="n"&gt;dag_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sample_dag&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;days_ago&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; 
          &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sample DAG&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;schedule_interval&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;@daily&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Task
&lt;/h3&gt;

&lt;p&gt;Tasks perform different actions from executing a piece of Shell script to triggering EMR jobs. It is necessary to have a DAG before we create any task. Also, every task in a DAG is defined by an operator and similar to &lt;code&gt;dag_id&lt;/code&gt;, the &lt;code&gt;task_id&lt;/code&gt; would need to be unique within the DAG.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def function_a (**kwargs):
        name = kwargs['name']
        return f'hello {name} !!'

first_task = PythonOperator(
        task_id="first_task", 
        python_callable= function_a,
        op_kwargs= {'name': 'Fayaz'}, 
        dag= dag)

second_task = DummyOperator(task_id="second_task", dag=dag)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Task Dependencies
&lt;/h3&gt;

&lt;p&gt;Now the last part of the DAG is to create dependencies among the tasks. In this case, we are going to trigger the &lt;code&gt;first_task&lt;/code&gt; first and then trigger the &lt;code&gt;second_task&lt;/code&gt; as soon as the first_task completes. So it will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;first_task &amp;gt;&amp;gt; second_task
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we understood what is Airflow and how to create a simple DAG so let's spin up the AWS MWAA to run this DAG. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You need to use your AWS Account to perform the next few steps which may incur some charges.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Setting up the Managed Airflow Instance in AWS
&lt;/h2&gt;

&lt;p&gt;Before we create a new MWAA environment, we would need to create an &lt;code&gt;S3 bucket&lt;/code&gt; which must have versions enabled. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Go to &lt;a href="https://console.aws.amazon.com/mwaa/home?#create/environment" rel="noopener noreferrer"&gt;Managed Airflow Console&lt;/a&gt; and click Create Environment&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F3fbj7j107m94ou85l42c.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F3fbj7j107m94ou85l42c.PNG" alt="2"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Enter a &lt;strong&gt;name&lt;/strong&gt; and choose the Airflow version as &lt;strong&gt;2.0.2(Latest)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fy4pu7o86x8vpu1v8pv7j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fy4pu7o86x8vpu1v8pv7j.PNG" alt="3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Choose the S3 bucket - the one you have created &lt;br&gt;
&lt;strong&gt;Step 4.&lt;/strong&gt; For Dags folder type &lt;strong&gt;s3://{your-bucket-name}/dags&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Step 5.&lt;/strong&gt; Click &lt;strong&gt;Next&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F76re3ydkbtxsudtf2a64.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F76re3ydkbtxsudtf2a64.PNG" alt="5"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6.&lt;/strong&gt; Click on &lt;strong&gt;Create MWAA VPC&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fykk0gfszywk1h6ff5k1k.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fykk0gfszywk1h6ff5k1k.PNG" alt="6"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7.&lt;/strong&gt; It will take you to a page with a bunch of VPC, Subnets details. Click &lt;strong&gt;Create Stack&lt;/strong&gt; which may take a few mins to complete&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fdzmx0kyzz6vtuk3uadrn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fdzmx0kyzz6vtuk3uadrn.PNG" alt="7"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8.&lt;/strong&gt; Choose the VPC you just created and scroll down to enter environment class and other configurations&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F7dkbp4p132qou378blun.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F7dkbp4p132qou378blun.PNG" alt="8"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9.&lt;/strong&gt;  Choose &lt;strong&gt;Create a new role&lt;/strong&gt; and click Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F0n7owa5xiwjdx17n45gm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F0n7owa5xiwjdx17n45gm.PNG" alt="9"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10.&lt;/strong&gt; Verify all the details and click &lt;strong&gt;Create environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fme0syi4hg0zj5oq7ki0n.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fme0syi4hg0zj5oq7ki0n.PNG" alt="10"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Generally, it takes 10-20 mins to spin up the Airflow Infrastructure so this is the time to get your coffee ☕ before we deploy our very first DAG 🤣😂 &lt;/p&gt;

&lt;p&gt;🎉🎉🎉 When you refresh in a few minutes, you will see the environment status as &lt;code&gt;Available&lt;/code&gt; so click &lt;strong&gt;Open Airflow UI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fiz8gcisbyxxd99qqtlkg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fiz8gcisbyxxd99qqtlkg.PNG" alt="11"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F2kuual4eq4zd8h990kwm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F2kuual4eq4zd8h990kwm.PNG" alt="12"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yay!! Now we got our environment up and ready to go. So let's deploy our first DAG. &lt;/p&gt;
&lt;h2&gt;
  
  
  Deploying DAGs in the AWS MWAA
&lt;/h2&gt;

&lt;p&gt;Step 1: To deploy the DAG, we would need to copy the &lt;code&gt;.py&lt;/code&gt; file to our &lt;code&gt;s3/dags&lt;/code&gt; location. Copy the below code and put that in a &lt;code&gt;.py&lt;/code&gt; file and save it as demo_dag.py in your local.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"""
Importing necessary modules
"""
from airflow.models import DAG
from airflow.utils.dates import days_ago
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator


"""
Initializing DAGs
"""
dag = DAG(
          dag_id="grepy_sample_dag",
          start_date=days_ago(2), 
          description="DAG which orchestrates a simple ML workflow",
          schedule_interval='@daily')

"""
Creating Tasks
"""
def function_a (**kwargs):
        name = kwargs['name']
        return f'hello {name} !!'

first_task = PythonOperator(
        task_id="first_task", 
        python_callable= function_a,
        op_kwargs= {'name': 'Fayaz'}, 
        dag= dag)

second_task = DummyOperator(task_id="second_task", dag=dag)

"""
Dependencies
"""
first_task &amp;gt;&amp;gt; second_task

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

&lt;/div&gt;



&lt;p&gt;Step 2: Upload the &lt;code&gt;demo_dag.py&lt;/code&gt; file to your s3/dags folder. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fcrq0xbza1gw42khorhk0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fcrq0xbza1gw42khorhk0.PNG" alt="13"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: That's it!! Now again it may take a few minutes when you deploy a DAG for the first time, but it will look like this &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fd1w73kw017364fr44n2e.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fd1w73kw017364fr44n2e.PNG" alt="14"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you toggle on for the first time, the DAG will automatically be triggered so click on the DAG name which will take you to the tree view where you see the job status and task dependencies. &lt;/p&gt;

&lt;p&gt;One of the best parts is you can see all the logs when you go to the Graph view which is also available in CloudWatch so you can ingest that to your Splunk or ELK for further analysis. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Ffuw34qgavjfd1rcfwl4g.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffuw34qgavjfd1rcfwl4g.PNG" alt="15"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In this post, we took a high-level look at Airflow basics and we dived into AWS Managed Airflow along with a sample DAG deployment which runs a simple Python function. Similarly, you can orchestrate any type of task using various operators which is available on any Airflow infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  For further reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://aws.amazon.com/managed-workflows-for-apache-airflow/getting-started/" rel="noopener noreferrer"&gt;https://aws.amazon.com/managed-workflows-for-apache-airflow/getting-started/&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for your time and happy learning !! 😊 &lt;/p&gt;

</description>
      <category>aws</category>
      <category>airflow</category>
      <category>python</category>
      <category>mlops</category>
    </item>
  </channel>
</rss>
