AWS람다 lambda-html

1 개요[ | ]

lambda-html
  • 런타임: Node.js 8.10
index.js
JavaScript
Copy
exports.handler = async (event, context) => {
    context.succeed('<html><head><title>HTML from API Gateway/Lambda</title></head><body><h1>HTML from API Gateway/Lambda</h1><p>안녕, 친구들!</body></html>');
};
실행결과
text
Copy
Response:
"<html><head><title>HTML from API Gateway/Lambda</title></head><body><h1>HTML from API Gateway/Lambda</h1><p>안녕, 친구들!</body></html>"

Request ID:
"8a3f1bf1-8623-48f0-a780-f6832c6b9f98"

Function Logs:
START RequestId: 8a3f1bf1-8623-48f0-a780-f6832c6b9f98 Version: $LATEST
END RequestId: 8a3f1bf1-8623-48f0-a780-f6832c6b9f98
REPORT RequestId: 8a3f1bf1-8623-48f0-a780-f6832c6b9f98	Duration: 156.00 ms	Billed Duration: 200 ms 	Memory Size: 128 MB	Max Memory Used: 72 MB

2 참고[ | ]