<?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: Dilusha Rasanjana</title>
    <description>The latest articles on DEV Community by Dilusha Rasanjana (@dilusha_rasanjana).</description>
    <link>https://dev.to/dilusha_rasanjana</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%2F3005664%2F7e21af2b-ab02-45ca-9efb-ceeabd46d2fa.jpg</url>
      <title>DEV Community: Dilusha Rasanjana</title>
      <link>https://dev.to/dilusha_rasanjana</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dilusha_rasanjana"/>
    <language>en</language>
    <item>
      <title>AWS Certificate Manager Introduced Exportable Public Certificates</title>
      <dc:creator>Dilusha Rasanjana</dc:creator>
      <pubDate>Sun, 22 Jun 2025 16:31:33 +0000</pubDate>
      <link>https://dev.to/dilusha_rasanjana/aws-certificate-manager-introduced-exportable-public-certificates-2mgc</link>
      <guid>https://dev.to/dilusha_rasanjana/aws-certificate-manager-introduced-exportable-public-certificates-2mgc</guid>
      <description>&lt;p&gt;It is a big news.....&lt;/p&gt;

&lt;p&gt;AWS certificate manager now supports export public certificates issued by AWS. Earlier it was a big issue that aws issued public certificates cannot export and use in other compute workload.&lt;/p&gt;

&lt;p&gt;Now when we creating a public certificate using aws certificate manager it ask do we need to create a exportable one or non exportable one.&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%2F01sj79ch3f9p4aqjjxb7.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%2F01sj79ch3f9p4aqjjxb7.png" alt="Image description" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is supported to export certificate body, certificate chain and certificate private key. Therefore, we can use certificate’s private key to securely terminate TLS traffic on any compute workload such as EC2, containers, on premises servers and other cloud providers.&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%2F6a65uqzxq6ods41vzsoa.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%2F6a65uqzxq6ods41vzsoa.png" alt="Image description" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Exportable public certificate(FQDN) - 15$&lt;/li&gt;
&lt;li&gt;Exportable public certificate (Per wildcard name) - 149$&lt;/li&gt;
&lt;li&gt;First 10K API calls of export-certificate - free of charge&lt;/li&gt;
&lt;li&gt;After that each 10K API calls of export- certificate - 0.50$&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Valid Period
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;These certificates are valid for 13 months.&lt;/li&gt;
&lt;li&gt;After 11 month of period ACM renews certificates (60 days before expiration)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Follow me for more articles. Stay Connect with me on linkedin &lt;a href="https://www.linkedin.com/in/dilusha-rasanjana/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/dilusha-rasanjana/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>acm</category>
      <category>certificatemanager</category>
      <category>networking</category>
    </item>
    <item>
      <title>AWS Client VPN with Mutual Authentication</title>
      <dc:creator>Dilusha Rasanjana</dc:creator>
      <pubDate>Sun, 22 Jun 2025 12:34:26 +0000</pubDate>
      <link>https://dev.to/dilusha_rasanjana/aws-client-vpn-with-mutual-authentication-3p8g</link>
      <guid>https://dev.to/dilusha_rasanjana/aws-client-vpn-with-mutual-authentication-3p8g</guid>
      <description>&lt;p&gt;AWS Client VPN is a managed VPN service that allows users to securely access AWS resources and on-premises networks. Recently, I had to set one up for a customer. In this guide I will explain all the steps to create an aws client vpn with mutual authentication and access an EC2 using client vpn.&lt;/p&gt;

