<?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"><channel><title><![CDATA[AWS Lambda - redirect URL]]></title><description><![CDATA[<p dir="auto">To redirect URL using Lambda (and API Gateway)</p>
<pre><code class="language-javascript">export const handler = async(event) =&gt; {

    let redirectionUrl = "https://www.google.com";
    
    /*
    302 status is temporarily redirect
    301 status is permenent redirect
    */
    
    const response = {
        statusCode: 302,
        headers: {
            Location: redirectionUrl,
        }
    };
    return response;

};
</code></pre>
]]></description><link>https://bb.aizu.my/topic/24/aws-lambda-redirect-url</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 08:57:33 GMT</lastBuildDate><atom:link href="https://bb.aizu.my/topic/24.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Mar 2023 07:05:01 GMT</pubDate><ttl>60</ttl></channel></rss>