<?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: OMAR EL AALLAOUI</title>
    <description>The latest articles on DEV Community by OMAR EL AALLAOUI (@omarelaallaoui).</description>
    <link>https://dev.to/omarelaallaoui</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%2F1043359%2F81f99f5a-2a74-4aa5-8fdc-1322bb6ca684.jpg</url>
      <title>DEV Community: OMAR EL AALLAOUI</title>
      <link>https://dev.to/omarelaallaoui</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/omarelaallaoui"/>
    <language>en</language>
    <item>
      <title>“Boosting AWS Lambda Performance with Containerization: A Comprehensive Tutorial”</title>
      <dc:creator>OMAR EL AALLAOUI</dc:creator>
      <pubDate>Sat, 25 Mar 2023 13:55:40 +0000</pubDate>
      <link>https://dev.to/aws-builders/boosting-aws-lambda-performance-with-containerization-a-comprehensive-tutorial-i2h</link>
      <guid>https://dev.to/aws-builders/boosting-aws-lambda-performance-with-containerization-a-comprehensive-tutorial-i2h</guid>
      <description>&lt;p&gt;AWS Lambda is a serverless computing service that allows you to run code without the need to provision or manage servers. Lambda is ideal for running small, event-driven functions that execute on demand. However, as your application grows and you start processing more events, you may encounter performance issues. To improve the performance of your Lambda functions, you can use containerization. In this article, we will discuss how containerization can boost AWS Lambda performance and provide a comprehensive tutorial on how to containerize your Lambda functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Containerization?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Containerization is the process of packaging an application along with its dependencies and libraries into a single container image. The container image can then be deployed to any environment that supports containerization, such as Amazon Elastic Container Service (ECS) or Amazon Elastic Kubernetes Service (EKS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Containerization Boosts AWS Lambda Performance?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;AWS Lambda functions are limited in the amount of memory and CPU they can use, which can lead to performance issues when processing large volumes of events. By containerizing your Lambda functions, you can increase the amount of memory and CPU available to your functions, which can significantly improve performance.&lt;/p&gt;

&lt;p&gt;Containerization also allows you to package your Lambda function along with its dependencies and libraries, reducing the size of your deployment package and improving the cold start time of your functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Containerize Your AWS Lambda Functions?&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;To containerize your AWS Lambda functions, follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a Dockerfile The first step in creating a Lambda function using a container image is to create a Dockerfile. The Dockerfile is used to define the image that will be used to run the Lambda function. In the Dockerfile, you need to specify the base image, copy the code and dependencies, and define the command that will be used to run the Lambda function.&lt;/p&gt;

&lt;p&gt;Here is an example Dockerfile for a Python-based Lambda function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; public.ecr.aws/lambda/python:3.8&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; app.py requirements.txt ./&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--no-cache-dir&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["app.lambda_handler"]&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This Dockerfile starts with the public.ecr.aws/lambda/python:3.8 base image, copies the app.py file and the requirements.txt file to the image, installs the dependencies specified in the requirements.txt file using pip, and sets the command to run the lambda_handler function in the app.py file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Build and Push the Container Image to ECR Once you have created the Dockerfile, you need to build and push the container image to Amazon Elastic Container Registry (ECR). ECR is a fully-managed container registry that makes it easy to store, manage, and deploy Docker container images.&lt;/p&gt;

&lt;p&gt;To build the container image, run the following command in the directory containing the Dockerfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker build -t my-lambda-image .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command builds the Docker image using the Dockerfile in the current directory and tags the image with the name my-lambda-image.&lt;/p&gt;

&lt;p&gt;To push the container image to ECR, you need to create a repository in the ECR console and follow the instructions to authenticate and push the image. For more information, refer to the ECR documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Create a Lambda Function Using the Container Image Once you have built and pushed the container image to ECR, you can create a Lambda function using the container image. To create a Lambda function, go to the Lambda console, select “Create function”, and choose “Container image” as the function type.&lt;/p&gt;

&lt;p&gt;In the “Container image” section, enter the name of the ECR repository that contains your container image, select the image tag, and enter the memory allocation and timeout values.&lt;/p&gt;

&lt;p&gt;In the “Networking” section, you can configure your Lambda function to connect to a VPC or an Amazon Virtual Private Cloud (VPC).&lt;/p&gt;

&lt;p&gt;Finally, in the “Preview” section, you can test your Lambda function by entering the input payload and clicking on “Test”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Deploy and Test the Lambda Function Once you have created the Lambda function, you can deploy and test it. To deploy the Lambda function, click on the “Deploy” button in the Lambda console.&lt;/p&gt;

&lt;p&gt;To test the Lambda function, you can use the Test feature in the Lambda console or use the AWS Command Line Interface (CLI) to invoke the function. Here is an example of how to invoke the Lambda function using the AWS CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;aws lambda invoke --function-name my-lambda-function --payload '{"name": "Omar"}' response.json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In conclusion, containerizing your AWS Lambda functions can significantly boost their performance, scalability, and cost-effectiveness. By following the steps outlined in this article, you can easily create and deploy container images for your Lambda functions, and optimize them based on your specific requirements. With containerization, you can take full advantage of the benefits of AWS Lambda, and build powerful and efficient serverless applications.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>lambda</category>
      <category>awscommunitybuilders</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Build your first CRUD API with AWS ☁️</title>
      <dc:creator>OMAR EL AALLAOUI</dc:creator>
      <pubDate>Sat, 25 Mar 2023 13:32:06 +0000</pubDate>
      <link>https://dev.to/aws-builders/build-your-first-crud-api-with-aws-306k</link>
      <guid>https://dev.to/aws-builders/build-your-first-crud-api-with-aws-306k</guid>
      <description>&lt;p&gt;“ The purpose of this tutoriel is to build a very simple CRUD (Create , read, update, delete) API. To acheive this we will be guided through a few steps . From the DynamoDB console to the AWS Lambda console , we’ll learn how to create a DynamoDB table and Lambda function. After that, we’ll use the API Gateway interface to configure an HTTP API , and then we’ll use Postman to test your API ! ”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A9hg9l5gf8dRbcHTO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A9hg9l5gf8dRbcHTO.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Create A DynamoDB Table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;**Amazon DynamoDB **is a fully managed NoSQL database service with seamless scalability and quick and predictable performance. You don’t have to worry about hardware provisioning , setup and configuration, replication, software patching, or cluster scalability with DynamoDB because if offloads the administrative requirements of running and managing a distributed database.&lt;/p&gt;

&lt;p&gt;To &lt;strong&gt;create&lt;/strong&gt; a DynamoDB table :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the DynamoDB console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/dynamodb/" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/dynamodb/&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Create&lt;/strong&gt; Table&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2140%2F0%2Ap0famO5aSXFN9URU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2140%2F0%2Ap0famO5aSXFN9URU.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For Table name, enter &lt;strong&gt;crud-http-table&lt;/strong&gt; , for Primary key , enter &lt;strong&gt;id&lt;/strong&gt; and choose &lt;strong&gt;create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2Az0MVsdHu-xwl_Ojy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2Az0MVsdHu-xwl_Ojy.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our DynamoDB table becomes available after a few seconds .&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Create A Lambda Function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AWS Lambda is a compute service that allows you to run programs without the need for server provisioning or management. Lambda automatically scales from a few requests per day to thousands per second , running your code only when it’s needed.&lt;/p&gt;

&lt;p&gt;We create Lambda function for the backend of your API. this lambda function creates, reads, updates, and deletes (CRUD) items from DynamoDB. The function uses events from API Gateway to determine how to interact with DynamoDB.&lt;/p&gt;

&lt;p&gt;To &lt;strong&gt;create&lt;/strong&gt; a Lambda function&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;The Lambda console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/lambda" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/lambda&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Create function&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2288%2F0%2AkFC9GRbmBUB7X_5w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2288%2F0%2AkFC9GRbmBUB7X_5w.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fill the function name , I will use &lt;strong&gt;“ crud-http-function ”&lt;/strong&gt; for this example , Runtime &lt;strong&gt;Node.js 14.x&lt;/strong&gt; , Under Permissions choose &lt;strong&gt;Change default execution role&lt;/strong&gt; and select &lt;strong&gt;Create a new role from AWS policy templates&lt;/strong&gt;. For Role name , enter &lt;strong&gt;“ crud-http-role” **and choose **Simple microservice permissions&lt;/strong&gt; form Policy templates , this policy grants the Lambda function permission to interact with DynamoDB.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AO4xDlzpvA2Ptil_H.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AO4xDlzpvA2Ptil_H.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AnXmRg-ZBfMoYC_dR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AnXmRg-ZBfMoYC_dR.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scroll down to the console’s Code source editor ,open &lt;strong&gt;index.js&lt;/strong&gt; and replace its contents withe the following code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AGi75ch9H_UCOJ64e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AGi75ch9H_UCOJ64e.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/omaralaoui1/CRUD_API_NODEJS/blob/main/index.js" rel="noopener noreferrer"&gt;https://github.com/omaralaoui1/CRUD_API_NODEJS/blob/main/index.js&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;strong&gt;Deploy&lt;/strong&gt; to update your function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Create an HTPP API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Amazon API Gateway is a fully managed service that makes publishing, maintaining, monitoring, securing, and operating APIs at any size simple for developers.&lt;/p&gt;

&lt;p&gt;You can create RESTful APIs with API Gateway using either HTTP APIs or REST APIs. API Gateway, along with AWS Lambda, is the app-facing component of the AWS serverless infrastructure.&lt;/p&gt;

&lt;p&gt;To &lt;strong&gt;create&lt;/strong&gt; an &lt;strong&gt;HTTP API&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the API Gateway console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/apigateway&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;Create API&lt;/strong&gt; and choose &lt;strong&gt;build&lt;/strong&gt; for &lt;strong&gt;HTTP API&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2A7_xwEqF4TuLSEX68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2A7_xwEqF4TuLSEX68.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fill &lt;strong&gt;the API name&lt;/strong&gt; , I will use &lt;strong&gt;‘ crud-http-api ’&lt;/strong&gt; for name , for &lt;strong&gt;configure routes&lt;/strong&gt; choose &lt;strong&gt;Next&lt;/strong&gt; to skip route creation . we’ll create routes later .&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Create routes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AUhfKrayy1kqvXwJD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AUhfKrayy1kqvXwJD.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Routes are a way to send incoming API requests to backend resources. Routes consist of two parts: an HTTP method and a resource path, for example, &lt;strong&gt;GET /items&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For this example API, we create four routes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GET&lt;/strong&gt; /items/{id}&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GET&lt;/strong&gt; /items&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PUT&lt;/strong&gt; /items&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DELETE&lt;/strong&gt; /items/{id}&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To &lt;strong&gt;create&lt;/strong&gt; routes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the API Gateway console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/apigateway&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;your API ( crud-http-api )&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the left panel choose &lt;strong&gt;Routes&lt;/strong&gt; , and select &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AFlZlLI5WmZamGbNV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AFlZlLI5WmZamGbNV.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For &lt;strong&gt;Method&lt;/strong&gt;, choose &lt;strong&gt;GET&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For the path, enter /itemsand choose &lt;strong&gt;create **. Repeat the same thing for **GET&lt;/strong&gt; /items/{id}, &lt;strong&gt;DELETE&lt;/strong&gt; /items/{id}, and &lt;strong&gt;PUT&lt;/strong&gt; /items.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ANNeGa-lRpI_svcCo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ANNeGa-lRpI_svcCo.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AqecD82UjlwEJp_Nz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AqecD82UjlwEJp_Nz.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Create an integration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To connect a route to backend resources, you construct an &lt;strong&gt;integration&lt;/strong&gt;. These integrations will be attached to a route at a later time. You establish a single Lambda integration for this sample API, which you use for all routes.&lt;/p&gt;

&lt;p&gt;To &lt;strong&gt;create&lt;/strong&gt; an integration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the API Gateway console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/apigateway&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;your API ( crud-http-api )&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the left panel choose &lt;strong&gt;Integrations&lt;/strong&gt; , and select &lt;strong&gt;Manage integrations&lt;/strong&gt; and then choose &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ALIZRcyhRFh9U5brw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ALIZRcyhRFh9U5brw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;Integration&lt;/strong&gt; Type, choose &lt;strong&gt;Lambda Function&lt;/strong&gt; and enter &lt;strong&gt;“ crud-http-function ”&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ALH_sQJiSyxpdFTL-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ALH_sQJiSyxpdFTL-.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;strong&gt;Create&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Attach your integration to routes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All routes in this example API use the same AWS Lambda integration.&lt;/p&gt;

&lt;p&gt;To attach integrations to routes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the API Gateway console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/apigateway&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select &lt;strong&gt;your API ( crud-http-api )&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the left panel choose &lt;strong&gt;Integrations&lt;/strong&gt; , and select a &lt;strong&gt;route&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under Choose an existing integration , choose &lt;strong&gt;“ crud-http-function”&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2A6fNf1cFsU1XrrNSw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2A6fNf1cFsU1XrrNSw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;strong&gt;attach integration&lt;/strong&gt; , Repeat the same thing for all routes .&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_xOYykdKDZCSzE_E.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_xOYykdKDZCSzE_E.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All routes show that an AWS Lambda integration is attached.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Test your API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To make sure that our API is working , we use Postman , an API Platform for building and using APIs.&lt;/p&gt;

&lt;p&gt;To get the URL to invoke your API:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open &lt;strong&gt;the API Gateway console&lt;/strong&gt; at &lt;a href="https://console.aws.amazon.com/apigateway" rel="noopener noreferrer"&gt;**https://console.aws.amazon.com/apigateway/&lt;/a&gt;**&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;your API&lt;/strong&gt; , and Note &lt;strong&gt;your API’s invoke URL&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AfgVHYD5P7aQtdUin.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2AfgVHYD5P7aQtdUin.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Copy your API’s invoke URL .&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To create an item with PUT Method :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open Postman and add your API’s URL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;PUT Method&lt;/strong&gt; to send your data to &lt;strong&gt;Dynamodb Table&lt;/strong&gt; through &lt;strong&gt;API Gateway&lt;/strong&gt; and &lt;strong&gt;Lambda Function&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a request body with &lt;strong&gt;item’s ID&lt;/strong&gt;, &lt;strong&gt;first_name&lt;/strong&gt; , &lt;strong&gt;last_name&lt;/strong&gt; and &lt;strong&gt;age&lt;/strong&gt; .&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AEAulMm0PeDqca1k-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AEAulMm0PeDqca1k-.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AEqpm8xbxvdjcHIk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AEqpm8xbxvdjcHIk0.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;To get all items :&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AK1X18mhkAbmZ_upa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AK1X18mhkAbmZ_upa.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;To delete an item:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AjdjKxzStlIooLC-j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AjdjKxzStlIooLC-j.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps ….
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can automate the creation of AWS resources by using **AWS CloudFormation *&lt;/em&gt;.*&lt;br&gt;
 If you enjoyed this article, share it with your friends and colleagues! &lt;em&gt;😃s&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AiG93YytYynGtGUYn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AiG93YytYynGtGUYn.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>awscommunity</category>
      <category>api</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>"Docker and WebAssembly: A Love Story ❤️ of Two Technologies Destined to be Together "</title>
      <dc:creator>OMAR EL AALLAOUI</dc:creator>
      <pubDate>Sat, 11 Mar 2023 22:28:42 +0000</pubDate>
      <link>https://dev.to/aws-builders/docker-and-webassembly-a-love-story-of-two-technologies-destined-to-be-together--3hp9</link>
      <guid>https://dev.to/aws-builders/docker-and-webassembly-a-love-story-of-two-technologies-destined-to-be-together--3hp9</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;🚀 “Say goodbye to the old ways of deploying web apps and hello to the dynamic duo of Docker and WebAssembly! Faster, more secure, and endlessly portable. ”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.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%2F17ybgoryjk0ynfmuazzv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F17ybgoryjk0ynfmuazzv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In recent years, both Docker and WebAssembly (WASM) have gained significant popularity in the tech community. Docker provides a way to package applications and their dependencies into lightweight containers that can be deployed and run consistently across different environments. Meanwhile, WebAssembly is a new kind of bytecode that allows developers to run compiled code in the browser at near-native speeds, opening up new possibilities for high-performance web applications. When combined, these two technologies can provide a powerful platform for building and deploying modern web applications that are portable, scalable, and secure.&lt;/p&gt;

&lt;p&gt;So, how do Docker and WebAssembly work together? One way is by using Docker to package and deploy WebAssembly applications. Because WebAssembly can be compiled from a variety of languages, it’s possible to build complex applications that run entirely in the browser, without the need for a traditional server-side backend. &lt;/p&gt;

&lt;p&gt;Integration between Docker and WebAssembly has been made possible through the use of a tool called WASI (WebAssembly System Interface). WASI provides a standardized interface between WebAssembly modules and the host operating system, allowing developers to write code that can be executed both in the browser and in the Docker container. This makes it possible to build applications that can be deployed in a variety of environments, from desktops and servers to mobile devices and even IoT devices.&lt;/p&gt;

&lt;p&gt;One of the main benefits of using Docker and WebAssembly together is portability. Docker containers are designed to be lightweight and easily transportable, making it easy to move an application from one environment to another without having to worry about dependencies or compatibility issues. Meanwhile, WebAssembly modules can be written in a variety of languages, including C, C++, Rust, and even Python, which opens up new possibilities for building web applications that are not limited to JavaScript.&lt;/p&gt;

&lt;p&gt;Another benefit of using Docker and WebAssembly together is performance. WebAssembly modules can be compiled to run at near-native speeds, which makes it possible to build high-performance web applications that can compete with native desktop applications. Docker containers provide a way to isolate and optimize the execution environment for a specific application, which can further improve performance and scalability.&lt;/p&gt;

&lt;p&gt;To demonstrate the power of Docker and WebAssembly integration, let’s walk through a simple example.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Write a C program that prints "Hello, world!" to the console.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, world!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Compile the program to WebAssembly using Emscripten.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;emcc&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="n"&gt;hello&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wasm&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Create a Dockerfile that defines the container environment and copies the WebAssembly module into the container.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; ubuntu:latest&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; hello.wasm .&lt;/span&gt;

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["wasmtime", "hello.wasm"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Build the Docker container using the Docker build command.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker build -t wasm-demo .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Run the Docker container using the Docker run command.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;docker run wasm-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. Verify that the "Hello, world!" message is printed to the console.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this demo, we've created a simple C program that prints "Hello, world!" to the console, and compiled it to WebAssembly using the Emscripten toolchain. We've also created a Dockerfile that defines the container environment and copies the WebAssembly module into the container. Finally, we've built and run the Docker container to execute the WebAssembly module and print the "Hello, world!" message to the console.&lt;/p&gt;

&lt;p&gt;The impact of using Docker and WebAssembly together in web development is significant. By enabling high-performance web applications that can be deployed anywhere, developers can build more powerful and scalable web applications than ever before. With the ability to package applications into lightweight and portable containers, deployment and scaling become much simpler, allowing developers to focus on building great applications instead of worrying about infrastructure.&lt;/p&gt;

&lt;p&gt;In conclusion, integrating Docker and WebAssembly can provide significant benefits in terms of portability, performance, security, productivity, and collaboration. By leveraging the strengths of these two technologies, developers can create high-performance, secure, and portable web applications that can run anywhere. Whether you are building a new web application from scratch or optimizing an existing one, it is worth considering the potential benefits of integrating Docker and WebAssembly.&lt;/p&gt;

</description>
      <category>containers</category>
      <category>webassembly</category>
      <category>awscommunitybuilders</category>
    </item>
    <item>
      <title>Manage AWS services directly from Kubernetes ☸️</title>
      <dc:creator>OMAR EL AALLAOUI</dc:creator>
      <pubDate>Sat, 11 Mar 2023 20:40:30 +0000</pubDate>
      <link>https://dev.to/aws-builders/manage-aws-services-directly-from-kubernetes-1183</link>
      <guid>https://dev.to/aws-builders/manage-aws-services-directly-from-kubernetes-1183</guid>
      <description>&lt;h2&gt;
  
  
  Manage AWS services directly from Kubernetes ☸️
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A5Tsj7O3g_AMPDbs3ehIIkQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A5Tsj7O3g_AMPDbs3ehIIkQ.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Kubernetes in production often requires integration with various AWS services such as S3, RDS, SQS, etc. Developers or Kubernetes cluster admins have had to manage the containerized application and the associated AWS services separately.&lt;/p&gt;

&lt;p&gt;To solve this complexity, the AWS team has released the ACK project, which allows users to control both the application and AWS services from a single location using the Kubernetes CLI.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;AWS Controllers for Kubernetes (ACK) *&lt;/em&gt;⤵️​&lt;/p&gt;

&lt;p&gt;AWS Controllers for Kubernetes (ACK) is an open-source project which defines a framework to build custom controllers (or Kubernetes Operators) for AWS services. Developers or cluster admins can define, create, deploy, control, update, delete, and manage Amazon services directly from within Kubernetes clusters using these custom controllers.&lt;/p&gt;

&lt;p&gt;ACK controllers now allow centralized management through the Kubernetes CLI. You can now manage both Kubernetes-native applications and the associated AWS services, using the same Kubernetes API.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 &lt;strong&gt;Demo : Creating S3 Bucket From Kubernetes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AngHdWS_XsuixqLtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AngHdWS_XsuixqLtf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🚀 Install the ACK service controller for S3 with helm
&lt;/h3&gt;

&lt;p&gt;Before installing a Helm chart, you must first make the Helm chart available on the deployment host. To do so, use the helm pull command and then extract the chart:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export HELM_EXPERIMENTAL_OCI=1

export HELM_EXPERIMENTAL_OCI=1 
export SERVICE=s3 
export RELEASE_VERSION=`curl -sL https://api.github.com/repos/aws-controllers-k8s/s3-controller/releases/latest | grep '"tag_name":' | cut -d'"' -f4` 
export CHART_EXPORT_PATH=/tmp/chart 
export CHART_REF=$SERVICE-chart 
export CHART_REPO=public.ecr.aws/aws-controllers-k8s/$CHART_REF export CHART_PACKAGE=$CHART_REF-$RELEASE_VERSION.tgz  
mkdir -p $CHART_EXPORT_PATH  
helm pull oci://$CHART_REPO --version $RELEASE_VERSION -d $CHART_EXPORT_PATH 
tar xvf $CHART_EXPORT_PATH/$CHART_PACKAGE -C $CHART_EXPORT_PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Once the Helm chart is downloaded and exported, you can install a particular ACK service controller using the helm install command:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ACK_SYSTEM_NAMESPACE=ack-system 
export AWS_REGION=us-west-2  
helm install --create-namespace --namespace $ACK_SYSTEM_NAMESPACE ack-$SERVICE-controller \     
--set aws.region="$AWS_REGION" \     
$CHART_EXPORT_PATH/$SERVICE-chart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;The commands above set the target service region of the S3 controller to us-west-2. Be sure to specify your target service region in the AWS_REGION variable. This will be the &lt;em&gt;default&lt;/em&gt; AWS region in which resources will be created by the ACK service controller.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  🚀 Configuring credentials
&lt;/h3&gt;

&lt;p&gt;There are multiple ways in which you can configure an ACK service controller to use a particular set of AWS credentials:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Web identity token file (recommended) &lt;a href="https://aws-controllers-k8s.github.io/community/docs/user-docs/irsa/" rel="noopener noreferrer"&gt;#&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shared credentials file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Access key and secret access key environment variables&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;in our case, we will use the third method.&lt;/p&gt;
&lt;h3&gt;
  
  
  Use access key and secret access key environment variables
&lt;/h3&gt;

&lt;p&gt;you set manually the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY environment variables on the ACK service controller’s Pod:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl -n ack-system set env deployment/ack-s3-controller-s3-chart
\     
AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \     AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  🚀 Create an ACK Resource
&lt;/h3&gt;

&lt;p&gt;⚡️ &lt;strong&gt;Create a S3 Bucket&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create and apply the manifest ​​​⤵️&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;✔️ Check created S3Bucket&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AKhYIjeXPJbHZKRJkh4DRvQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AKhYIjeXPJbHZKRJkh4DRvQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2926%2F1%2Ajn5seDqnjY-HRaTNC-bk2w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2926%2F1%2Ajn5seDqnjY-HRaTNC-bk2w.jpeg" alt="-"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;➡️ Using ACK to create AWS resources is a huge plus for those who love managing AWS resources via k8s manifests within the Kubernetes Cluster.&lt;/p&gt;

&lt;p&gt;— — — — — — — — — — — — — — — — — — — — — — — — — — — — OMAR&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>s3</category>
      <category>awscommunitybuilders</category>
    </item>
  </channel>
</rss>