&lt;p&gt;I'm using following basic aws network architecture to act as an application environment. Here I am using multi az architecture but it is not a must. You can proceed with a single az architecture.&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%2Fsx5snz6n3gkelt7fm8n1.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%2Fsx5snz6n3gkelt7fm8n1.png" alt="AWS Network Architecture" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;AWS account with basic VPC, subnet configurations.&lt;/li&gt;
&lt;li&gt;AWS and Client network must not having overlapping CIDR.&lt;/li&gt;
&lt;li&gt;AWS EC2 in a private subnet for test connection. (act as application EC2)&lt;/li&gt;
&lt;li&gt;Local server connected to a private network.(In this lab I'm using a windows EC2 in 172.20.0.0/16 VPC in another account. It represents a local machine in a private network. )&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For this Lab, I'm using 10.0.0.0/16 as AWS VPC CIDR and 172.20.0.0/16 as client side CIDR.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Create Client VPN Subnets and Security Groups&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;First I'm creating two aws private subnets representing in two availability zones to associate with client vpn endpoint in the next steps. I created that subnets with 10.0.128.0/20 and 10.0.144.0/20 because I have big IP range. You can select it align with your IP plan. Then create a route table with just local route and attach it to these subnets.&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%2Fi5xat9wxjfddjfp12mne.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%2Fi5xat9wxjfddjfp12mne.png" alt="Image description" width="800" height="364"&gt;&lt;/a&gt;&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%2F0ibtq6fyigp6dhwmcmtx.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%2F0ibtq6fyigp6dhwmcmtx.png" alt="Image description" width="800" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then create a security group without adding any inboud rule and allowing all outbound traffic. This security group use as client vpn endpoint security group in the next steps.&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%2Fsx07ayklk6afmbqy9ptt.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%2Fsx07ayklk6afmbqy9ptt.png" alt="Image description" width="800" height="241"&gt;&lt;/a&gt;&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%2Fj5w2gscvy2ecoqponui2.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%2Fj5w2gscvy2ecoqponui2.png" alt="Image description" width="800" height="133"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we need to add a inbound rule to application ec2 security group which we created earlier in prerequisites section. Add a inbound rule to allow all the traffic from client vpn security group which we created last step. &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%2Fn6sbchruknin5ll2dw70.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%2Fn6sbchruknin5ll2dw70.png" alt="Image description" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Create Client and Server Certificates&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In this lab I'm using mutual authentication for authenticate users connect users to client vpn. Therefore, we need to create client and server certificates. For that I'm using EasyRSA.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clone the OpenVPN easy-rsa repo to our local computer
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/OpenVPN/easy-rsa.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Move to the easy-rsa/easyrsa3 folder
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd easy-rsa/easyrsa3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Initialize a new PKI environment - It sets up the foundational directory structure and tracking system for your new Certificate Authority
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./easyrsa init-pki
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;build a new certificate authority (CA)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./easyrsa build-ca nopass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate the server certificate and key
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./easyrsa --san=DNS:server build-server-full server nopass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate the client certificate and key.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./easyrsa build-client-full client1.domain.tld nopass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then copy the server certificate and key and the client certificate and key to a custom folder(in this lab client-vpn). Use following commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir ~/client-vpn/
cp pki/ca.crt ~/client-vpn/
cp pki/issued/server.crt ~/client-vpn/
cp pki/private/server.key ~/client-vpn/
cp pki/issued/client1.domain.tld.crt ~/client-vpn
cp pki/private/client1.domain.tld.key ~/client-vpn/
cd ~/client-vpn/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that import these client and server certificates to AWS ACM. For this lab I'm using aws cli to import certificates to certificate manager. You can use aws cli with &lt;code&gt;aws configure&lt;/code&gt; command and access keys.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws acm import-certificate --region &amp;lt;client vpn creating region&amp;gt; --certificate fileb://server.crt --private-key fileb://server.key --certificate-chain fileb://ca.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws acm import-certificate --region &amp;lt;client vpn creating region&amp;gt; --certificate fileb://client1.domain.tld.crt --private-key fileb://client1.domain.tld.key --certificate-chain fileb://ca.crt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2F612ox3tp8f0edr5r5r3l.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%2F612ox3tp8f0edr5r5r3l.png" alt="Image description" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Create Client VPN Endpoint&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now we have completed all the dependencies that need to create AWS Client VPN Endpoint. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the first section of client vpn endpoint creation, we need to add &lt;strong&gt;client IPv4 CIDR&lt;/strong&gt;. This CIDR must be within /12 and /22. In this lab our client CIDR is 172.20.0.0/16.&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%2Fzl4f3grhxxx121yg7u3s.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%2Fzl4f3grhxxx121yg7u3s.png" alt="Image description" width="800" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the authentication information section, first select server certificate that we have imported to certificate manager. For authentication options, select use mutual authentication. Then select client certificate that we have imported to certificate manager.&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%2F34sxoh6konw79sc3cmjm.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%2F34sxoh6konw79sc3cmjm.png" alt="Image description" width="800" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connection logging and Client connect handler is not necessary to enable for this lab.&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%2Flzbe23r8rlzxwjxihpiz.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%2Flzbe23r8rlzxwjxihpiz.png" alt="Image description" width="781" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In other parameters section I'm choosing TCP as the transport protocol and enable split tunnel. Split tunnel is very useful to route only traffic that's destined for the VPC (172.20.0.0/16) over the Client VPN tunnel. Traffic that's destined for on-premises resources or internet is not routed over the Client VPN tunnel. Then select our application vpc in the VPC ID section and select client vpn security group that we created in earlier steps.&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%2F8k5s99thqh6tj3pffmfg.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%2F8k5s99thqh6tj3pffmfg.png" alt="Image description" width="800" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then create Client VPN Endpoint.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Target Network Association&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now we can see our client vpn endpoint is create but it is still in pending associate state. We need to associate subnets that we created for client vpn. For that, move to target network association section in the client vpn endpoint options.&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%2Fiy2o2d1tag5tsmcy1drb.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%2Fiy2o2d1tag5tsmcy1drb.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then select associate target network and add vpc and subnet. We should add two subnets as two associations.&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%2Ftmghxssfmsm20dra2y24.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%2Ftmghxssfmsm20dra2y24.png" alt="Image description" width="800" height="228"&gt;&lt;/a&gt;&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%2Fw4bme2hfy23pojv0408u.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%2Fw4bme2hfy23pojv0408u.png" alt="Image description" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It will take few minutes to associate subnets and change state from pending associate to available state.&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%2Ft2hbtcc3yfmdi9sbvqlu.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%2Ft2hbtcc3yfmdi9sbvqlu.png" alt="Image description" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Authorization Rules&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now our client vpn endpoint is in available state. In this step we should authorization rules. For that move to authorization rule tab and add authorization rule. Add application VPC CIDR as destination network and select Allow access to all users.&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%2Fpt7d7g8bj4jndqrdqy9x.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%2Fpt7d7g8bj4jndqrdqy9x.png" alt="Image description" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have successfully created client vpn endpoint. Then download client configuration file to your local machine. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Configure OpenVPN&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Use below url to download open vpn software to your local machine and install it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.tourl"&gt;https://openvpn.net/client/&lt;/a&gt;&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%2F96tekmzpx63sob43ji8b.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%2F96tekmzpx63sob43ji8b.png" alt="Image description" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then copy following files to a directory in your local machine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;client1.domain.tld.crt (created earlier)&lt;/li&gt;
&lt;li&gt;client1.domain.tld.key (created earlier)&lt;/li&gt;
&lt;li&gt;downloaded-client-config.ovpn (downloaded from the aws console)&lt;/li&gt;
&lt;/ol&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%2Flyl0xxtsnhoi54iw8s2d.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%2Flyl0xxtsnhoi54iw8s2d.PNG" alt="Image description" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then open client configuration file and add following lines.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cert /path/to/client1.domain.tld.crt
key /path/to/client1.domain.tld.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modify the endpoint dns name by adding random prefix. Modified configuration file should be previewed as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;client
dev tun
proto tcp
remote test.cvpn-endpoint-00d4ab3a058dab099.prod.clientvpn.us-east-1.amazonaws.com 443
remote-random-hostname
resolv-retry infinite
nobind
remote-cert-tls server
cipher AES-256-GCM
verb 3
cert C:/Users/Administrator/Desktop/client-vpn/client1.domain.tld.crt
key C:/Users/Administrator/Desktop/client-vpn/client1.domain.tld.key
&amp;lt;ca&amp;gt;
-----BEGIN CERTIFICATE-----
MIIDXTCCAkWgAwIBAgIUIATgMiViFxGskuHn1fYH2SoseKMwDQYJKoZIhvcNAQEL
BQAwHDEaMBgGA1UEAwwRZHJ0ZWNoLWNsaWVudC12cG4wHhcNMjUwNjIyMDE0NDEy
WhcNMzUwNjIwMDE0NDEyWjAcMRowGAYDVQQDDBFkcnRlY2gtY2xpZW50LXZwbjCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALkiFl3yn637L0TKzQdXavXX
9kT42MYSbxYRMhgY8B6KosJUGFQYWHTkz512PIgC6ijdPzCgcrwwL2op/Y8vmIHl
xe+FQ6QDDmXLTUEoOb/aK1C0q/VVQrKDfQVgKcG2xTKzhE1BHJRUUfMoJC4qA+9r
W/O2aiqnHJAu+KwUZc8vBnH7n/Sw24qYVq2GzLcmmTN5MvmYzSNe2lS5eMmi5/14
Bp2JtChCnioJ6lSRKodJosNTfcEULgmtl2RNue5BKiNwkQLsLnRGPepnTCsqNnN7
ZuE3opMWsvgfRq19rHdoRBGRfSpdyGSPvd9VrLlqGN1PoZgmHAKK0I8nXlVHAqzf
kKrJ9jNVboARJmLRgZ0t+4iuWAJHeVs3Swa0CeDM0p2LUVX1kPRoYxT04cG70UDL
wOavHAOwZYvaAWZaRPKXUr9bHWtL/gxkMWje7mm6RdAYkIXzl49Ax3ZJy1+dng4R
TOQdK56+iYgtArZZJtSJK2zmZjNyO6LUV9x0PTK2jZz8GEAIsOkvl8Ga8ZlwDN1t
nmaGFv3urzadECJAO9mtXGU+UDuXz7Wh4+5QotU2/Xn7dcBZ7HU0zVUvddbxlGvO
9w==
-----END CERTIFICATE-----

&amp;lt;/ca&amp;gt;


reneg-sec 0

verify-x509-name server name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Connect to AWS Client VPN&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Open installed client VPN software and move to upload file section. Then drag and drop or upload the modified configurations file to openvpn software. Then connect it.&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%2Fj2djv582zfn0nm3jbnb3.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%2Fj2djv582zfn0nm3jbnb3.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Connectivity Check&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now we have connected to AWS environment with client vpn connection. For check the connectivity, I'm trying SSH to application EC2. &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%2Fx52mefmtk6k2ai9itx08.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%2Fx52mefmtk6k2ai9itx08.PNG" alt="Image description" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article you have learned to connect aws resources using aws client vpn with mutual authentication method. My next article will be the same use case with active directory authentication. &lt;/p&gt;

&lt;p&gt;Follow me for more articles. Stay Connect with me on linkedin &lt;a href="https://www.linkedin.com/in/dilusha-rasanjana/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/dilusha-rasanjana/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>clientvpn</category>
      <category>networking</category>
      <category>drtech</category>
    </item>
    <item>
      <title>AWS ECR with Endpoints - Access Errors</title>
      <dc:creator>Dilusha Rasanjana</dc:creator>
      <pubDate>Sat, 10 May 2025 13:18:29 +0000</pubDate>
      <link>https://dev.to/dilusha_rasanjana/aws-ecr-with-endpoints-access-errors-4k5j</link>
      <guid>https://dev.to/dilusha_rasanjana/aws-ecr-with-endpoints-access-errors-4k5j</guid>
      <description>&lt;p&gt;The AWS Elastic Container Registry (ECR) is a fully managed Docker container registry that makes it easy for developers to share and deploy container based applications. So consider it a safe and scalable repository for Docker container images. In this followup i will point out a few points you should be aware of before using ECR.&lt;/p&gt;

&lt;p&gt;When we store a image in amazon ECR repository, amazon will store that images at backend using S3 bucket. This S3 bucket is unique for each region. This does not affect our AWS architecture until we make use of AWS endpoints to reach ECR or S3 buckets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. When our architecture designed to restrict internet access,&lt;/strong&gt;&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%2Fx7j2yx02htr9j10b68w6.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%2Fx7j2yx02htr9j10b68w6.png" alt="Application without Internet" width="601" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to create AWS interface endpoint for access ECR and interface/gateway endpoint to access S3 bucket that images are actually saved. If we use a specific endpoint policy to restrict access, S3 bucket ARN must be allowed in it. The following is the Amazon Resource Name (ARN) of the Amazon S3 bucket containing the layers for each Docker image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arn:aws:s3:::prod-&amp;lt;region&amp;gt;-starport-layer-bucket/*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE : You must update region name in the bucket arn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. When our architecture has one or more private S3 buckets and VPC has internet access,&lt;/strong&gt;&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%2Fs1uopyj8ghwoimucvhzn.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%2Fs1uopyj8ghwoimucvhzn.png" alt="Application with private S3 buckets" width="601" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now because we have an internet connection you can make your own decision, if an interface endpoint is required to access ECR in this particular case. It is optional. &lt;/p&gt;

&lt;p&gt;However, we have to add interface/gateway endpoint, to access private S3 buckets. If we are using endpoint policy to restrict access, ECR image storing s3 bucket ARN should be allowed in endpoint policy. Otherwise, ECR will return errors when trying to work with ECR repositories. Refer to the following example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to pull image "123456789.dkr.ecr.ap-southeast-1.amazonaws.com/ecr_repo:1.1": failed to pull and unpack image "123456789.dkr.ecr.ap-southeast-1.amazonaws.com/ecr_repo:1.1": failed to copy: httpReadSeeker: failed open: unexpected status code https://123456789.dkr.ecr.ap-southeast-1.amazonaws.com/ecr_repo/blobs/sha256:7fa43ee6781f1f46033bd360df783c66897d544d2aafceec4f55b1ebd2497eee : 403 Forbidden
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can use the following policy to restrict the access to s3 bucket.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
        "Version": "2008-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Principal": {
                    "AWS": "*"
                },
                "Action": "*",
                "Resource": [ "arn:aws:s3:::prod-&amp;lt;regeion name&amp;gt;-starport-layer-bucket/*",
                              "&amp;lt;your-s3-bucket-arn&amp;gt;" ]

            }
        ]
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE : You must update region name in the bucket arn.&lt;/p&gt;

&lt;p&gt;These two use cases will help you to build applications using both AWS EKS and ECS.&lt;/p&gt;

&lt;p&gt;Follow me for more articles. Stay Connect with me on linkedin &lt;a href="https://www.linkedin.com/in/dilusha-rasanjana/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/dilusha-rasanjana/&lt;/a&gt; &lt;/p&gt;

</description>
      <category>aws</category>
      <category>ecs</category>
      <category>ecr</category>
      <category>eks</category>
    </item>
  </channel>
</rss>
