├── README.md └── creating-a-lambda-function-using-the-aws-console └── index.js /README.md: -------------------------------------------------------------------------------- 1 | # CCP - Hands-on Labs 2 | -------------------------------------------------------------------------------- /creating-a-lambda-function-using-the-aws-console/index.js: -------------------------------------------------------------------------------- 1 | const https = require('https') 2 | let url = "https://www.amazon.com" 3 | 4 | exports.handler = function(event, context, callback) { 5 | https.get(url, (res) => { 6 | callback(null, res.statusCode) 7 | }).on('error', (e) => { 8 | callback(Error(e)) 9 | }) 10 | } --------------------------------------------------------------------------------