<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>API Archives - Rhein-Ruhr-Informatik</title>
	<atom:link href="https://rhein-ruhr-informatik.de/en/category/articles/api/feed/" rel="self" type="application/rss+xml" />
	<link>https://rhein-ruhr-informatik.de/en/category/articles/api/</link>
	<description></description>
	<lastbuilddate>Mon, 18 Aug 2025 13:54:09 +0000</lastbuilddate>
	<language>en-US</language>
	<sy:updateperiod>
	hourly	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	

<image>
	<url>https://rhein-ruhr-informatik.de/wp-content/uploads/2025/03/cropped-favicon-32x32.png</url>
	<title>API Archives - Rhein-Ruhr-Informatik</title>
	<link>https://rhein-ruhr-informatik.de/en/category/articles/api/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Aufbau eines serverlosen REST-APIs mit AWS API Gateway und Lambda</title>
		<link>https://rhein-ruhr-informatik.de/en/2025/09/29/aufbau-eines-serverlosen-rest-apis-mit-aws-api-gateway-und-lambda/</link>
		
		<dc:creator><![CDATA[Rhein-Ruhr-Informatik]]></dc:creator>
		<pubdate>Mon, 29 Sep 2025 05:33:00 +0000</pubdate>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Artikel]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Serverless]]></category>
		<guid ispermalink="false">https://rhein-ruhr-informatik.de/?p=852</guid>

					<description><![CDATA[<p>In modern software development, speed and scalability are crucial. Companies want to deliver features quickly without worrying about maintaining infrastructure. This is where serverless computing shines.</p>
<p>With AWS Lambda and Amazon API Gateway, developers can build a fully functional REST API without managing servers. AWS automatically takes care<a class="moretag" href="https://rhein-ruhr-informatik.de/en/2025/09/29/aufbau-eines-serverlosen-rest-apis-mit-aws-api-gateway-und-lambda/"> Read more&#8230;</a></p>
<p>The post <a href="https://rhein-ruhr-informatik.de/en/2025/09/29/aufbau-eines-serverlosen-rest-apis-mit-aws-api-gateway-und-lambda/">Aufbau eines serverlosen REST-APIs mit AWS API Gateway und Lambda</a> appeared first on <a href="https://rhein-ruhr-informatik.de/en">Rhein-Ruhr-Informatik</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2 class="wp-block-heading">Introduction</h2>



<p>In modern software development, speed and scalability are crucial. Companies want to deliver features quickly without worrying about maintaining infrastructure. This is where serverless computing shines.<br><br>With AWS Lambda and Amazon API Gateway, developers can build a fully functional REST API without managing servers. AWS automatically takes care of scaling, availability, and billing — you only pay for the requests that are actually processed.<br><br>In this article, we will explore how to set up a simple REST API using AWS API Gateway and AWS Lambda, with examples in Python.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" width="900" height="484" src="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/08/image-7.png" alt="" class="wp-image-853" style="width:619px;height:auto" srcset="https://rhein-ruhr-informatik.de/wp-content/uploads/2025/08/image-7.png 900w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/08/image-7-300x161.png 300w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/08/image-7-768x413.png 768w, https://rhein-ruhr-informatik.de/wp-content/uploads/2025/08/image-7-18x10.png 18w" sizes="(max-width: 900px) 100vw, 900px" /></figure></div>


<h2 class="wp-block-heading">What is Serverless?</h2>



<p>The term serverless doesn’t mean “no servers” — servers are still involved, but they are fully managed by the cloud provider. Developers focus only on writing code, while AWS handles:<br><br>– Provisioning and scaling (from zero to millions of requests)<br>– High availability<br>– Security and patching<br>– Billing based on actual usage<br><br>For REST APIs, the combination of API Gateway and Lambda has become a common pattern. Let’s see how they work together.</p>



<h2 class="wp-block-heading">Architecture Overview</h2>



<p>The flow looks like this:<br>1. A client (browser, mobile app, Postman) sends a request to an API Gateway endpoint.<br>2. API Gateway routes the request to a configured Lambda function.<br>3. The Lambda function runs your custom code (Python in our case).<br>4. Lambda returns a response, which API Gateway forwards back to the client.<br><br>This simple architecture is powerful because you can connect multiple Lambda functions to different API routes and methods (e.g., GET /users, POST /orders).</p>



<h2 class="wp-block-heading">Step-by-Step Setup</h2>



<h3 class="wp-block-heading">1. Create a Lambda Function</h3>



<p>1. Log in to the AWS Management Console.<br>2. Go to AWS Lambda → Create function.<br>3. Choose Author from scratch, give it a name (e.g., hello-world), and select Python 3.x as runtime.<br>4. In the code editor, paste the following function:</p>



<pre class="wp-block-code"><code>import json<br><br>def lambda_handler(event, context):<br>&nbsp;&nbsp;&nbsp; name = event.get("queryStringParameters", {}).get("name", "World")<br>&nbsp;&nbsp;&nbsp; return {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "statusCode": 200,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "headers": {"Content-Type": "application/json"},<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;"body": json.dumps({"message": f"Hello, {name}!"})<br>&nbsp;&nbsp;&nbsp; }</code></pre>



<h3 class="wp-block-heading">2. Create an API Gateway</h3>



<p>1. Go to Amazon API Gateway → Create API.<br>2. Choose HTTP API (simpler) or REST API (more configurable). For this tutorial, select HTTP API.<br>3. Create a new API and attach it to your Lambda function (hello-world).<br>4. Deploy the API.</p>



<h3 class="wp-block-heading">3. Test the API</h3>



<p>Once deployed, you will get an endpoint URL such as:<br><br><code>https://abc123.execute-api.us-east-1.amazonaws.com/default/hello-world</code><br><br>Now test it:<br><br><code>curl "https://abc123.execute-api.us-east-1.amazonaws.com/default/hello-world?name=Alice"</code><br><br>Response:<br><code>{ "message": "Hello, Alice!" }</code><br><br>Congratulations! You have just built a serverless REST API with AWS.</p>



<h2 class="wp-block-heading">Why Use API Gateway + Lambda?</h2>



<p>– Scalability: Handles traffic spikes automatically.<br>– Cost efficiency: Pay only when functions are executed.<br>– Simplicity: No server management, no patching, no scaling headaches.<br>– Flexibility: Connect Lambda to databases (DynamoDB, RDS), queues (SQS), or even event streams (Kinesis).</p>



<h2 class="wp-block-heading">Next Steps</h2>



<p>What we built is a minimal example. In production, you might:<br>– Add authentication &amp; authorization (AWS Cognito, IAM policies, custom JWT).<br>– Use Infrastructure as Code (AWS SAM, CDK, or Terraform).<br>– Enable logging &amp; monitoring (CloudWatch, X-Ray).<br>– Connect to other AWS services for full applications.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>AWS API Gateway and AWS Lambda together make it incredibly easy to create serverless REST APIs. With just a few clicks and a small Python script, you can deploy an endpoint that scales automatically and costs only when used.<br><br>If you are building modern applications, experimenting with microservices, or simply want to avoid server management, this serverless approach is a great starting point.</p><p>The post <a href="https://rhein-ruhr-informatik.de/en/2025/09/29/aufbau-eines-serverlosen-rest-apis-mit-aws-api-gateway-und-lambda/">Aufbau eines serverlosen REST-APIs mit AWS API Gateway und Lambda</a> appeared first on <a href="https://rhein-ruhr-informatik.de/en">Rhein-Ruhr-Informatik</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>