Reputation: 115
I am trying to redirect few domains to one with AWS Lambda
The logic is following:
exports.handler = async (event) => {
const response = {
statusCode: 301,
headers: {
Location: 'https://example.com'
}
};
return response;
};
Expected result:
When I open example.eu it returns me 301 Moved Permanently https://example.com
Upvotes: 0
Views: 821
Reputation: 115
As @Tobin pointed out - I had an issue with the security group. I've recreated the security group for 443 and 80 ports and it worked.
Upvotes: 1