Skip to content

Instantly share code, notes, and snippets.

@kixorz
kixorz / aws_lambda_public_ip.js
Last active February 14, 2024 07:39
Function retrieving AWS Lambda public IP address. Copy and paste this to your Lambda console, use standard permissions, execute and observe the log to see the public IP address of your Lambda function.
var http = require('http');
exports.handler = function(event, context) {
http.get('http://httpbin.org/get', function(res) {
var body = '';
res.on('data', function(chunk) {
body += chunk;
});
res.on('end', function() {