Secrets are meant to be... well, secret.
We can not to expose important secure keys (like database passwords) to the outside world.
As such, hardcoding passwords inside of your source code is a terrible idea.
Luckily, with AWS Lambda we can avoid that - we're going to learn how we can use environment variables in order to pass in a password to a lambda function without potentially exposing it to the world.
Moreover using KMS , we can encrypt the environment variables & make the system more secured.
In this video , I have explained the basic concept of KMS , and how to use this to encrypt and decrypt secured credentials.
Prerequisite:
Extract data from an API Python , Talend
• Extract data from an API Python , Talend
Base Code:
import boto3
import requests
import json
def lambda_handler(event, context):
city_name=
api_key=
url="http://api.openweathermap.org/data/2...."+city_name+"&appid="+api_key+"&units=metric"
print("URL for API: ",url)
result=requests.get(url)
data_extracted=result.json()
temp_city=data_extracted['main']['temp']
message="The temperature of {} city : ".format(city_name)
print(message,temp_city)
Check this playlist for more AWS Projects in Big Data domain:
• Demystifying Data Engineering with Cloud C...
Auf dieser Seite können Sie das Online-Video Encrypt and Decrypt AWS Lambda Function Environment Variables using AWS KMS mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Knowledge Amplifier 06 Oktober 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,189 Mal angesehen und es wurde von 67 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!