<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aws on David Lang</title>
    <link>https://www.davidlang.tech/tags/aws/</link>
    <description>Recent content in Aws on David Lang</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 16 Nov 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.davidlang.tech/tags/aws/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Using dynamic SQL query in Redshift database</title>
      <link>https://www.davidlang.tech/posts/using-sql-dynamic-queries-in-redshift-database/</link>
      <pubDate>Thu, 16 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/using-sql-dynamic-queries-in-redshift-database/</guid>
      <description>&lt;p&gt;While working with a client, we had a requirement to perform bulk insert/update using &lt;strong&gt;&lt;a href=&#34;https://docs.retool.com/docs/working-with-tables&#34;&gt;Retool table&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href=&#34;https://aws.amazon.com/redshift/&#34;&gt;Redshift database&lt;/a&gt;&lt;/strong&gt;. For this situation, We had to loop through the table records and execute a dynamic SQL query in Redshift.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Redshift database&lt;/strong&gt; supports execution of &lt;strong&gt;dynamic SQL&lt;/strong&gt; with the help of &lt;strong&gt;Prepared Statements&lt;/strong&gt; or &lt;strong&gt;Stored Procedures&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prepared-statements&#34;&gt;Prepared Statements&lt;/h2&gt;&#xA;&lt;p&gt;We use prepared statements when we want to execute dynamic SQL queries directly without a stored procedure. When a prepared statement is executed, the SQL statement is parsed, rewritten, and planned. We then &lt;strong&gt;EXECUTE&lt;/strong&gt; the prepared statement.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passing AWS Solutions Architect Associate 2020 Exam</title>
      <link>https://www.davidlang.tech/posts/tips-and-resources-passing-cloud-aws-solutions-architect-associate-2020-exam/</link>
      <pubDate>Sun, 03 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/tips-and-resources-passing-cloud-aws-solutions-architect-associate-2020-exam/</guid>
      <description>&lt;p&gt;Last week I finally took a plunge and decided to take the &lt;strong&gt;&lt;a href=&#34;https://aws.amazon.com/certification/certified-solutions-architect-associate/&#34;&gt;AWS Solutions Architect 2020 - Associate&lt;/a&gt;&lt;/strong&gt; exam. I passed the exam with a score of &lt;strong&gt;&lt;a href=&#34;https://www.certmetrics.com/amazon/public/badge.aspx?i=1&amp;amp;t=c&amp;amp;d=2020-03-14&amp;amp;ci=AWS01122340&#34;&gt;926 / 1000&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I have been working in the cloud space for more than 5 years, but never got the interest in taking the exam. While having a chat with a friend, he told me that he cleared 4 to 5 AWS certifications including AWS Solutions Architect - Professional. That piqued my interest and decided to start with AWS Solutions Architect - Associate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Serverless Architecture with AWS Lambda</title>
      <link>https://www.davidlang.tech/posts/serverless-architecture-with-aws-lambda/</link>
      <pubDate>Tue, 03 May 2022 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/serverless-architecture-with-aws-lambda/</guid>
      <description>&lt;p&gt;Serverless lets you run code without provisioning servers. AWS Lambda executes functions in response to HTTP, queue, or schedule events-you pay per invocation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;handler-example&#34;&gt;Handler Example&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exports.handler &lt;span style=&#34;color:#719e07&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#268bd2&#34;&gt;async&lt;/span&gt; (event) =&amp;gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#268bd2&#34;&gt;const&lt;/span&gt; body &lt;span style=&#34;color:#719e07&#34;&gt;=&lt;/span&gt; JSON.parse(event.body &lt;span style=&#34;color:#719e07&#34;&gt;||&lt;/span&gt; &lt;span style=&#34;color:#2aa198&#34;&gt;&amp;#39;{}&amp;#39;&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#268bd2&#34;&gt;const&lt;/span&gt; result &lt;span style=&#34;color:#719e07&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#268bd2&#34;&gt;await&lt;/span&gt; processOrder(body);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#719e07&#34;&gt;return&lt;/span&gt; {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    statusCode&lt;span style=&#34;color:#719e07&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#2aa198&#34;&gt;200&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    headers&lt;span style=&#34;color:#719e07&#34;&gt;:&lt;/span&gt; { &lt;span style=&#34;color:#2aa198&#34;&gt;&amp;#39;Content-Type&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#719e07&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#2aa198&#34;&gt;&amp;#39;application/json&amp;#39;&lt;/span&gt; },&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    body&lt;span style=&#34;color:#719e07&#34;&gt;:&lt;/span&gt; JSON.stringify(result),&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  };&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;};&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;architecture-patterns&#34;&gt;Architecture Patterns&lt;/h2&gt;&#xA;&lt;p&gt;API Gateway + Lambda for REST endpoints. S3 triggers for image processing. EventBridge for scheduled jobs. Keep functions small and cold-start aware-choose appropriate memory and runtime (Node 20).&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS for Full Stack Developers: Core Services</title>
      <link>https://www.davidlang.tech/posts/aws-for-full-stack-developers-core-services/</link>
      <pubDate>Fri, 10 Sep 2021 00:00:00 +0000</pubDate>
      <guid>https://www.davidlang.tech/posts/aws-for-full-stack-developers-core-services/</guid>
      <description>&lt;p&gt;Amazon Web Services powers a large share of production full stack apps. Knowing a focused subset of services beats memorizing the entire catalog.&lt;/p&gt;&#xA;&lt;h2 id=&#34;essential-services&#34;&gt;Essential Services&lt;/h2&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Service&lt;/th&gt;&#xA;          &lt;th&gt;Use case&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;EC2 / ECS / Lambda&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Compute&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;S3&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Static assets, uploads&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;RDS / DynamoDB&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Databases&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;CloudFront&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;CDN&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;IAM&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Permissions&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Route 53&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;DNS&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;a-typical-architecture&#34;&gt;A Typical Architecture&lt;/h2&gt;&#xA;&lt;p&gt;React on S3 + CloudFront, API on ECS Fargate or Lambda behind API Gateway, PostgreSQL on RDS, secrets in Secrets Manager, logs in CloudWatch.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
