<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peter Eskandar on Medium]]></title>
        <description><![CDATA[Stories by Peter Eskandar on Medium]]></description>
        <link>https://medium.com/@peterwadid1?source=rss-1111a6473ead------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*20crVZvPCniQedqzC2qOyg.jpeg</url>
            <title>Stories by Peter Eskandar on Medium</title>
            <link>https://medium.com/@peterwadid1?source=rss-1111a6473ead------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 03:51:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peterwadid1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[VPC Interface endpoints sharing in a Multi-Account Organization]]></title>
            <link>https://peterwadid1.medium.com/vpc-interface-endpoints-sharing-in-a-multi-account-organization-c598d3bfeca9?source=rss-1111a6473ead------2</link>
            <guid isPermaLink="false">https://medium.com/p/c598d3bfeca9</guid>
            <dc:creator><![CDATA[Peter Eskandar]]></dc:creator>
            <pubDate>Sat, 24 Sep 2022 18:50:26 GMT</pubDate>
            <atom:updated>2022-09-24T19:58:35.413Z</atom:updated>
            <content:encoded><![CDATA[<p>When you start working on a Multi-Account Organization in AWS, there are two things that you will think about most of the time :</p><p><strong><em>- Security<br></em></strong> <strong><em>- Cost Optimization</em></strong></p><p>So, to secure connections between your VPC and AWS Services you can do so by using the VPC interface endpoints, they will allow your resources to connect to AWS Services without the need of an Internet Gateway, NAT device, VPN or a AWS Direct Connect connection.</p><p>Instances in your VPC won’t use public IP addresses to communicate with AWS services, instead it uses VPC Endpoint for that.</p><p>But when you start thinking about using them, the first thing that comes to your mind is :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NUscUemxF0Oc8Klp.jpg" /></figure><h3>VPC Interface Endpoints Pricing :</h3><p>Below you can find and example of how much 5 VPC Interface endpoints will cost you for 10 GB of total data processed by all VPCE Interface endpoints in the AWS region.</p><p>Actually too much money, specially if your going to use them in each account of your AWS Organization</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vNubYnt3hfLdr6PdmMBJKA.png" /></figure><h3>So, there is a way to share them from one Account with other Accounts ?</h3><p><strong><em>Yes</em></strong>, there are multiple ways to do so and today I’m going to shar with you one of the ways we’ve already used in our AWS Organization.</p><h3>let’s get to work</h3><p>We can say that you have an Architecture similar to the one shown below, one Network/Shared Services Account, multiple Application Accounts where you’ve most of your workload, multiple VPCs, multiple VPC Interface endpoints in each VPC per Account and everything is connected together using a Transit Gateway.</p><figure><img alt="AWS Architecture" src="https://cdn-images-1.medium.com/max/1024/1*jgdvgkASGNxRYDIp4XgswQ.png" /></figure><blockquote><strong>What we are going to do ?</strong></blockquote><p>We are going to keep the VPC Interface endpoints in our Shared Services/Network Account, working on sharing them with the other accounts in our Organization and then remove the interface endpoints from the other account.</p><figure><img alt="Shared VPC Interface Endpoints" src="https://cdn-images-1.medium.com/max/1024/1*6pfRYMDp5GmU7NdMow41VQ.png" /></figure><blockquote><strong>Which AWS Services will help us to do so ?</strong></blockquote><ul><li><strong><em>Route53</em></strong></li><li><strong><em>Resource Access Manager</em></strong></li></ul><p>So, let’s move to our account from where we want to share the interface endpoints.</p><p>When you create an Interface endpoint (for example for : <em>EC2 Service</em>), AWS automtically enables the Private DNS Name for this endpoint <em>“</em><strong><em>ec2.eu-west-3.amazonaws.com</em></strong><em>” </em>as<em> </em>shown below :</p><figure><img alt="Endpoint Private DNS Name" src="https://cdn-images-1.medium.com/max/1024/1*3tf5Rq_Um5oulY8c7z30Dw.png" /></figure><p>to be able to share this endpoint with the other accounts we need to disable the Private DNS Name so we can create a private hosted zone on Route53 for it.</p><p>to do so, just select the endpoit and go to Actions and then select Modify private DNS Name and disable it</p><figure><img alt="Private DNS Name Disabled" src="https://cdn-images-1.medium.com/max/1024/1*h2TMWahVcNTDkvPl32INEw.png" /></figure><p>Now, let’s go to <strong>Route53 </strong>to create a private hosted zone for our interface endpoint with it’s Private DNS Name, associate it to the VPC where we’ve already created the interface endpoint and then create a DNS record which will target our VPC endpoint as show below :</p><figure><img alt="Interface Endpoint PHZ" src="https://cdn-images-1.medium.com/max/1024/1*_QDubpa_84pxcTSCdt3kXQ.png" /></figure><blockquote><strong>What are going to do next ?</strong></blockquote><p>In our centralized account we need setup some other few things :</p><ol><li><strong><em>Inbound Resolver :</em></strong> The inbound resolver will receive queries forwarded from other VPCs’ DNS servers and from workloads running in participating AWS accounts.</li></ol><p>The Inbound resolver should be created on the same VPC where we’ve created the interface endpoint and associated to the Route53 Private hosted zone.</p><p>DNS queries reaches the default DNS server of our VPC and because the VPC is associated with the private hosted zone <strong><em>ec2.eu-west-3.amazonaws.com</em></strong>, the default DNS server will be able to resolve this domain.</p><figure><img alt="Inbound Endpoint" src="https://cdn-images-1.medium.com/max/1024/1*5NNZku-IoZAyl0aa9F8eqw.png" /></figure><p><strong><em>2. Outbound Resolver :</em></strong> The Outbound Resolver will forward the DNS queries coming from the other VPCs to the IP addresses of the Inbound Resolver.</p><figure><img alt="Outbound Resolver" src="https://cdn-images-1.medium.com/max/1024/1*EUlXKiScWLKvJH8IkD1Bgw.png" /></figure><p><strong><em>3. Resolver Rules : </em></strong>indicates that queries for <strong><em>ec2.eu-west-3.amazonaws.com </em></strong>should be forwarded through the Outbound Resolver.</p><p>I’ve created a rule called “<strong><em>ec2 rule</em></strong>” for the VPC interface endpoint Private DNS Name “<strong>ec2.eu-west-3.amazonaws.com</strong>” and targeting the IP Addresses of our <strong>Inbound Resolver</strong></p><figure><img alt="Resolver Rule" src="https://cdn-images-1.medium.com/max/1024/1*87IlS345hBg-h5CcQNUCDw.png" /></figure><figure><img alt="Inbound Endpoint IPs" src="https://cdn-images-1.medium.com/max/1024/1*wlkTMahnAeCJdgVZvl-gsw.png" /></figure><p>Resolver rules is what we are going to share with the other accounts in our organization.</p><p>Using <strong><em>Resource Access Manager</em></strong>, you can create a resource share and then share the resolver rule/rules with all the accounts in your organization</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WRwk5xyXN2454JuLq0JSTw.png" /></figure><blockquote><strong>Final Step :</strong></blockquote><p>Now move to the other accounts, delete the EC2 VPC Interface endpoint and then switch to Route53.</p><p>Under Rules section, you can find the resolver rule already shared with you from the centeralized account, what you need to do now is just to associate your VPCs in this account with the resolver rule so that they will be able to resolve the <strong><em>ec2.eu-west-3.amazonaws.com </em></strong>using the DNS Server of the centeralized VPC in the Shared Services/Network Account.</p><blockquote><strong>IMPORTANT:</strong></blockquote><p>VPC interface endpoints, resolver rules, inbound &amp; outbuond resolvers are all regional services, so if you want to share VPC interface endpoints in multiple regions, then you’ve to replicate everything.</p><p>In this case you will need to create multiple interface endpoints in different regions in the centeralized account, multiple private hosted zones (for example: <strong><em>ec2.eu-west-3.amazonaws.com</em></strong> &amp; <strong><em>ec2.eu-central-1.amazonaws.com</em></strong>) targeting the endpoint in that region and multiple resolver rules one for each domain name.</p><p>This blog Post helped us during the setup of this solution : <a href="https://aws.amazon.com/blogs/security/simplify-dns-management-in-a-multiaccount-environment-with-route-53-resolver/">https://aws.amazon.com/blogs/security/simplify-dns-management-in-a-multiaccount-environment-with-route-53-resolver/</a></p><p>Hope this will help you to save some money on AWS 💰</p><p>Special Thanks to <a href="https://medium.com/u/34ef1e8404b3">Stefan Koch</a></p><p>If you end up here, I want to say, thank you for reading this article! 🙌</p><p>Peter</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c598d3bfeca9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Convert your Audio files to text using AWS Transcribe and Step Functions]]></title>
            <link>https://peterwadid1.medium.com/convert-your-audio-files-to-text-using-aws-transcribe-and-step-functions-9ad4124d3cbc?source=rss-1111a6473ead------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ad4124d3cbc</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[transcribe-audio-to-text]]></category>
            <category><![CDATA[aws-step-functions]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Peter Eskandar]]></dc:creator>
            <pubDate>Wed, 20 Jan 2021 02:06:19 GMT</pubDate>
            <atom:updated>2021-01-20T02:13:41.439Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi all,</p><p>I’ve realized a simple demo App that converts audio files to text and sends results by email to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WWg27PmiT--DIyUbafh21g.png" /><figcaption>App Workflow</figcaption></figure><h3>Overview of the App components &amp; workflow :</h3><ul><li>a <strong>WebApp </strong>in Angular which allows the user to upload an audio file and insert his/her email address to be able to receive the results.</li><li><strong>AWS Cognito (<em>to allow unauthenticated users to be able to interact with AWS Services</em>)</strong></li><li><strong>S3 Bucket</strong> where all uploaded files will be stored</li><li>a <strong>Lambda</strong> function which will be triggered by S3 on each file upload.</li><li><strong>State Machine </strong>composed of multiple Lambda functions and will be triggered by the Lambda function in the previous step on each file upload, receiving information of the recently uploaded file (bucket name &amp; object key).</li><li><strong>SES </strong>Domain Identity : actually in my case I preferred SES over SNS to be able to send emails without asking for email verification (this could be done only with <strong>SES in production mode</strong>).</li></ul><h3>State Machine :</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*IzT2U5Pj5ayiYymxGBsoBQ.png" /><figcaption>State Machine Workflow</figcaption></figure><p><strong>State Machine/Step Functions</strong> is a serverless orchestration service that lets you easily coordinate multiple Lambda functions into flexible workflows that are easy to debug and easy to change.</p><p>Our State Machine will orchestrate multiple Lambda functions doing the following tasks (in order) :</p><ul><li><strong>Transcribe : </strong>on each file upload, this Lambda function will start a new Transcription job using AWS Transcribe service.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/29dfa3f3765cb1d3aacfc97d05d7f9cb/href">https://medium.com/media/29dfa3f3765cb1d3aacfc97d05d7f9cb/href</a></iframe><ul><li><strong>Transcribe Wait : </strong>this Lambda function will check the status of the Transcription job created on the previous step every 2 seconds, once completed the status and the job results will be communicated to the next step.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eac552feda32b2ba3c41be78d5817119/href">https://medium.com/media/eac552feda32b2ba3c41be78d5817119/href</a></iframe><ul><li><strong>Transcribe Complete : </strong>based on the Transcription job status communicated by the previous Lambda function, in this step we are going to add a new variable to the payload for the next steps (<strong>$.Payload.TranscriptionJobStatus</strong>).</li></ul><p>This variable will indicate the final status of our Transcription job</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/508feaf326e5c6302098e5e7208f4761/href">https://medium.com/media/508feaf326e5c6302098e5e7208f4761/href</a></iframe><ul><li><strong>Delete Transcription job : </strong>in this final step, we are going to send an email to the user with the Transcription job results and delete the Transcription job from AWS Transcribe service.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4e69bce7e8f3a43848ba91c5a8aa739/href">https://medium.com/media/b4e69bce7e8f3a43848ba91c5a8aa739/href</a></iframe><p>here is the full configuration of our <strong>State Machine</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1f6c454ae92769bfc7fee960622ad8b/href">https://medium.com/media/b1f6c454ae92769bfc7fee960622ad8b/href</a></iframe><p><strong><em>Remember to give all your Lambda functions the required roles to be able to communicate with the other services for example (S3, AWS Transcribe &amp; SES/SNS)</em></strong></p><p>you can download the webApp from here :</p><p><a href="https://github.com/petereskandar/audioConverter">petereskandar/audioConverter</a></p><p>hope it helps</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ad4124d3cbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Start/Stop ECS Fargate Tasks using Lambda & CloudWatch Events Rules]]></title>
            <link>https://peterwadid1.medium.com/start-stop-ecs-fargate-tasks-using-lambda-cloudwatch-events-rules-b453aad4e1f6?source=rss-1111a6473ead------2</link>
            <guid isPermaLink="false">https://medium.com/p/b453aad4e1f6</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-fargate]]></category>
            <category><![CDATA[cloudwatch-events]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Peter Eskandar]]></dc:creator>
            <pubDate>Fri, 08 Jan 2021 01:21:14 GMT</pubDate>
            <atom:updated>2021-01-08T01:21:14.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eY-fCURZH778ErkL.png" /></figure><p>Hi all,</p><p>I’ve created a simple Lambda function to be able to Start/Stop ECS Service tasks for a specific Cluster.</p><p>This Lambda function will be integrated with two CloudWatch Events Rules, a one to start tasks at 10:00 am and another one to stop all task at midnight.</p><p>The Lambda code is as following :</p><pre>const aws = require(&#39;aws-sdk&#39;);</pre><pre>exports.handler = (event, context) =&gt; {<br>        // stop all taks<br>        var ecsRegion = &#39;eu-west-3&#39;;<br>        if(<strong><em>event.status == &#39;stop&#39;</em></strong>){<br>        var params = {<br>            cluster: process.env.<strong>ECS_CLUSTER</strong>,<br>            service: process.env.<strong>ECS_SERVICE_NAME</strong>,<br>            desiredCount: 0<br>        };<br>    }<br>    else{<br>        // otherwise : start one task<br>        var params = {<br>            cluster: process.env.ECS_CLUSTER,<br>            service: process.env.ECS_SERVICE_NAME,<br>            desiredCount: 1<br>        };<br>    }</pre><pre>var ecs = new aws.ECS({region: ecsRegion});<br>    ecs.updateService(params, function (err, data) {<br>        if (err) console.log(err, err.stack); // an error occurred<br>        else {<br>            context.succeed();<br>        }   <br>    });<br>};</pre><p><strong>ECS_CLUSTER </strong>and <strong>ECS_SERVICE_NAME </strong>are two environment variables which are referring to the ECS Cluster and Service names, while <strong>status </strong>is a variable that should be passed form the CloudWatch Events rule to define whether to start or to stop the tasks using the <strong>desiredCount </strong>parameter.</p><p>Here is how to configure the CloudWatch Events rule:</p><ul><li>remember to pass the <strong>status </strong>to the Lambda function : {“status”: “start or stop”}</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xSa9l4MZpIl8L1alzAkf2Q.png" /><figcaption>CloudWatch Events Rule Configuration</figcaption></figure><p>To be able to use the Lambda function with different ECS Clusters and Services, instead of setting <strong>ECS_CLUSTER </strong>and <strong>ECS_SERVICE_NAME </strong>as environment variables, you can pass both of them from the CloudWatch Evnets rule together with the status as following :</p><pre>{“status”: “start”, “ECS_CLUSTER”: “demoFargate”, “ECS_SERVICE_NAME”: “demoService”}</pre><p>modify the Lambda function as shown below :</p><ul><li>instead of using <strong>process.env</strong>, we are going to use <strong>event</strong></li></ul><pre>const aws = require(&#39;aws-sdk&#39;);</pre><pre>exports.handler = (event, context) =&gt; {<br>        // stop all taks<br>        var ecsRegion = &#39;eu-west-3&#39;;<br>        if(<strong><em>event.status == &#39;stop&#39;</em></strong>){<br>        var params = {<br>            cluster: <strong><em>event</em></strong>.<strong>ECS_CLUSTER</strong>,<br>            service: <strong><em>event</em></strong>.<strong>ECS_SERVICE_NAME</strong>,<br>            desiredCount: 0<br>        };<br>    }<br>    else{<br>        // otherwise : start one task<br>        var params = {<br>            cluster: <strong><em>event</em></strong>.ECS_CLUSTER,<br>            service: <strong><em>event</em></strong>.ECS_SERVICE_NAME,<br>            desiredCount: 1<br>        };<br>    }</pre><pre>var ecs = new aws.ECS({region: ecsRegion});<br>    ecs.updateService(params, function (err, data) {<br>        if (err) console.log(err, err.stack); // an error occurred<br>        else {<br>            context.succeed();<br>        }   <br>    });<br>};</pre><p>finally, we need to add an IAM policy to enable the Lambda function to update the ECS service, so add the following inline policy to the IAM role attached to your Lambda function</p><pre>{<br>      &quot;Version&quot;: &quot;2012-10-17&quot;,<br>      &quot;Statement&quot;: [<br>          {<br>              &quot;Effect&quot;: &quot;Allow&quot;,<br>              &quot;Action&quot;: &quot;ecs:UpdateService&quot;,<br>              &quot;Resource&quot;: &quot;*&quot;<br>          }<br>      ]<br> }</pre><p>hope it helps</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b453aad4e1f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Video Chat using Amazon Kinesis Video Streams and WebRTC]]></title>
            <link>https://peterwadid1.medium.com/video-chat-using-amazon-kinesis-video-streams-and-webrtc-e7a9e80c95b?source=rss-1111a6473ead------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7a9e80c95b</guid>
            <category><![CDATA[webrtc]]></category>
            <category><![CDATA[cognito]]></category>
            <category><![CDATA[kinesis]]></category>
            <category><![CDATA[video-chat]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Peter Eskandar]]></dc:creator>
            <pubDate>Wed, 09 Dec 2020 15:39:38 GMT</pubDate>
            <atom:updated>2020-12-09T15:39:38.717Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi all,</p><p>Today I wanted to share with you a simple Demo App that I’ve created while preparing for AWS DevOps Certification.</p><p>The Demo App is fully made in <strong>JavaScript </strong>and mainly based on <strong>Kinesis Video Streams</strong> integrated with <strong>WebRTC Client</strong>.</p><p>The idea of creating this App was the need to use as many AWS services as possible to be better prepared for the certification exam.</p><p>This is the list of AWS services that I’ve used while creating the APP :</p><ul><li><strong><em>AWS Code Commit (for the source code)</em></strong></li><li><strong><em>AWS CodeBuild (to build the DockerFile and push the image to ECR)</em></strong></li><li><strong><em>AWS CodePipeline</em></strong></li><li><strong><em>Cognito (to allow unauthenticated users to be able to interact with AWS Service, for example : the AWS Kinesis video streams)</em></strong></li><li><strong><em>ECR (as repository for docker images)</em></strong></li><li><strong><em>ECS Fargate (for the application deployment)</em></strong></li><li><strong><em>AWS ALB (load balancing fargate service)</em></strong></li><li><strong><em>Route53 (for domain registration)</em></strong></li></ul><p>The App allows video calls between <strong>One Master</strong> and <strong>Multiple Viewers</strong>, in other words the Master can make video and audio calls with all connected Viewers but Viewers can see only the Master as shown in the image below :</p><figure><img alt="a screenshot while testing the Demo App" src="https://cdn-images-1.medium.com/max/976/1*txO1vynsXK-pE06wBZPM4Q.png" /></figure><p>for the authentication part with <strong>Cognito</strong>, you need to update this script <strong>webRTC/authentication.js </strong>by adding your <strong>Cognito IDENTITY_POOL_ID </strong>and the<strong> role ARN</strong> which the users will assume to be able to interact with <strong>Kinesis</strong>.</p><pre>async function getUserCredentials(formValues) {     <br>// cognito identity pool --&gt; unauthorized access    <br>const IDENTITY_POOL_ID = &quot;<strong><em>Your identity pool id</em></strong>&quot;;    AWS.config.region = formValues.region;    <br>AWS.config.credentials = await new AWS.CognitoIdentityCredentials({IdentityPoolId: <strong><em>IDENTITY_POOL_ID</em></strong>,        RoleArn: &#39;<strong><em>unauthenticated users assume role ARN</em></strong>&#39;});  }</pre><h3>TensorFlow &amp; BodyPix :</h3><p>Right now I’m working on the integration of <strong>Tensorflow &amp; BodyPix</strong> for a real-time person segmentation to be able to add the blur background effect during the video calls, as show below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*1cl5pDLBNBazjMCSuSnizA.png" /></figure><h3>How to use the Demo App :</h3><p>to able to use the App, please follow the steps below :</p><ol><li>clone the git repository</li><li>update <strong>webRTC/authentication.js </strong>as mentioned above</li><li>create a <strong>Signaling Channel </strong>on <strong>AWS</strong> <strong>Kinesis Video Streams (you will need it while starting your app)</strong></li><li>build the <strong>DockerFile </strong>and run it, or open directly the<strong> index.html </strong>file</li><li>insert the <strong>AWS Region </strong>in which you are operating and then insert the <strong>Signaling Channel Name </strong>you’ve already created. Now you can start your <strong>Master</strong></li><li>Open another browser tab, repeat step 5 and start your <strong>Viewer</strong></li><li>you can start multiple <strong>Viewers </strong>and only one <strong>Master</strong></li><li>enjoy the video call :)</li></ol><p><a href="https://github.com/petereskandar/kvs-webRTC">petereskandar/kvs-webRTC</a></p><p>Thanks a lot</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7a9e80c95b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular 6 — Resolving Dynamic Data with resolve guard]]></title>
            <link>https://peterwadid1.medium.com/angular-6-resolving-dynamic-data-with-resolve-guard-aad85253d9ec?source=rss-1111a6473ead------2</link>
            <guid isPermaLink="false">https://medium.com/p/aad85253d9ec</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[angular-4]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Peter Eskandar]]></dc:creator>
            <pubDate>Thu, 09 Aug 2018 00:47:20 GMT</pubDate>
            <atom:updated>2018-08-09T00:51:53.615Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is an example that explains how to pass/resolve data to a component before it’s getting rendered.</p><p>Data is going to be passed using a resolver from the app routing module.</p><p>let’s say that we have the following route configuration in our app-routing.module.ts</p><pre>{ path: &#39;/server/:id&#39;, component: ServerComponent, resolve: {server: ServerResolver} }</pre><p>we need to pass a server object to our ServerComponent before rendering it.</p><p>we are going to create a ServerResolver as show below :</p><pre>@Injectable()</pre><pre>export class ServerResolver implements Resolve&lt;Server&gt; {</pre><pre>constructor(private serversService: ServersService) {}</pre><pre>resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable&lt;Server&gt; | Promise&lt;Server&gt; | Server {</pre><pre>    return this.serversService.getServer(+route.params[&#39;id&#39;]);</pre><pre>   }</pre><pre>}</pre><p>The ServerResolver is going to call a backend service to retrieve the required server object.</p><p>In our ServerComponent we can read the server object passed by the ServerResolver as following :</p><pre>server: {id: number, name: string, status: string};</pre><pre>constructor(private serversService: ServersService,</pre><pre>private route: ActivatedRoute,private router: Router) {</pre><pre>}</pre><pre>ngOnInit() {<br>  this.route.data.subscribe((data: Data) =&gt; {<br>    this.server = data[&#39;server&#39;];<br>  });<br>}</pre><p>for a complete example regarding Angular routing please visit : <a href="https://github.com/petereskandar/Angular-routing_final">https://github.com/petereskandar/Angular-routing_final</a></p><p>hope it helps</p><p>Thanks</p><p>Peter</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aad85253d9ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>