tag:blogger.com,1999:blog-340814842024-03-13T10:34:44.302-07:00MetahatMetahat..aka..Blue hat Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.comBlogger315125tag:blogger.com,1999:blog-34081484.post-7464203342443292092023-09-15T13:56:00.000-07:002023-09-15T13:56:13.284-07:00Gray Failures: What is it and how to detect one?<p>If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures. </p><p><br /></p><p>Hopefully this article will give you insight on question in your mind. </p><p><a href="https://aws.amazon.com/blogs/mt/detecting-gray-failures-with-outlier-detection-in-amazon-cloudwatch-contributor-insights/">https://aws.amazon.com/blogs/mt/detecting-gray-failures-with-outlier-detection-in-amazon-cloudwatch-contributor-insights/</a></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-23331786508232756052023-08-24T13:37:00.004-07:002023-08-24T13:39:56.867-07:00How to select the best machine learning service in AWS <p> </p><p>If you looking for directional information on how to select an Machine learning algorithm, check the below blog. The blog i wrote though is specific for manufacturing but it can provide direction on different use cases</p><p><a href="https://aws.amazon.com/blogs/industries/selecting-the-best-automatic-machine-learning-to-meet-your-manufacturing-needs/">https://aws.amazon.com/blogs/industries/selecting-the-best-automatic-machine-learning-to-meet-your-manufacturing-needs/</a></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-23260928328791076152023-08-24T13:33:00.003-07:002023-08-24T13:33:29.992-07:00Testing AWS Cloudformation Template<p> Very interesting tool to test the cloud formation templates. Check it out </p><p>TaskCat</p><p><a href="https://github.com/aws-ia/taskcat">https://github.com/aws-ia/taskcat</a></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-57685813912794450502023-04-26T14:00:00.003-07:002023-04-26T14:00:57.745-07:00Architecting Resilient application on AWS<p> Great whitepaper on improving resiliency of distributed systems:</p><p><br /></p><p><a href="https://docs.aws.amazon.com/whitepapers/latest/availability-and-beyond-improving-resilience/availability-and-beyond-improving-resilience.html">https://docs.aws.amazon.com/whitepapers/latest/availability-and-beyond-improving-resilience/availability-and-beyond-improving-resilience.html</a></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-24641616721908761372023-03-30T23:04:00.006-07:002023-03-30T23:04:59.147-07:00AWS CDK Samples <p> Want to learn AWS CDK with samples :</p><p><br /></p><p>Check these out:</p><p><a href="https://github.com/aws-samples/aws-cdk-examples#Examples">https://github.com/aws-samples/aws-cdk-examples#Examples</a></p><p><br /></p><p><a href="https://cdkpatterns.com/patterns/all/">https://cdkpatterns.com/patterns/all/</a></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-44369391734382822792022-11-30T20:50:00.002-08:002022-11-30T20:50:34.112-08:00Tranformation in Manufacturing <p> Do you want to know how CPG industry is undergoing transformation using IoT technology, read the blogs on how AWS partners are using AWS technologies to build solutions for CPG industry</p><p><br /></p><p><a href="https://aws.amazon.com/blogs/industries/how-to-build-a-smart-production-solution-with-dxcs-spark-platform/">https://aws.amazon.com/blogs/industries/how-to-build-a-smart-production-solution-with-dxcs-spark-platform/</a></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-12622841388215436842022-10-21T08:01:00.001-07:002022-10-21T08:01:17.736-07:00Developing Custom web portal for the AWS SiteWise Service<p> Are you looking to develop a custom application to show the data from AWS SiteWise?</p><p>Check out the <a href="https://aws.amazon.com/blogs/iot/build-iot-applications-using-aws-iot-application-kit/">AWS IoT Application Kit</a><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-66917097066482855712022-09-07T15:31:00.002-07:002022-09-07T15:31:42.228-07:00AWSIoTPythonSDK.exception.AWSIoTExceptions.connectTimeoutException<p>Are you getting the below error when sening data to IoT Core using the "AWSIoTPythonSDK." ?</p><p><br /></p><p><b>Here is my error :</b></p><p><br /></p><p><i> File "/usr/local/lib/python3.6/site-packages/AWSIoTPythonSDK/MQTTLib.py", line 520, in connect<br /> return self._mqtt_core.connect(keepAliveIntervalSecond)<br /> File "/usr/local/lib/python3.6/site-packages/AWSIoTPythonSDK/core/protocol/mqtt_core.py", line 199, in connect<br /> raise connectTimeoutException()<br />AWSIoTPythonSDK.exception.AWSIoTExceptions.connectTimeoutException</i></p><p><br /></p><p>The below can be reason for this issue</p><p><br /></p><p><b><span style="color: #38761d;">1- You have not defined policy to allow the sending message to the IoT Core topic. If that is the case create a policy for the "Thing"</span></b></p><p><br /></p><p>You need to define</p><p> <a href="https://docs.aws.amazon.com/iot/latest/developerguide/pub-sub-policy.html" target="_blank">Publish/Subscribe policy </a></p><p><a href="https://docs.aws.amazon.com/iot/latest/developerguide/connect-and-pub.html" target="_blank">Connect and Publish Policy </a><br /></p><p> </p><p>If the policies are defined than check the active version of policy, In my case old policy was active</p><p> </p><p><b><span style="color: #38761d;">2- Make the latest one active </span></b></p><p><b><span style="color: #38761d;"> Check this under your "Thing" policy settings:</span></b></p><p><b><span style="color: #38761d;"> </span></b></p><p><b><span style="color: #38761d;"></span></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHOkBkC8tyOU_ywdtMnjhzCeMm5SVsefkKHc9xG0avbs2FNROM5Vcbt35lIo5hF3uTK4BnGsdsJ7HWEFx2qFTNyYaszx3-KKxTjnQc1mxbM9ECeJhebjnVfrFllTBa080hLZxYlBNXMamEAfGgDe0xPWSi5AsbtU7PHgvJHdbDoRacIfU3zA/s1320/Screen%20Shot%202022-09-07%20at%203.29.17%20PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="640" data-original-width="1320" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHOkBkC8tyOU_ywdtMnjhzCeMm5SVsefkKHc9xG0avbs2FNROM5Vcbt35lIo5hF3uTK4BnGsdsJ7HWEFx2qFTNyYaszx3-KKxTjnQc1mxbM9ECeJhebjnVfrFllTBa080hLZxYlBNXMamEAfGgDe0xPWSi5AsbtU7PHgvJHdbDoRacIfU3zA/w417-h202/Screen%20Shot%202022-09-07%20at%203.29.17%20PM.png" width="417" /></a></b></div><b><br /> </b><p></p><p><b> Hopefully one of it works. Leave comment if it does help</b></p><p><b><span style="color: #38761d;"><span style="color: black;">Thanks</span><br /></span></b></p><p><b><span style="color: #38761d;"><br /></span></b></p><p><b><span style="color: #38761d;"><br /></span></b></p><p><b><span style="color: #38761d;"> </span></b><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-64497581904169702582022-07-11T10:06:00.001-07:002022-07-11T10:06:10.201-07:00Temporary IAM credential for non AWS deployed application/ service - IAM Roles Anywhere<p> Tired of managing long term IAM credential for connecting to AWS service from external application? Challenged with managing client ID and secret? Your security team not comfortable you managing an credential for critical features?<br /></p><p> </p><p>Wait no more. </p><p><br /></p><p>Check out the new feature IAM roles anywhere which i have been missing all these years as managing long term IAM credential has always been an hassle and not secure.<br /></p><p><br /></p><p><a href="https://aws.amazon.com/blogs/security/extend-aws-iam-roles-to-workloads-outside-of-aws-with-iam-roles-anywhere/">https://aws.amazon.com/blogs/security/extend-aws-iam-roles-to-workloads-outside-of-aws-with-iam-roles-anywhere/</a></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-61832249501661278742022-02-22T20:04:00.001-08:002022-02-22T20:04:37.999-08:00AWS Amplify : Failed to pull sandbox app, reason: unable to get local issuer certificate<p><b><span style="color: #990000;"><u>Here is the scenario: </u></span></b></p><p>You are trying to pull Sandbox app from Amplify and complete data model using the command:</p><p><i><b>amplify pull --sandboxId "AppGUID."</b></i></p><p>and you get the error message :</p><p>"Failed to pull sandbox app: request to https://production.us-east-1.appstate.amplifyapp.com/AppState/"AppGUID" failed, <b><i>reason: unable to get local issuer certificate"</i></b></p><p><b><i><br /></i></b></p><p><b><u><span style="color: #990000;">The solution which generally works:</span></u></b></p><p><b><i>Log off company VPN</i></b> if you are connecting to your organization's VPN. You will find this solution when you google the error. Well, problem solved, RIGHT? </p><p>It worked for me, and I was able to pull the application to local with the complete data model.</p><b><u><span style="color: #990000;">Curious and Open Question :</span></u></b><p><a href="https://blogger.googleusercontent.com/img/a/AVvXsEglj2CLLuBctEg8Nf0O8HyFLf6zeJI-hlbvqoKTY-2Rd4Ow8Qhck8gKizzYR6PWCYlOWVNWC64EgBtnbf7XnU0XY-MsULyAnHzmqYz_JPj2pcC3deNE5UFWXg4GIgXnjgqipVxfyMkRFn-99YDVTY3JygyAqFtoQNeud_xxAG8JkcI_WyUtQQ=s121" imageanchor="1" style="font-weight: bold; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="100" data-original-width="121" height="46" src="https://blogger.googleusercontent.com/img/a/AVvXsEglj2CLLuBctEg8Nf0O8HyFLf6zeJI-hlbvqoKTY-2Rd4Ow8Qhck8gKizzYR6PWCYlOWVNWC64EgBtnbf7XnU0XY-MsULyAnHzmqYz_JPj2pcC3deNE5UFWXg4GIgXnjgqipVxfyMkRFn-99YDVTY3JygyAqFtoQNeud_xxAG8JkcI_WyUtQQ=w56-h46" width="56" /></a></p><p><b><u><span style="color: #990000;"><br /></span></u></b></p><p>But the question is why it even happened ????? Please read if you are curious and not just looking for an easy solution without knowing the actual cause. </p><p><br /></p><p><span style="color: #990000;"><u><b>Rationale:</b></u></span></p><p>I performed a few tests using OpenSSL to understand the complete communication between client and server. One of the simpler commands you can use is the -connect command:</p><p><i>openssl s_client -connect production.us-east-1.appstate.amplifyapp.com:443 </i></p><p>After reading the article below, I learned that the proxy servers don't perform automatic checks for certificate chaining like browsers do by using the AIA (Authority Information Access) field in the certificate. </p><p>refer to this article for intermediate certificate :<a href="https://blogs.cisco.com/security/where-is-my-intermediate-tls-certificate" target="_blank">https://blogs.cisco.com/security/where-is-my-intermediate-tls-certificate</a></p><p>The leading cause seems to missing intermediate certificates in the proxy server, hence the error "unable to get local issuer certificate." In the case of proxy servers, one solution is to import the missing certificates to the device certificate store to get it working.</p><p>Hope this explains the root cause of the issue, which is generic and not specific to only this scenario.</p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><div><br /></div><p><br /></p><p><br /></p><div><br /></div>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-1026450087624813272021-12-30T17:57:00.000-08:002021-12-30T17:57:57.975-08:00Mechanical Sympathy - Closing post 2021<p> </p><p><br /></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i>One of my techno-geek followers sent a note a few weeks back asking for updates on my last post for this year and asked about my favorite post. Unfortunately, I have not been actively blogging in 2021, said that I have been working offline with the engineering community actively on exploring new technologies. One of my favorites has been learning the machine learning area. I would like to thank all my fellow engineers for their collaboration and engagement over the years. </i></span></span></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i>As we move on to 2022, I thought of looking back for my favorite post over the years and this post beats all others and is still my favorite. </i></span></span></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i><br /></i></span></span></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i>Quote posted around four years back from Jackie Stewart "<a href="https://www.metahat.net/2018/03/mechanical-sympathy-learning-from-racing.html">https://www.metahat.net/2018/03/mechanical-sympathy-learning-from-racing.html</a>"</i></span></span></p><p><br /></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i>“You don’t have to be an engineer to be a racing driver, but you do have to have Mechanical Sympathy.” </i></span></span></p><p><i style="color: #262626; font-family: Georgia; font-size: 19px;">– Jackie Stewart, racing driver</i></p><p><span style="color: #262626; font-family: Georgia;"><span style="font-size: 19px;"><i><br /></i></span></span></p><p><i style="color: #262626; font-family: Georgia; font-size: 19px;">I wish all of you, Happy and Healthy New Year!!!</i></p><p><span style="color: #262626; font-family: Georgia;"><i><span style="background-color: white; font-size: 19px;"></span></i></span></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-37285755290780947642021-06-08T18:40:00.000-07:002021-06-08T18:40:12.844-07:00Why do we use np.random.seed()<p><br /></p><p>This is a simple function but to my surprise lot of ML engineers had asked me about the actual usage of this function and why do I use it when i am working on an algorithm which will be shared with other engineers. </p><p><br /></p><p>The simple answer is :</p><p>the function generates a random deterministic number. It generated the same random number each time for a specified seed </p><p><span style="font-size: large;">"It's a random function with deterministic output for a specified seed. This helps to share the code and get the same output each time. "</span></p><p><br /></p><p>Try this :</p><p><br /></p><p>np.random.seed(1)</p><p>np.random.randint(low = 1, high = 10, size = 20)</p><p><br /></p><p>The output will be, each time till seed is specified as "1" </p><pre style="background-color: white; border-radius: 0px; border: 0px; box-sizing: border-box; font-size: 14px; line-height: inherit; margin-bottom: 0px; margin-top: 0px; overflow-wrap: break-word; overflow: auto; padding: 1px 0px; vertical-align: baseline; white-space: pre-wrap; word-break: break-all;">array([6, 9, 6, 1, 1, 2, 8, 7, 3, 5, 6, 3, 5, 3, 5, 8, 8, 2, 8, 1])</pre><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-49143279614112587442021-02-11T14:12:00.000-08:002021-02-11T14:12:11.306-08:00Installing Octave in Ubuntu running on Docker <p></p><div>I want to run Octave on Ubuntu running on docker. Simple stuff but still manage to get errors and had to spend few minutes on fine-tuning </div><div><br /></div><div>Here it goes</div><div><br /></div><div>1- Start docket and get Ubuntu image from repo</div><div><span> - Couple of commands</span><br /></div><div><span><span> <span> </span><span> - docker pull ubuntu</span></span></span></div><div><span><span><span> - docker run -it ubuntu </span></span></span></div><div><span><span><span><br /></span></span></span></div><div><span><span><span><br /></span></span></span></div><div><span><span><span>2- Install Octave </span></span></span></div><div><span><span><span><span> - ran command "apt-get install octave" and here it goes error "Unable to locate package Octave"</span><br /></span></span></span></div><div> <div class="separator" style="clear: both; text-align: center;"><a href="https://lh3.googleusercontent.com/-Blp_R3YoLKo/YCWq6mI56hI/AAAAAAAABDY/SCIRosYhhNQZInJ-ui6PrigD6NCG2xMgQCLcBGAsYHQ/image.png" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="124" data-original-width="564" height="70" src="https://lh3.googleusercontent.com/-Blp_R3YoLKo/YCWq6mI56hI/AAAAAAAABDY/SCIRosYhhNQZInJ-ui6PrigD6NCG2xMgQCLcBGAsYHQ/image.png" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><br /></div>3- to come over this issue run below commands</div><div><span> - apt-get update</span><br /></div><div><span> - apt-get install octave </span></div><div><span><br /></span></div><div><span><br /></span></div><div>Done......</div><p></p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-64676589843708169962020-08-24T13:14:00.003-07:002020-08-24T13:16:37.428-07:00Integration Design Best Practice <p>Over the past few years of working on multiple critical systems solution design initiatives, there is one important thing I have learnt. </p><p>" There is a reason we call it solution design and not system design". With the influx of cloud offerings and services, the organization no more rely on one system to automate the business process. Rather business process now relies on multiple systems performing a very specific step of the business process. All these systems are integrated to provide business process automation. This makes integration, not one of the factors but a very critical backbone of the business process." </p><p>Nothing that I said is new and no one will disagree but unfortunately, integrations are still given less priority and design thought. </p><p>I keep getting one question all the time " <b><span style="color: red;">What are integration design best practices and how can I design a good reliable integration". </span></b> I have a long list of to-dos for designing good integration but sometimes being too prescriptive is not useful as it hinders a thinking ability of an architect. </p><p>So if you are still reading and curious to know how to design a good integration than there is only one fact you need to be aware of, this will influence your design decision and push you to design better integrations. </p><p><b><span style="color: #660000;">AND THAT IS </span></b></p><p><b></b></p><div class="separator" style="clear: both; text-align: center;"><b><a href="https://1.bp.blogspot.com/-GZncUnuVZtg/X0Qcdz9V6zI/AAAAAAAAA_A/f1mMew1BAw893s0vou_mVzLOly32wtY2gCLcBGAsYHQ/s1067/Fail.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="392" data-original-width="1067" height="118" src="https://1.bp.blogspot.com/-GZncUnuVZtg/X0Qcdz9V6zI/AAAAAAAAA_A/f1mMew1BAw893s0vou_mVzLOly32wtY2gCLcBGAsYHQ/w320-h118/Fail.PNG" width="320" /></a></b></div><b><span style="color: #660000;"><br /></span></b><p></p><p>Design with the above fact in mind and try to make your integration overcome failure and you will have a good design in place. Please don't spend time on developing integrations that will not fail. Such a design is purely a <span style="color: #2b00fe;"><b>myth</b>. </span></p><p>Now let's go one more level down, I have put down design pillars which will help to design the integration. These design pillars apply to any software development initiatives </p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-2XZHm7ZqFKg/X0QemUshntI/AAAAAAAAA_c/rjkPigtjNZ83c47fegm_iuGJG295WxFywCLcBGAsYHQ/s1139/Pillars.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="427" data-original-width="1139" height="150" src="https://1.bp.blogspot.com/-2XZHm7ZqFKg/X0QemUshntI/AAAAAAAAA_c/rjkPigtjNZ83c47fegm_iuGJG295WxFywCLcBGAsYHQ/w400-h150/Pillars.PNG" width="400" /></a></div><p><br /></p><p><br /></p><p><br /></p><p> </p><p><br /></p><p>if this is helpful, do leave our comment. I would love to hear your design learnings. </p>Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-48390004010498835682020-03-23T17:08:00.003-07:002020-03-23T17:08:50.869-07:00No supported authentication methods available (server sent: publickey)<div dir="ltr" style="text-align: left;" trbidi="on">
---------------------------<br />
PuTTY Fatal Error<br />
---------------------------<br />
PuTTY Fatal Error Disconnected: No supported authentication methods available (server sent: publickey)<br />
---------------------------<br />
<br />
<br />
<b>Scenario : </b><br />
Error while connecting to AWS AMI Instance using PuTTy.<br />
<br />
<br />
<b>Solution:</b><br />
in my case "admin" user worked.<br />
<a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingPuTTY">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingPuTTY</a></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-9649978067837222020-03-21T20:54:00.001-07:002020-03-21T20:54:19.668-07:00Docker Error :In the default daemon configuration on Windows, the docker client must be run elevated to connect<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/auth: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.</h2>
<div>
<br /></div>
<div>
<br /></div>
<div>
Fix :</div>
<div>
Try one of these:</div>
<div>
<br /></div>
<div>
First :<a href="https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message">https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message</a></div>
<div>
<br /></div>
<div>
Second:</div>
<div>
Dun docker service with elevated privilege. This error shows up when docker service is not running. Make sure you docker dashboard shows as "running"</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-8JDvxbevuJM/XnbhUUH-C3I/AAAAAAAAA78/dzZ-UiR5JwIX-vbGldKPOpNtSWZ1OG9KQCLcBGAsYHQ/s1600/docker.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="903" data-original-width="585" height="320" src="https://1.bp.blogspot.com/-8JDvxbevuJM/XnbhUUH-C3I/AAAAAAAAA78/dzZ-UiR5JwIX-vbGldKPOpNtSWZ1OG9KQCLcBGAsYHQ/s320/docker.PNG" width="207" /></a></div>
<div>
<br /></div>
</div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-73879555522409485312020-02-17T17:23:00.005-08:002020-02-17T17:23:53.293-08:00Guide for AWS Cloud Security, Governance, and Compliance<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-size: small;"><span style="font-weight: normal;">A really good collection to learn and understand basic of</span> AWS Cloud Security, Governance, and Compliance</span></h2>
<div>
<span style="font-size: small;"><br /></span></div>
<div>
<a href="https://d1.awsstatic.com/training-and-certification/ramp-up-guides/RampUp_Security_102019_final.pdf">https://d1.awsstatic.com/training-and-certification/ramp-up-guides/RampUp_Security_102019_final.pdf</a></div>
</div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-67774186644837941182020-02-17T17:18:00.000-08:002020-02-17T17:18:15.922-08:00Could not switch roles using the provided information. Please check your settings and try again. If you continue to have problems, contact your administrator.<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-size: small;">Could not switch roles using the provided information. Please check your settings and try again. If you continue to have problems, contact your administrator.</span></h2>
<div>
<span style="font-size: small;"><br /></span></div>
<div>
<span style="font-size: small;">If you get this error than there is a big probability the user has no permission to assume a role. Add a new policy to user to allow assuming roles. check the below article:</span></div>
<div>
<a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html">https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_permissions-to-switch.html</a></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
if it doesn't work leave a comment. </div>
<div>
<span style="font-size: small;"><br /></span></div>
<div>
<span style="font-size: small;"><br /></span></div>
<div>
<span style="font-size: small;"><br /></span></div>
</div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-87211350098272043482020-02-16T14:41:00.000-08:002020-02-16T14:41:00.992-08:00ECS Fargate ERROR : CannotPullContainerError: Error response from daemon<div dir="ltr" style="text-align: left;" trbidi="on">
Last week i was asked to look into an issue faced by the team working on a service deployed in ECS Fargate<br />
<br />
<h2 style="text-align: left;">
<span style="font-size: small;"><b>ERROR</b><b><br /></b></span></h2>
<h2 style="text-align: left;">
<span style="font-size: small;">CannotPullContainerError: Error response from daemon: Get https://xxxxxxxxxxxx.dkr.ecr.us-east-x.amazonaws.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)</span></h2>
<div style="text-align: left;">
<br /></div>
<br />
Details:<br />
The container service was failing to provision and stopping with the above error.<br />
<br />
<br />
Possible Reasons:<br />
The error indicated that the container is failing during "Pull" event and in this case, the only pull request which is configured is for the docker image maintained in ECS registry. <br />
<br />
Most of the times such issue occurs due to lack of access and this case was no different.. There are two possible ares to look at for enabling Fargate resource deployed in private subnet to pull image from ECS registry<br />
<br />
<br />
<ul style="text-align: left;">
<li>If task is launched without an public IP, its it required to configure route table on the subnet with has "0.0.0.0/0" going to a NAT Gateway or NAT instance . This is to ensure it can connect to internet. If task is launched with an public IP, configure route table on the subnet to have "0.0.0.0/0" going to an internet gateway to ensure traffic can flow in.</li>
</ul>
<br />
<br />
<ul style="text-align: left;">
<li>Ensure the security groups for the Task allows for outbound access. </li>
</ul>
<div>
<br /></div>
<div>
if internet access is a concern than another option is to deploy registry inside VPC.</div>
<div>
Here is link for one of the option </div>
<div>
<a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/vpc-endpoints.html">https://docs.aws.amazon.com/AmazonECS/latest/developerguide/vpc-endpoints.html</a></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
<br />
<br />
<br /></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-83113969139377761582020-01-23T22:48:00.001-08:002020-02-17T17:19:04.108-08:00OAUTH 2.0 in less than 5 min<div dir="ltr" style="text-align: left;" trbidi="on">
As you had requested, here is a short video on OAUTH 2.0. More to come stay tuned.<br />
<br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/rkR86JIXHMQ" width="480"></iframe><br />
<br />
<br /></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-19563745417597942122020-01-08T13:18:00.001-08:002020-01-08T13:18:10.816-08:00GITLAB commands - High Frequency<div dir="ltr" style="text-align: left;" trbidi="on">
I always notice the developers struggling to get the command line right for GIT. I was planning to put together list of frequently used command but came across cheatsheet put by GitLab<br />
<br />
<a href="https://about.gitlab.com/images/press/git-cheat-sheet.pdf">https://about.gitlab.com/images/press/git-cheat-sheet.pdf</a><br />
<br />
If you feel there are more which is good to have handy, just write a comment.<br />
<br />
Happy Versioning!!!<br />
<br /></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-11805837463345338452020-01-07T11:18:00.000-08:002020-01-07T11:18:43.940-08:00T and Z in DateTime like 2009-08-28T23:55:16.000Z<div dir="ltr" style="text-align: left;" trbidi="on">
A very simple question for a person who codes(hopefully) but for business users this can be very confusing.<br />
<br />
<i><u>What do you mean by below DateTime</u></i><br />
<br />
<b>2009-08-28T23:55:16.000Z</b><br />
<br />
<b><u>Lets explain this </u></b><br />
<br />
ISO 8601 (The International Standard for the representation of dates and times)<br />
states the following definition<br />
<br />
The "T" corresponds to Time of the date(Duhh... no brainer) and "Z" is special UTC designator<br />
<br />
So the DateTime 2009-08-28T23:55:16.000Z states<br />
<br />
<b>Date</b> as 2009-08-28<br />
<b>Time</b> as 23:55:16.000<br />
<b>"Z"</b> stands for UTC<br />
<br />
The above time can be also be represnted in EST as<br />
2009-08-28T23:55:16-05:00 (EST) where -05:00 is Timezone offset<br />
<br />
<br />
Happy coding!!!<br />
<br />
- Metahat<br />
<br />
<br /></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-51854161299999943882019-11-07T16:54:00.002-08:002019-11-07T16:56:53.902-08:00Parsing Log/Text files <div dir="ltr" style="text-align: left;" trbidi="on">
One of the team member was looking for ways to parse through logs to find errors in a big dump of files. I had to go to basics to get the results<br />
<div>
<br /></div>
<div>
Problem Statement: Find all the entries for "Error" and "failed" in big dump of CSV/Log files. </div>
<div>
<br /></div>
<div>
Solution: Old school technique ( Use Log parser)<br />
<br />
<b><i>run below commands </i></b></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<b><i>C:\Program Files (x86)\Log Parser 2.2>LOGPARSER "Select Text INTO ERROR.csv from</i></b><br />
<b><i> D:\xyz\*.log* where Text like '%ERROR%'" -i:TEXTLINE -q:Off</i></b><br />
<br />
Statistics:<br />
-----------<br />
Elements processed: 14128022<br />
Elements output: 9845<br />
Execution time: 81.36 seconds (00:01:21.36)<br />
<br />
<b><i><br /></i></b>
<b><i>C:\Program Files (x86)\Log Parser 2.2>LOGPARSER "Select Text INTO failed.csv fro</i></b><br />
<b><i>m D:\xyz\*.log* where Text like '%failed%'" -i:TEXTLINE -q:Off</i></b><br />
<br />
Statistics:<br />
-----------<br />
Elements processed: 14128022<br />
Elements output: 2025<br />
Execution time: 76.43 seconds (00:01:16.43)</div>
</div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-60263399313956179402019-05-27T11:49:00.000-07:002019-05-27T11:49:19.616-07:00 Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Error when installing NPM</b><br />
<br />
Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.<br />
<br />
<br />
<br />
<b>Fix:</b><br />
<b>Run command and try again</b><br />
<span style="color: #6a737d; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px;">touch ~/.bash_profile </span><br />
<br />
<br />
<b>Reason</b><br />
<br />
<a href="https://github.com/nvm-sh/nvm/issues/1837">https://github.com/nvm-sh/nvm/issues/1837</a><br />
<br />
<span style="color: #6a737d; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px;">your system may not have a [.bash_profile file] where the command is set up. Simply create one with touch ~/.bash_profile and run the install script again</span><br />
<pre style="background-color: #f6f8fa; border-radius: 3px; box-sizing: border-box; color: #6a737d; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; line-height: 1.45; overflow-wrap: normal; overflow: auto; padding: 16px;"><code style="background: transparent; border-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 11.9px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;">you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry."</code></pre>
</div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0tag:blogger.com,1999:blog-34081484.post-19793064154293666182019-05-26T17:23:00.000-07:002019-05-26T17:23:32.470-07:00Maven tool is not set in Jenkins pipeline<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-size: large;">Maven tool is not set in Jenkins pipeline</span><br />
<br />
<br />
<b>Scenario</b><br />
Error when building the Jenkins pipeline (Pipeline project style)<br />
<br />
Error snippet:<br />
+ mvn clean package<br />
/var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: 1: /var/jenkins_home/workspace/atmosphere pipeline/spring-boot-samples/spring-boot-sample-atmosphere@tmp/durable-7c163949/script.sh: <span style="color: red;"><b>mvn: not found</b></span><br />
<span style="color: red;"><b><br /></b></span>
<br />
<b>Solution</b><br />
Use the below script to refer to Maven<br />
<br />
<br />
<b><span style="color: #38761d;">node</span><span style="color: #93c47d;"> </span></b><br />
<span style="color: #b45f06;"><br /></span>
<span style="color: #b45f06;">{</span><br />
<span style="color: #38761d;"><b>def</b></span><span style="color: #b45f06;"> mvn_version = '<nameofmaven_set_under_jenkins_manage _="" configuration="" global="" jenkins="" tool="">'</nameofmaven_set_under_jenkins_manage></span><br />
<span style="color: #b45f06;"> </span><br />
<span style="color: #38761d;"><b>withEnv</b></span><span style="color: #b45f06;">( ["PATH+MAVEN=${</span><span style="color: #38761d;"><b>tool </b></span><span style="color: #b45f06;">mvn_version}/bin"] ) </span><br />
<span style="color: #b45f06;"> { </span><br />
<span style="color: #b45f06;"> </span><span style="color: #38761d;"><b> sh </b></span><span style="color: #b45f06;"> 'mvn clean package'</span><br />
<span style="color: #b45f06;"> }</span><br />
<span style="color: #b45f06;"><br /></span>
<span style="color: #b45f06;">}</span><br />
<br />
<br />
Image of Jenkins Home ->Manage Jenkins ->Global Tool Configuration<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-bZ-h4vbIg-Q/XOstAbI7mSI/AAAAAAAAA0Q/jS9-grtus38rn-QT_7CDpywkBd8K4OD6wCLcBGAs/s1600/build.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="1419" src="https://1.bp.blogspot.com/-bZ-h4vbIg-Q/XOstAbI7mSI/AAAAAAAAA0Q/jS9-grtus38rn-QT_7CDpywkBd8K4OD6wCLcBGAs/s1600/build.PNG" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
FOR FREESTYLE PROJECT ( REFER TO <a href="http://www.metahat.net/2019/05/cannot-run-program-mvn-in-directory.html" target="_blank">MAVEN ERROR</a>)</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br /></div>
Rags Iyerhttp://www.blogger.com/profile/14307129407990925912noreply@blogger.com0