<?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 Ioannis Koinaris on Medium]]></title>
        <description><![CDATA[Stories by Ioannis Koinaris on Medium]]></description>
        <link>https://medium.com/@i.koinaris?source=rss-94ef48537986------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*iEaI8FlnkKc6ggF8</url>
            <title>Stories by Ioannis Koinaris on Medium</title>
            <link>https://medium.com/@i.koinaris?source=rss-94ef48537986------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 18:14:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@i.koinaris/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[AWS Tutorial — Secure your website with ACM, Amazon Cloudfront and AWS WAF]]></title>
            <link>https://awstip.com/aws-tutorial-secure-your-website-with-acm-amazon-cloudfront-and-aws-waf-5994a50a903e?source=rss-94ef48537986------2</link>
            <guid isPermaLink="false">https://medium.com/p/5994a50a903e</guid>
            <category><![CDATA[aws-acm]]></category>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[aws-waf]]></category>
            <category><![CDATA[aws-cloudfront]]></category>
            <dc:creator><![CDATA[Ioannis Koinaris]]></dc:creator>
            <pubDate>Mon, 05 Oct 2026 05:51:39 GMT</pubDate>
            <atom:updated>2026-10-27T09:21:22.923Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1wZqytcVlLrr8nlq-Cw4g.png" /></figure><p>In previous tutorials, we explored how to <a href="https://medium.com/@i.koinaris/aws-tutorial-publish-an-angular-website-to-amazon-s3-ca4978cecfef">store our website’s file in a bucket</a> and then <a href="https://medium.com/@i.koinaris/aws-tutorial-integrate-an-amazon-s3-bucket-to-route-53-ce1aa5931eab">connect this bucket to a custom domain</a>. In this tutorial, we will go one step further and talk about how we can protect our website and secure it against possible threats.</p><p>Watching our deployed website is, without any doubt, exciting, like unboxing a new toy. However, it’s not the end of the road, because we need to take into consideration the fact that there are many threats on the web. Issues such as latency and web exploits can affect our website’s availability and security.</p><p>For this reason, in today’s tutorial, we will take a look on a few AWS services that can help ensure our website’s protection. More specifically, we will:</p><ul><li>secure our website with SSL/TLS using <strong><em>ACM (Amazon Certificate Management).</em></strong></li><li>provide global distribution with <strong><em>Amazon Cloudfront</em></strong></li><li>provide protection against suspicious requests with <strong><em>AWS WAF (Web Application Firewall). </em></strong>More specifically, we will apply a rule, so thag we can block requests routed to our website if the URL contains the keyword <strong><em>“block-me”</em></strong>.</li></ul><p><strong>Prerequisites</strong></p><p>In this tutorial, we will not develop anything locally. Before jumping into AWS console, I’d like to mention that there are some prerequisites that need to be covered:</p><ul><li>an active AWS account.</li><li>an already registered domain name in Amazon Route 53. There’s no reason to worry if you don’t have one. You can still follow this tutorial for learning purposes.</li></ul><p><strong>Step 1. Request an SSL/TLS certificate with ACM</strong></p><p>An SSL/TLS certificate is essential because it provides authentication, encryption and data integrity. We can create one for our website through <strong><em>Amazon Certificate Management (ACM). </em></strong>As its name suggests ACM is a service that can easily create, store and renew public and private SSL/TLS certificates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*E6_IrnFgRPVHJjclUvbxHQ.png" /></figure><p>We start by requesting a new certificate. One thing that we need to take into consideration is that the region in which we store our certificate must be <strong><em>us-east-1 (N.Virginia).</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*DwFBpaczAYXuMYGKICQKHg.png" /></figure><p>In order to complete the request, we just need to provide a fully qualified domain name, that refers to the registered domain that we already have. We leave the rest of the default configuration as it is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*fbMrJLy2WJS6IqMz27HOnw.png" /></figure><p>It takes a couple of minutes, and our SSL/TLS certificate is ready.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*jVoQComFI1k3Zn4X5-LnDQ.png" /></figure><p><strong>Step 2. Create a Cloudfront Distribution</strong></p><p>Once we have received the certificate, it’s time to take care of the way our website is delivered. AWS provides a service named <strong><em>Amazon Cloudfront,</em></strong> which guarantees faster website distribution and content delivery(images, videos etc.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*7zShu7c5ABtAEntCdZz99A.png" /></figure><p>For the purposes of this tutorial we will choose a paid plan, and more specifically the <strong><em>“Pro”</em></strong> plan, so we can apply the protection rule that we discussed earlier. Of course, you can choose the free plan if you want to avoid additional costs. It is, however, recommended to take a look at the other options, so you have an idea of what they offer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*Z-r9mDSU11se-xx-oRzHqg.png" /></figure><p>Next, we provide a name for our distribution, and then we fill in the managed domain from Route 53. As we see in the message that we get, <em>“CloudFront can automatically manage your DNS for you”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*aOBPH82HXohUSORlnX6HjA.png" /></figure><p>If the files of our website are originally stored in an S3 bucket, we choose this as origin type, and by browsing the S3, we find the endpoint to our bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*sXHzrwCC4_ek0FmqDhAuxA.png" /></figure><p>On the <strong><em>“Enable Security”</em></strong> tab we’re given the option to integrate our distribution with <strong><em>Web Application Firewall (WAF)</em></strong> to establish some basic protection rules. We click on <strong><em>“Next”,</em></strong> and on the “<strong><em>Get TLS Certificate”</em></strong> tab, we see that we have automatically received the certificate that we created in ACM. We select it and click on <strong><em>“Next”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*IHfYqzIdTIRlqTFAUEIyGA.png" /></figure><p>Finally we click on <strong><em>“Create distribution”</em></strong>. We may have to wait a few seconds until it is enabled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*cAB3U63msESeSCjyx6Jfqg.png" /></figure><p>Before moving on to the WAF configuration, there is one last thing to take care of in our Cloudfront distribution.</p><p>Inside the<strong><em>“General”</em></strong> tab, we see that, the value of <strong><em>“Default root object”</em></strong> is empty. We need to update the value of this field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*sA0YwGxE4of97ubrjeVQeA.png" /></figure><p>And what value exactly do we have to fill in?</p><p>But of course, since our resources are stored in an S3 bucket we need to look for the <strong><em>index document</em></strong> inside the <strong><em>“Static website hosting”</em></strong> properties of our S3 bucket. In this case, the name of the index document is <strong><em>index.html</em></strong> .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*8xs2IpaOs51yQeAVV8yDcg.png" /></figure><p><strong>Step 3. Configure AWS WAF</strong></p><p>Apart from SSL/TLS certificate and distribution, we also need to provide a firewall to handle the requests that are routed to our website. <strong><em>AWS Web Application Firewall (WAF) </em></strong>is our partner in crime because, as an application firewall, it inspects and blocks suspicious requests forwarded to our resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*zMFXUhtgHm7EVw9cz_AKig.png" /></figure><p>As we mentioned before, a new protection package was created when we configured our Cloudfront distribution. The package’s name starts with <strong><em>“CreatedByCloudFront”</em></strong> and is already listed.</p><p>If we click on the protection package, we can a list the the protection rules that were initially created within it. We will click on <strong><em>“Add rule”</em></strong> and start creating the blocking rule.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*GQje5_ugHJEgvLYsoH2Txw.png" /></figure><p>We select the <strong><em>“Custom rule” , </em></strong>and then we see the four different types of custom rules:</p><ul><li>IP-based rule</li><li>Geo-based rule</li><li>Rate-based rule</li><li>Custom rule</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*WoS2ikP2fTZ6zT7sXBbA6w.png" /></figure><p>We create a custom rule with the following configuration:</p><ul><li>Action: <strong><em>Block</em></strong></li><li>Rule name: <strong><em>blocking-rule (or any other valid name)</em></strong></li><li>If a request: <strong><em>matches the statement</em></strong></li><li>Inspect: <strong><em>Query string</em></strong></li><li>Statement Match type: <strong><em>Contains string</em></strong></li><li>String to match: <strong><em>block-me</em></strong></li></ul><p>The JSON format of this rule is the following:</p><pre>{<br>    &quot;Name&quot;: &quot;blocking-rule&quot;,<br>    &quot;Action&quot;: {<br>        &quot;Block&quot;: {}<br>    },<br>    &quot;Priority&quot;: 0,<br>    &quot;VisibilityConfig&quot;: {<br>        &quot;SampledRequestsEnabled&quot;: true,<br>        &quot;CloudWatchMetricsEnabled&quot;: true,<br>        &quot;MetricName&quot;: &quot;blocking-rule&quot;<br>    },<br>    &quot;Statement&quot;: {<br>        &quot;ByteMatchStatement&quot;: {<br>            &quot;FieldToMatch&quot;: {<br>                &quot;QueryString&quot;: {}<br>            },<br>            &quot;PositionalConstraint&quot;: &quot;CONTAINS&quot;,<br>            &quot;SearchString&quot;: &quot;block-me&quot;,<br>            &quot;TextTransformations&quot;: [<br>                {<br>                    &quot;Priority&quot;: 0,<br>                    &quot;Type&quot;: &quot;NONE&quot;<br>                }<br>            ]<br>        }<br>    }<br>}</pre><p>Now, if we go back to our Cloudfront distribution and open the <strong><em>“Security” </em></strong>tab, we see that in the <strong><em>“Security-Web Application Firewall”</em></strong> section, the blocking rule was successfully added to the list of rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*skUwOqyag5x2pjtJobaO_g.png" /></figure><p><strong>Step 4. Test the Cloudfront distribution</strong></p><p>We have finally completed the configuration of security for our website and it’s time to perform some tests.</p><p>First we’ll test whether Cloudfront is successfully configured. We’ll go inside our distribution and find the field <strong><em>“Distribution domain name”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*LReCXdTPXAvUNCuXNRV0dw.png" /></figure><p>We’ll copy the value and paste it in a new browser tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*Dw4CWvkSOVf5BDSoLKiZqQ.png" /></figure><p>Yep! Our website opens successfully. One test down, two to go!!</p><p><strong>Step 5. SSL/TLS Certificate</strong></p><p>Now we will verify that an SSL certificate was provided to our website. We’ll click on the lock symbol next to the URL and open the certificate. We can see that our certificate was issued by a trusted CA, aka Amazon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*wrgY4aMD5kcwk0VG5vwZww.png" /></figure><p><strong>Step 6. Test the WAF package blocking rule</strong></p><p>Finally we’ll check if our website has WAF protection, by testing the <strong><em>blocking-rule</em></strong> that we created earlier.</p><p>Let’s add a query string to the URL i.e. <strong><em>block-me=true</em></strong> and see what happens:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*tg3QXM9OYPdrY0gHnMtlHg.png" /></figure><p>As expected, we get a 403 error! Yeah!!</p><p><strong>Step 7. Clean up resources</strong></p><p>After our testing is completed, we can move on and clean up our resources.</p><p>First we need to disable the Cloudfront distribution. If we have chosen a paid plan we have to cancel the plan and then move on to disable the distribution. After a while we’ll be able to delete it. The WAF protection package that was created will be automatically deleted. Finally we delete the SSL/TLS certificate.</p><p>I hope you enjoyed this tutorial! Now you are capable of providing security to your website and protect it from possible threats. Kudos!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5994a50a903e" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-tutorial-secure-your-website-with-acm-amazon-cloudfront-and-aws-waf-5994a50a903e">AWS Tutorial — Secure your website with ACM, Amazon Cloudfront and AWS WAF</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Tutorial — Build a Serverless REST API with Spring Boot, AWS Lambda, API Gateway and DynamoDB]]></title>
            <link>https://awstip.com/aws-tutorial-build-a-serverless-rest-api-with-spring-boot-aws-lambda-api-gateway-and-dynamodb-de4f171d9ea1?source=rss-94ef48537986------2</link>
            <guid isPermaLink="false">https://medium.com/p/de4f171d9ea1</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[dynamodb]]></category>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Ioannis Koinaris]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 13:16:03 GMT</pubDate>
            <atom:updated>2026-10-07T10:50:56.978Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IRucodmo4LNYNkCjE4J-nA.png" /></figure><p>In our previous tutorial we managed to test a Dockerized Spring Boot application with Amazon ECR and AWS Lambda. If you missed it by any chance, or if you want to walk through it again, you can find it <a href="https://medium.com/@i.koinaris/aws-tutorial-deploy-a-dockerized-spring-boot-application-to-aws-lambda-with-amazon-ecr-bac19e8cc61d">here</a>.</p><p>Today we will continue our journey to AWS Lambda and its integration with Spring Boot, and we will also explore two other AWS services: <strong><em>API Gateway</em></strong> and <strong><em>Amazon DynamoDB</em></strong>.</p><p><strong>Prerequisites</strong></p><p>Before getting our hands dirty, I’d like to point out that, in order to successfully complete all the steps of this tutorial, there are a few important prerequisites that need to be covered:</p><ol><li>An active AWS account.</li><li>Java, <a href="https://maven.apache.org/download.cgi">Maven</a> and an IDE (preferably IntelliJ) for developing the Spring Boot application must be installed in your machine.</li><li>At the end of the tutorial, we’ll test our application’s endpoints. The recommended software for testing endpoints is <a href="https://www.postman.com/downloads/">Postman</a>.</li></ol><p><strong>Step 1. Develop Spring Boot application</strong></p><p>If all the prerequisites are covered, it’s time to start by creating our Spring Boot application.</p><p>This time, we will develop an application that will allow us to run CRUD operations on a database table. Practically, this means, that we will need to develop more endpoints, import additional dependencies and implement the necessary configuration for our database, which we will access through a repository class.</p><p>No reason to panic, folks!</p><blockquote><strong>Reminder: In case you’re not aware, CRUD stands for Create, Read, Update, and Delete.</strong></blockquote><p>Let’s start by creating a new project in IntelliJ. This time, we choose a <strong><em>“Maven Archetype”</em></strong>, fill in a name, select <strong><em>“Maven Central”</em></strong> from the Catalog and choose <em>“com.amazonaws.serverless.archetypes:aws-serverless-springboot3-archetype” </em>as the archetype<em>.</em></p><p>Let’s not forget that we need to prepare our workspace to integrate with a serverless, event-driven compute service, aka AWS Lambda.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S08NlIltAdlpvHVq0X5K7w.png" /></figure><p>The workspace will be initialized with the default dependencies, classes and configuration.</p><p>One of the generated classes, is the <strong><em>StreamLambdaHandler</em></strong>. As its name suggests, this is the class that will handle the requests from the implemented endpoints of our Spring Boot application, through the <strong><em>handleRequest </em></strong>method.</p><pre>public class StreamLambdaHandler implements RequestStreamHandler {<br><br>    private static SpringBootLambdaContainerHandler&lt;AwsProxyRequest, AwsProxyResponse&gt; handler;<br>    static {<br>        try {<br>            handler = SpringBootLambdaContainerHandler.getAwsProxyHandler(Application.class);<br>        } catch (ContainerInitializationException e) {<br>            // if we fail here. We re-throw the exception to force another cold start<br>            e.printStackTrace();<br>            throw new RuntimeException(&quot;Could not initialize Spring Boot application&quot;, e);<br>        }<br>    }<br><br>    @Override<br>    public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context)<br>            throws IOException {<br>        handler.proxyStream(inputStream, outputStream, context);<br>    }<br>}</pre><p>In our <strong><em>pom.xml</em></strong> file, apart from the dependencies that are already imported, we need to add one more dependency, which will allow us to integrate with DynamoDB:</p><pre>&lt;dependency&gt;<br>   &lt;groupId&gt;software.amazon.awssdk&lt;/groupId&gt;<br>   &lt;artifactId&gt;dynamodb-enhanced&lt;/artifactId&gt;<br>   &lt;version&gt;2.55.3&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>It is optional, yet recommended, to import <strong><em>Lombok </em></strong>dependency as well, so you can easily create <strong><em>constructors, getter</em></strong>s and <strong><em>setter</em></strong>s through annotations instead of implementing them manually:</p><pre>&lt;dependency&gt;<br>   &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;<br>   &lt;artifactId&gt;lombok&lt;/artifactId&gt;<br>   &lt;optional&gt;true&lt;/optional&gt;<br>&lt;/dependency&gt;</pre><p>We will explore four of the classes that we will implement in our workspace. You can find the link to the source code at the end of the tutorial.</p><p>First, we will create a class for configuring our database and name it <strong><em>DynamoDbConfig. </em></strong>This class is basically a “bridge” between our Spring Boot and the AWS Region where our DynamoDB table is located, which in our case is <strong><em>EU_CENTRAL_1</em></strong> .</p><pre>@Configuration<br>public class DynamoDbConfig {<br><br>    @Bean<br>    public DynamoDbEnhancedClient dynamoDbEnhancedClient() {<br><br>        DynamoDbClient dynamoDbClient = DynamoDbClient.builder()<br>                .region(Region.EU_CENTRAL_1)<br>                .build();<br><br>        return DynamoDbEnhancedClient.builder()<br>                .dynamoDbClient(dynamoDbClient)<br>                .build();<br>    }<br>}</pre><p>Next is our entity class, which we will call<strong> Book:</strong></p><pre>@Getter<br>@Setter<br>@DynamoDbBean<br>@NoArgsConstructor<br>public class Book {<br><br>    private String id;<br>    private String title;<br>    private String author;<br>    private String isbn;<br><br>    @DynamoDbPartitionKey<br>    public String getId() {<br>        return id;<br>    }<br>}</pre><p>Here, you can see how small our code becomes just by adding the <strong><em>@Getter, @Setter</em></strong> and <strong><em>@NoArgsConstructor </em></strong>annotations. We still need to implement the <strong><em>getId()</em></strong> method, and annotate it with <strong><em>@DynamoDbPartitionKey. </em></strong>This is DynamoDB requires a partition key to uniquely identify items in the table. In our case, the <strong><em>id</em></strong> attribute is used as the partition key.</p><p>We can see this in our repository class as well, where we define the operations that will be executed in the DynamoDB table. We can see that every operation, that requires the <strong><em>id</em></strong> uses the <strong><em>“partitionValue” </em></strong>method<strong><em>. </em></strong>As you can see, the name of our database’s table will be <strong><em>“Books”</em></strong>.</p><pre>@Repository<br>public class BookRepository {<br><br>    private final DynamoDbTable&lt;Book&gt; bookTable;<br><br>    public BookRepository(DynamoDbEnhancedClient enhancedClient) {<br>        this.bookTable = enhancedClient.table(&quot;Books&quot;, TableSchema.fromBean(Book.class));<br>    }<br><br>    public void save(Book book) {<br>        bookTable.putItem(book);<br>    }<br><br>    public Book findById(String id) {<br>        return bookTable.getItem(Key.builder().partitionValue(id).build());}<br><br>    public List&lt;Book&gt; findAll() {<br>        return bookTable.scan().items().stream().toList();<br>    }<br><br>    public void deleteById(String id) {<br>        bookTable.deleteItem(Key.builder().partitionValue(id).build());<br>    }<br>}</pre><p>Finally, we have our controller class, where we implement the endpoints for the CRUD operations:</p><pre>@RestController<br>@RequestMapping(&quot;/books&quot;)<br>@RequiredArgsConstructor<br>public class BookController {<br><br>    private final BookService bookService;<br><br>    @PostMapping<br>    public ResponseEntity&lt;Book&gt; addBook(@RequestBody Book book) {<br>        bookService.save(book);<br>        return ResponseEntity.ok().body(book);<br>    }<br><br>    @GetMapping(&quot;/{id}&quot;)<br>    public ResponseEntity&lt;Book&gt; getBookById(@PathVariable String id) {<br>        Book book = bookService.findById(id);<br>        return ResponseEntity.ok().body(book);<br>    }<br><br>    @GetMapping<br>    public ResponseEntity&lt;List&lt;Book&gt;&gt; getAllBooks() {<br>        List&lt;Book&gt; books = bookService.getAllBooks();<br>        return ResponseEntity.ok().body(books);<br>    }<br><br>    @DeleteMapping(&quot;/{id}&quot;)<br>    public ResponseEntity&lt;Book&gt; deleteBookById(@PathVariable String id) {<br>        bookService.deleteById(id);<br>        return ResponseEntity.noContent().build();<br>    }<br>}</pre><p>After completing the development of our application, we run the following command in a terminal to create the zip file, that will be deployed to AWS Lambda:</p><pre>mvn clean package</pre><p><strong>Step 2. Create Table in AWS DynamoDB</strong></p><p>Now that we have completed the development of our application, it’s time to jump into the AWS Console. First we will create the table in DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*7oV060z9KvAXpNkHz7-FRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*Auqoq8dXuGcoXrC5BAE1vQ.png" /></figure><p>Here, let us remember of the <strong>table name</strong> and the <strong>partition key</strong> that we defined while developing our Spring Boot application, because we must use the exact same values while creating the DynamoDB table in the AWS Console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*FZKAQ8uvPVZPUMZNAYoVzQ.png" /></figure><p>We click on <strong><em>“Create”</em></strong> and the table with name “Books” is created.</p><p><strong>Step 3. Create function in AWS Lambda</strong></p><p>Our table in DynamoDB is ready, so we can move forward and create our function in AWS Lambda:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*9D5Wft1UWCSg2w6s.png" /></figure><p>In our previous tutorial, we created a function by importing a container image directly from Amazon ECR. This time we will follow another approach and choose the <strong><em>“Author from scratch” </em></strong>option<strong><em>. </em></strong>We enter a name and a runtime, preferably the same with the one used by our Spring Boot application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*XuHfSLkBV7CgfeqvcQi9Lg.png" /></figure><p><strong>Step 4. Deploy Spring Boot Application</strong></p><p>For the deployment of our application to AWS Lambda we just need to upload the zip file that we created previously. In the <strong><em>“Code Source”</em></strong> section of <strong><em>“Code”</em></strong> tab, we click on <strong><em>Update</em></strong> and then <strong><em>Update from a .zip or .jar file . </em></strong>We locate our zip file and upload it to our lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ClThujZzB9h9aNy7nki8bg.png" /></figure><p><strong>Step 5. Grant Permission for DynamoDB to IAM Role</strong></p><p>Our Spring Boot application is now successfully deployed to AWS Lambda.</p><p>Before going through the configuration and testing, we need to consider that our Lambda function needs permission to access DynamoDB.</p><p>When a lambda function is created, a new IAM role is initialized. We can find and access this role inside the <strong><em>“Permissions”</em></strong> section of <strong><em>“Configuration”</em></strong> tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*bhLHlyFtuZ3aGTH-NmVIGQ.png" /></figure><p>By clicking on the role, we are transferred to the IAM console, where we can see that this role has only one attached policy, named <strong><em>AWSLambdaBasicExecutionRole</em></strong>. We need to attach to this role an additional policy, that grants the Lambda function permission to access DynamoDB.</p><p>We click on <strong><em>“Add permissions”</em></strong> and <strong><em>“Attach policies”.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*ndpOyS2N-gDK9JWM7Nc45w.png" /></figure><p>From the permissions’ list we look for the one named <strong><em>“AmazonDynamoDBFullAccess”</em></strong>. We attach this policy to the IAM role and we go back to the Lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*0J5AGDT94oTylnIcwtrrwg.png" /></figure><p><strong>Step 6. Configuration and Test of Lambda Function</strong></p><p>Let’s move on by taking a step back. In our Spring Boot application, we mentioned that the class that handles the requests to the REST endpoints is the <strong><em>StreamLambdaHandler, </em></strong>through the <strong><em>“handleRequest” </em></strong>method<strong><em>.</em></strong></p><p>We need to provide this information to the Lambda function as well. And how do we do that?</p><p>Inside the<strong><em>“Code”</em></strong> tab, in the <strong><em>“Runtime Settings”</em></strong> section, we click on <strong><em>“Edit”</em></strong> and then fill in the <strong><em>“Handler” </em></strong>field with the location of the handler class and the method responsible for handling the requests, using the format <strong><em>packageName.className::methodName. </em></strong>Then we click on<strong><em> “Save” .</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*m5eUUaVBQQxAxmosNXbWGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*ou9uucgWAx26e54T4KoJtw.png" /></figure><p>The final step before testing our lambda function is the event configuration. Inside the <strong><em>“Test” </em></strong>tab,<strong><em> </em></strong>we create a new event and name it <strong><em>“books-crud-event”</em></strong><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*j7SQklVppmPa6b4cyy8i2w.png" /></figure><p>Finally as a template we choose <strong><em>“API Gateway AWS Proxy” </em></strong>and we update the <strong><em>“path”, “httpMethod” </em></strong>and <strong><em>“pathParameters — proxy” </em></strong>parameters so that they correspond to the endpoint and the HTTP method we developed earlier with Spring Boot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*NFkgqpetibGeckFJopwnWw.png" /></figure><p>We click on <strong><em>“Save”</em></strong> and then <strong><em>“Test”</em></strong> . If everything is configured correctly we will see a successful response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*wbZegC-xpfcWoJ9zIK3mDg.png" /></figure><p><strong>Step 7. Initialize API Gateway and integrate with AWS Lambda</strong></p><p>We are almost done! We have configured our DynamoDB table and AWS Lambda function. Now it’s time to bring them together by accessing the REST endpoints through <strong>API Gateway.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*bHYstHi2eFfamP6juh1y0A.png" /></figure><p>We click on <strong><em>“Create API”</em></strong> and we select the <strong><em>“REST API” </em></strong>option from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vAc_o2pBymjc1WkwiG-iGA.png" /></figure><p>Inside API details, we leave the default configuration, enter a name for our API e.g. <strong><em>Book.API </em></strong>and we click on <strong><em>“Create API”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*c500B6IZhg5A8Y_Oex09JQ.png" /></figure><p>Now, we need to provide a resource for our API. We click on <strong><em>“Create resource”</em></strong> and as the resource path, enter the path used to access our REST endpoints. In our case, as we remember from <strong><em>BookController</em></strong> class, this path is <strong><em>“/books”</em></strong> . We also enable the <strong><em>CORS (Cross Origin Resource Sharing)</em></strong> and click <strong><em>“Create resource”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*fHFGaqBWU8j4rnQvhAHy2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*7rDNze2VG3caLTxJbdvXGQ.png" /></figure><p>Our resource is created, and now we can start adding the methods for our CRUD operations. We start by clicking on <strong><em>“Create Method”</em></strong> and then, inside <strong><em>“Method details”</em></strong> apply the following configuration:</p><ul><li>Method type: <strong><em>POST (for saving a new book)</em></strong></li><li>Integration Type: <strong><em>Lambda Function</em></strong></li><li>Lambda Proxy Integration: <strong><em>Enabled</em></strong></li><li>Lambda Function: Select the AWS region and the name of your Lambda function.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*tlokeOnXzuGB4gGNVr4t9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*t8Ms_4h5NKEhDA-fOGK5oA.png" /></figure><p>The same way we create the <strong>GET</strong> and method for retrieving all books.</p><p>Now, for the <strong>GET</strong> and <strong>DELETE</strong> methods that require the “id” path parameter we create a new resource inside the existing <strong><em>/books</em></strong> resource. We <strong><em>{id+}</em></strong> as resource name and enable <strong><em>Proxy resource</em></strong> and <strong><em>CORS</em></strong> as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*38k0pM_yr64HEUtz8XRSnw.png" /></figure><p>We create the <em>“</em><strong><em>GET”</em></strong> and <em>“</em><strong><em>DELETE”</em> </strong>methods, and at the end, our resources will have the following structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*x4Hq5086Kt36MycwbhRDkA.png" /></figure><p>By clicking on <strong><em>“Deploy API”</em></strong> we need to choose a stage to which our API will be deployed. As you know in real-world applications we have stages such as development, testing, production etc. We create a new stage named <strong><em>“production” </em></strong>and click on <strong><em>“Deploy”.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*nxXOaq8DIC2jTqkIS1FAFA.png" /></figure><p><strong>Step 8. Test application</strong></p><p>Our API is successfully deployed, and as I like to say, it’s the moment of truth! It’s time test our application!</p><p>Inside the <strong><em>“Stages” </em></strong>page, we see our deployed <strong><em>“production” </em></strong>stage. We select the<em> </em><strong><em>“POST”</em></strong><em> </em>method and we copy the invoke URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*fmEXwLf3hFRnn2TNzpMc3w.png" /></figure><p>We open Postman and first execute the POST request using the invoke URL and following request body:</p><pre>{<br>  &quot;title&quot;: &quot;Lord of the Rings - The Fellowship of the Ring&quot;,<br>  &quot;author&quot;: &quot;J.R.R. Tolkien&quot;,<br>  &quot;isbn&quot;: &quot;11444198&quot;<br>}</pre><p>If everything is configured correctly we will receive a successful response with HTTP status code <strong>200</strong> and a response body containing a created book.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*HebZAn7Bon_wNhI_N_eZzA.png" /></figure><p>Let’s try another POST request, this time with the following body:</p><pre>{<br>    &quot;title&quot;: &quot;Harry Potter and the Goblet of Fire&quot;,<br>    &quot;author&quot;: &quot;J.K. Rowling&quot;,<br>    &quot;isbn&quot;: &quot;978-0439139595&quot;<br>}</pre><p>We should get a similar response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*0FUoAe1a93T_SbZPS3TL1w.png" /></figure><p>Now if we jump to AWS DynamoDB console and choose <strong><em>“Explore Items”</em></strong> inside the <strong><em>“Books”</em></strong> table we will see two new records:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0W0-OKJHvbupDpH7Kiyr0Q.png" /></figure><p>Now let’s retrieve all books that we have saved by running the GET request in Postman:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*fCsG9HB1CaJwN4_poNkJNA.png" /></figure><p>Let’s complete our testing with the nested <strong><em>{id+}</em></strong> resource. First, we test the <strong><em>GET </em></strong>method:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*fWcTYtPcaD-OgU_ZsvidUg.png" /></figure><p>Finally we test the <strong><em>DELETE</em></strong> method:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*QYZashm64SOeygY9fVArmw.png" /></figure><p>Let’s take a final look at the “Books” table in DynamoDB and as we expected, there is only one record left:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*pzkNufUBUT7zh0JZqapYhA.png" /></figure><p>Our application works perfectly!!</p><p><strong>Step 9. Clean up your resources</strong></p><p>To avoid additional costs, after our application has been successfully tested, it is recommended to delete all the resources that we created, including the DynamoDB table, the AWS Lambda function, the IAM role created by AWS Lambda and the API Gateway.</p><p>I hope you enjoyed this tutorial! Now you’re fully capable of integrating your locally developed Spring Boot application with AWS Lambda, API Gateway and Amazon DynamoDB! Kudos!!</p><p><strong>PS.</strong>: As I mentioned before, you can find the source code of the Spring Boot application in <a href="https://github.com/ikoinaris/springboot-lambda-dynamodb">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de4f171d9ea1" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-tutorial-build-a-serverless-rest-api-with-spring-boot-aws-lambda-api-gateway-and-dynamodb-de4f171d9ea1">AWS Tutorial — Build a Serverless REST API with Spring Boot, AWS Lambda, API Gateway and DynamoDB</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Tutorial — Deploy a Dockerized Spring Boot Application to AWS Lambda with Amazon ECR]]></title>
            <link>https://awstip.com/aws-tutorial-deploy-a-dockerized-spring-boot-application-to-aws-lambda-with-amazon-ecr-bac19e8cc61d?source=rss-94ef48537986------2</link>
            <guid isPermaLink="false">https://medium.com/p/bac19e8cc61d</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws-ecr]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ioannis Koinaris]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 06:25:38 GMT</pubDate>
            <atom:updated>2026-09-25T13:08:38.118Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uWZg6Kofgu3b9f46Z__obQ.png" /></figure><p>After exploring some topics regarding website development and hosting, such as <a href="https://medium.com/@i.koinaris/aws-tutorial-publish-an-angular-website-to-amazon-s3-ca4978cecfef">hosting our website in an Amazon S3 bucket</a> and <a href="https://medium.com/@i.koinaris/aws-tutorial-integrate-an-amazon-s3-bucket-to-route-53-ce1aa5931eab">DNS configuration with Route53</a>, we will continue our journey in AWS world by exploring some other popular services.</p><p>Today, we will see how we can build a Docker image of a Spring Boot application, push it to Amazon ECR and then run the application using AWS Lambda.</p><p>The steps that are demonstrated in this tutorial are the following:</p><ol><li>Develop a simple SpringBoot REST application.</li><li>Build a Docker image from the SpringBoot application.</li><li>Push the Docker image to Amazon ECR.</li><li>Create an AWS Lambda function based on the container image.</li><li>Run and test the application through AWS Lambda.</li></ol><p><strong>Prerequisites</strong></p><p>Before jumping into the development, I’d like to point out that, in order to successfully execute all the steps of this tutorial, there are some prerequisites, that need to be covered. More specifically:</p><ol><li>Docker Desktop must be installed locally.</li><li>You should have an IDE for developing the SpringBoot application, such as IntelliJ. You also need to have Java and Maven installed on your machine.</li><li>An active AWS account.</li><li>AWS CLI must be installed and configured with credentials that allow you to interact with AWS services.</li></ol><p><strong>Step 1. Develop a SpringBoot application</strong></p><p>In order to keep this tutorial simple, we will develop a small Spring Boot REST application. We create a new Maven project in IntelliJ with the following configuration:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*1aGD-EAcoUoC-FEGIspHsA.png" /></figure><p>As soon as we create our project, we can explore its structure and packages:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*ZPrKnvATwiMysVSoivhzdg.png" /></figure><p>We can also take a look at the pom.xml file and see how our initial configuration is structured in XML form:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<br>         xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br>    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>    &lt;parent&gt;<br>        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>        &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;<br>        &lt;version&gt;4.1.1&lt;/version&gt;<br>        &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;<br>    &lt;/parent&gt;<br>    &lt;groupId&gt;com.tutorial&lt;/groupId&gt;<br>    &lt;artifactId&gt;springboot-aws-demo&lt;/artifactId&gt;<br>    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;<br>    &lt;name&gt;springboot-aws-demo&lt;/name&gt;<br>    &lt;description&gt;springboot-aws-demo&lt;/description&gt;<br>    &lt;properties&gt;<br>        &lt;java.version&gt;21&lt;/java.version&gt;<br>    &lt;/properties&gt;<br>    &lt;dependencies&gt;<br>        &lt;dependency&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;<br>        &lt;/dependency&gt;<br>        &lt;dependency&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;<br>        &lt;/dependency&gt;<br>        &lt;dependency&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;<br>            &lt;scope&gt;test&lt;/scope&gt;<br>        &lt;/dependency&gt;<br>    &lt;/dependencies&gt;<br><br>    &lt;build&gt;<br>        &lt;plugins&gt;<br>            &lt;plugin&gt;<br>                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;<br>            &lt;/plugin&gt;<br>        &lt;/plugins&gt;<br>    &lt;/build&gt;<br><br>&lt;/project&gt;</pre><p>Now, inside our main package, where our main class is located, we will create a new package named <strong><em>“controller”</em></strong> and inside the new package, we will create a class named <strong><em>“HelloController.java”</em></strong>.</p><p>Inside this class we will implement one simple endpoint:</p><pre>package com.tutorial.springbootawsdemo.controller;<br><br>import org.springframework.web.bind.annotation.GetMapping;<br>import org.springframework.web.bind.annotation.RestController;<br><br>@RestController<br>@RequestMapping(&quot;/api&quot;)<br>public class HelloController {<br><br>    @GetMapping(&quot;/hello&quot;)<br>    public String sayHello(){<br>        return &quot;Hello from Spring Boot, ECR and Lambda!&quot;;<br>    }<br>}</pre><p>Let’s test our application now. In a new terminal, we execute the following command:</p><pre>mvn clean install</pre><p>This command will generate a folder named <strong><em>“target”, </em></strong>inside which we can find the jar file <strong><em>springboot-aws-demo-0.0.1-SNAPSHOT.jar</em></strong> .</p><p>Now, in the same terminal, we execute the command to start our application:</p><pre>java -jar target/springboot-aws-demo-0.0.1-SNAPSHOT.jar</pre><p>Finally we can test our endpoint, keeping in mind that the default port of a Spring Boot application is <strong><em>8080</em></strong>.</p><p>In a new terminal, we run the following command:</p><pre>curl -v http://localhost:8080/api/hello</pre><p>The message <em>“Hello from SpringBoot, ECR and Lambda!”</em> should be displayed in our terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*ZgpYxHCU5TSALgoCzvmWFw.png" /></figure><p><strong>Step 2. Build Docker image and run application through Docker</strong></p><p>After successfully testing our Spring Boot application, we will build a Docker image and then run our application inside a Docker container.</p><p>First of all, we create the following Dockerfile inside the root folder of our project:</p><pre>FROM eclipse-temurin:21-jre<br>LABEL authors=&quot;ikoinaris&quot;<br><br>WORKDIR /app<br><br>COPY target/springboot-aws-demo-0.0.1-SNAPSHOT.jar app.jar<br><br>COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:1.0.1 /lambda-adapter /opt/extensions/lambda-adapter<br><br>EXPOSE 8080<br><br>ENTRYPOINT [&quot;java&quot;, &quot;-jar&quot;, &quot;app.jar&quot;]</pre><p>We will not dive too deeply into the Docker ecosystem in this tutorial, however I’d like to emphasize the following command:</p><pre>COPY - from=public.ecr.aws/awsguru/aws-lambda-adapter:1.0.1 /lambda-adapter /opt/extensions/lambda-adapter</pre><p>Since our final goal is to run our application with AWS Lambda, this command is important, because it adds the AWS Lambda Web Adapter to our container image, allowing our web application to communicate with the Lambda runtime.</p><p>Now, in order to build our Docker image we run the following two commands in a new terminal:</p><blockquote>Package our application</blockquote><pre>mvn clean package</pre><blockquote>Build the Docker image</blockquote><pre>docker build -t springboot-aws-demo .</pre><p>We can verify that the Docker image of our Spring Boot application has been successfully built, by running:</p><pre>docker images</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*XpNGNTU5U6BorgqBex8uAA.png" /></figure><p>Finally, we can run the application inside a Docker container:</p><pre>docker run -p 8080:8080 springboot-aws-demo</pre><p>We have now successfully built a Docker image from our Spring Boot application and we run it in a Docker container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*nQaHvt7i1tLDrkC2mpO0kQ.png" /></figure><p><strong>Step 3. Push Docker image to Amazon ECR</strong></p><p>Now that the development and the containerization of our Spring Boot application are complete, it’s time to move to the AWS console.</p><p>The service we will use to store our Docker image is <strong><em>Amazon ECR (Elastic Container Registry). </em></strong>As its name suggests, Amazon ECR is a fully managed Docker container registry that makes it easy to store, share and deploy container images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*BGDfYQFfeZzvDwDSGac1qg.png" /></figure><p>We will start by creating a new repository. The first, and for now the only, thing that we need to do is provide a name for our repository. We can leave the default values for image tag and encryption settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*P-ZI2KA9pwOelcbcygRczA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*RYvRpQoQv42hRU3OVYz_6Q.png" /></figure><p>As a next step, we need credentials that allow the AWS CLI to interact with Amazon ECR. In this tutorial, we will use an IAM user with the required permissions.</p><p>In the search bar of our console, we look for IAM. <strong><em>IAM </em></strong>stands for <strong><em>Identity and Access Management </em></strong>and is a service that allows us to manage users, groups and permissions for interacting with AWS services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*jL-pMym6dZ0z5axik7575A.png" /></figure><p>Inside the “<em>IAM users” </em>section we create a new user and provide a name for it. When it comes to permissions, we select <em>“Attach policies directly” </em>and then look for the policy <strong><em>“AmazonEC2ContainerRegistryFullAccess” </em>, </strong>which we will attach to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*6gWbP7WE94rZihQYWL1epQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*_rHFmGsvPPX2VZTrG5-L2g.png" /></figure><p>As soon as the user is created we need to create an access key, in order to configure the AWS CLI environment for interactiong with ECR.</p><p>Inside the tab <em>“Description” </em>we can enter a name like <em>“spring-boot-ecr-access-key” </em>and on the next tab we see the access key that has just been created. It’s recommended, that we save both access key and secret access key locally in a notepad, because we are going to use them for the CLI configuration.</p><blockquote><strong>Important notice: We never commit the access keys to source control or share them publicly.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*0xw8yeJH_n6AunDuVHh6HQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBnbMGLwxF5wSCZ8-50H0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*VzSkzPT3BSrZYB0FyynBQg.png" /></figure><p>Now that we have our credentials, we open a terminal, preferably PowerShell, and execute:</p><pre>aws configure</pre><p>We provide the requested credentials, AWS Region and output format. Our AWS CLI is now successfully configured.</p><p>Now, let’s go back to our ECR repository, because it’s time to push our Docker image to ECR.</p><p>Inside the repository, more specifically in the<strong><em>“Images”</em></strong><em> </em>tab, we select <strong><em>“View Push Commands”</em></strong>. A window containing all the necessary commands to push the Docker image will appear. We simply copy each command and run it in our terminal.</p><blockquote><strong>Important notice: Make sure that you execute the Docker commands from the appropriate project directory and that the Docker image you built earlier is available locally.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*akPzdZwCyXbF9BYTcSBooA.png" /></figure><p>Pushing the Docker image to ECR may take some time, depending on the size of the image. As soon as the process is completed, we will be able to see our Docker image inside our ECR repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*dKIaxF0dG9ABjoj-y2o9YQ.png" /></figure><p><strong>Step 4. Create an AWS Lambda function using the Amazon ECR image</strong></p><p>We’re almost done!</p><p>The last part of our tutorial is to create an AWS Lambda function using the Docker image stored in Amazon ECR.</p><p><strong>AWS Lambda</strong> is a serverless, event-driven compute service that allows us to run code without managing servers. Lambda supports container images as one of its deployment package types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*hrXnOHN1YhlutK_hBuzWfQ.png" /></figure><p>As soon as we open AWS Lambda console we click <strong><em>“Create function”.</em></strong></p><p>Then, as our source, we select <strong><em>“Container image”. </em></strong>We provide a name for our function and, inside <strong><em>“Container image URI” </em></strong>we browse for our recently deployed image. Then we click on <strong><em>“Create function”</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*6h2LB18A4EpIAMisDt4i4A.png" /></figure><p>As soon as our function has been created, we open the <strong><em>“Test” </em></strong>tab<strong><em>.</em></strong></p><p>We provide a name for the test event and we select <strong><em>“API Gateway AWS Proxy”</em></strong> as <strong><em>Event Template.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*NaXjwUpMSgE6-xMQxU9LNg.png" /></figure><p>A little lower on the page, inside the JSON event template, we update the attributes <strong><em>“path”,“httpMethod” </em></strong>and<strong><em> “proxy”, </em></strong>so they correspond to the endpoint and the HTTP method we developed earlier with Spring Boot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*PGvzPhePTeCIKCUokU7Uzw.png" /></figure><p>We save the Test event by clicking on <strong><em>“Save”</em></strong>.</p><blockquote><strong>Important notice: The first invocation of a newly created Lambda function can take some time. If the function times out, go to Configuration → General configuration → Edit and increase the timeout value, for example to 15 seconds.</strong></blockquote><p><strong>Step 5. Run lambda function</strong></p><p>Moment of truth! Let’s test our function.</p><p>If everything has been configured correctly, Lambda will invoke our container image, the Lambda Web Adapter will forward the request to our Spring Boot application, and our endpoint will return the response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*K3adhsGhrHT2xm-E7JzzJg.png" /></figure><p>And that’s it!</p><p>Our Spring Boot endpoint is now running as part of a serverless application on AWS Lambda.</p><p>I hope you enjoyed this tutorial and found it useful for getting started with Spring Boot, Docker, Amazon ECR, and AWS Lambda!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bac19e8cc61d" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/aws-tutorial-deploy-a-dockerized-spring-boot-application-to-aws-lambda-with-amazon-ecr-bac19e8cc61d">AWS Tutorial — Deploy a Dockerized Spring Boot Application to AWS Lambda with Amazon ECR</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Tutorial — Integrate an Amazon S3 Bucket to Route 53]]></title>
            <link>https://medium.com/@i.koinaris/aws-tutorial-integrate-an-amazon-s3-bucket-to-route-53-ce1aa5931eab?source=rss-94ef48537986------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce1aa5931eab</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[domain-names]]></category>
            <category><![CDATA[route-53]]></category>
            <dc:creator><![CDATA[Ioannis Koinaris]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 08:42:08 GMT</pubDate>
            <atom:updated>2026-09-18T10:06:53.756Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wSkNoZu1f5GGhPnCjvW7gg.png" /></figure><p>In our <a href="https://medium.com/@i.koinaris/aws-tutorial-publish-an-angular-website-to-amazon-s3-ca4978cecfef">previous tutorial</a>, we saw an easy way of deploying an Angular-based static web application to an Amazon S3 bucket. Now, we will go one step further, by connecting our S3 website to a custom domain using Route 53.</p><p>Before we start, I’d like to mention that since Route 53 is not a free service, I’ll demonstrate the steps required to register a domain, create a hosted zone and finally connect the domain name to the S3 bucket.</p><p>As you can imagine, registering a domain name involves additional costs, providing credit card details, and confirming the payment.</p><p>Now, let’s jump into our AWS console. We may have successfully deployed our web app in an Amazon’s S3 bucket, but the url that points to our website is not particularly user-friendly or easy to remember.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*1WYFEsUL5Us60ze9Ilc3GA.png" /></figure><p>Therefore, in order to present a more user-friendly url, we need to register a domain name. For this purpose, AWS provides a service called <a href="https://aws.amazon.com/route53/">Route 53</a>, which offers full DNS management and configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*5MdzMYtGKPYha0zs0BLNfA.png" /></figure><blockquote><strong>Important notice: The bucket in S3 must have the same name as the domain or subdomain in Route 53.</strong></blockquote><p><strong>Step 1. Register a Domain Name</strong></p><p>As mentioned above, the first step is to register a domain name through Route 53. If you already own a domain, you can skip this step and proceed to the next one.</p><p>For this tutorial, I’ll use my already registered domain name, <em>koinaris.com</em> .</p><p><strong>Step 2. Create a Hosted Zone</strong></p><p>As soon as we register a new domain name, we need to create a <strong><em>hosted zone</em></strong>. A hosted zone is essentially a container for records, that holds information about how to route traffic for a domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*u5GF5PfXUfLsrR2CLV0Ldg.png" /></figure><p>When creating a hosted zone, two records that are automatically initialized: one of type NS (<strong>Name Server</strong>) and one of type SOA (<strong>Start of Authority</strong>).</p><p>To summarize, these two record types contain importart information about:</p><ul><li>which DNS servers are responsible for this domain (NS)</li><li>which DNS server is authorative of this hosted zone (SOA)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxbcPchQb9G-egFoEP-WKA.png" /></figure><p>Apart from these two default records, we need to create one more record to complete our DNS configuration.</p><p><strong>Step 3. Create an A Record</strong></p><p>The additional record is of type <strong><em>A. </em></strong>We need this record to connect our domain name with an IPv4 address or, in our case, to an AWS resource through an Alias.</p><p>We click on <em>“Create record”</em> and then apply the following configuration:</p><ul><li><strong>Record name:</strong> You can leave <em>subdomain </em>field empty.</li><li><strong>Record type:</strong> <em>A — Routes traffic to an IPv4 address</em></li><li><strong>Alias:</strong> <em>Enabled</em></li><li><strong>Route traffic to:</strong> <em>Alias to S3 website endpoint</em></li><li><strong>Choose region:</strong> The region where your S3 bucket is hosted (in our case <em>eu-central-1</em>)</li><li><strong>Enter S3 Endpoint:</strong> The endpoint of our S3 bucket (in our case <em>s3-website.eu-central-1.amazonaws.com</em>)</li><li><strong>Routing policy:</strong> <em>Simple routing</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*l77G6cNk_qsvm9Tt2U2j4w.png" /></figure><p>It may take a few seconds for the new record to be propagated. You can check the status of the update, and when it becomes <strong><em>INSYNC</em></strong>, you’re good to go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*V6NIUVH9zraji4VcN0soJg.png" /></figure><p>And that’s it!</p><p>You have successfully integrated your S3 bucket with Route 53, and your website now has a DNS configuration and a more user-friendly URL.</p><p>Congratulations!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce1aa5931eab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Tutorial — Publish an Angular website to Amazon S3]]></title>
            <link>https://medium.com/@i.koinaris/aws-tutorial-publish-an-angular-website-to-amazon-s3-ca4978cecfef?source=rss-94ef48537986------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca4978cecfef</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[website-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Ioannis Koinaris]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 11:48:33 GMT</pubDate>
            <atom:updated>2026-09-18T06:58:17.752Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-g4P3-cBh5z7f0MXjjRKyQ.png" /></figure><p>When it comes to website development and deployment to a cloud provider, there is a variety of solutions with tons of practical guides and how-to articles that every developer can get hands on.</p><p>It is well-known that AWS provides a variety of easy-to-use services for storing your website’s data and deploying it to the cloud. One of the most popular services is <strong>Amazon S3 (Simple Storage Service)</strong>. Amazon S3 is an object storage service that offers high availability, security and performance.</p><p>In this tutorial, we will go through all the steps required to deploy an Angular-based website to an Amazon S3 bucket.</p><p><strong>Prerequisites</strong></p><p>It is important to point out, that we’re not going to dive deep into website development, including HTML, Typescript and CSS. However, there are some prerequisites that must be covered in order to follow this guide successfully:</p><ul><li>Node.js and Angular must be installed on your machine. You can find step-by-step instructions <a href="https://nodejs.org/en/download">here</a> and <a href="https://angular.dev/installation">here</a>.</li><li>An active AWS account. If you haven’t created one yet, you can easily do so <a href="https://aws.amazon.com/console/">here</a>.</li></ul><p><strong>Step 1. Create Angular application</strong></p><p>Let’s take it step by step by creating our website locally. As we mentioned before, one of the prerequisites is that Node.js and Angular must be installed locally. To check that everything is properly installed, we just need to open a terminal and run the following command:</p><pre>ng --version</pre><p>If everything is installed correctly, we should see something similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*nUcOBVxIk2b0Y6UtxaJKEw.png" /></figure><p>Now, we can easily create a static Angular application. Let’s call it angular-aws-demo-app. In the same terminal, we type:</p><pre>ng new angular-aws-demo-app</pre><p>We follow the installation instructions, and as soon as the process is completed, we can open our workspace in an IDE, for example VS Code, by typing:</p><pre>cd angular-aws-demo-app<br>code .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dbMq4eZP30PiGbjoGDGaog.png" /></figure><p>Finally, we can run our application locally. In the application’s terminal (Command prompt or Git Bash, but <strong>NO Powershell</strong>) we type:</p><pre>ng serve</pre><p>Our static web app will then be available in the browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*ebVtE3_iKTYpVWSY-3BOAw.png" /></figure><p><strong>Step 2. Create an S3 Bucket in Amazon S3</strong></p><p>Now that we have completed the website development, it is time to jump into the AWS console.</p><p>Since we need a place where we can store our website’s files (in other words, we need a <strong><em>bucket)</em></strong>, we’ll search for Amazon S3 in the search bar. Inside the S3 console we select <strong><em>Create bucket</em></strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*hrZK_bczjHTaoBwwf_XYEA.png" /></figure><p>In order to successfully create the bucket, the main thing we need is a unique name. Inside section “<strong><em>General Configuration”</em></strong> , we type the bucket’s name and we click <strong>Create bucket</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*sa1K5U_Vp-smxCoCt4NZeg.png" /></figure><p><strong>Step 3. Deploy your website in Amazon S3 bucket</strong></p><p>Now that our bucket has been created, we can publish our website, by storing its files inside the S3 bucket and connecting it to the domain name we chose earlier.</p><p>On our machine, inside the folder of our website, we open a terminal and execute the following command, which will create a folder named <strong><em>dist</em></strong> inside our website’s workspace:</p><pre>$ ng build</pre><p>Moving back to our S3 bucket, the following images, describe the process of uploading the files and folders of our previously built application, and as well as the configuration that needs to be applied in order for our app to be deployed and accessed.</p><blockquote>Upload folder &amp; files</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XYhg1XIYdyU-jrxexVS2xQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j4_KXRJHhtf2vbN_Nq-EBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*T9gP0jZGQjfIp-VN0n_ZAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14cyvdIwCWPbeoJTwEkBpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*D0Ev0thVL-k93MBj2glKkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l3YD2CfwQay5sMI4SYs4Cg.png" /></figure><blockquote>Static website hosting (Tab <strong>Properties</strong>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*4h32DIJ51nwpOCsYkultQg.png" /></figure><blockquote>Object ownership (Tab <strong>Permissions</strong>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*GEDb3-v0UQa6owCjjlU34Q.png" /></figure><blockquote>Block Public Access (Tab <strong>Permissions</strong>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*sICXZcPzXlIzwU_u60ef7g.png" /></figure><blockquote>Make objects public (Tab <strong>Objects</strong>)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*bHOxL4u91RC4ddNo99dfXw.png" /></figure><p>After the last step, we can navigate to the file <strong><em>index.html</em></strong> inside the <strong><em>brower </em></strong>folder, click on <strong><em>Object URL</em></strong> and our web app will open on anew tab on our browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*w52WjDmt5PRZMsFUTT0WGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*OObrVQN9IjzjQ3bl_9O6Ow.png" /></figure><p>And that’s it!</p><p>You have successfully deploy your static website to an S3 bucket and made it available online!</p><p>Congratulations!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca4978cecfef" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>