Encrypt and Decrypt AWS Lambda Function Environment Variables using AWS KMS

preview_player
Показать описание
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

Base Code:

import boto3
import requests
import json

def lambda_handler(event, context):
city_name=
api_key=
print("URL for API: ",url)
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:
Рекомендации по теме
Комментарии
Автор

awesome explanation with sufficient and appropriate coding example..
Loved it .. Please keep adding more ...:)

deepaksingh
Автор

awesome explanation, keep it up the good work :)

matteoiorio
Автор

Can you explain how to implement same encryption and decryption while writing python code (not in aws) to handle snowflake data too?

ravikreddy
Автор

It would get great help if you could present about python code/Lambda to decrypt PGP encrypted file in AWS S3 by invoking PGP keys (private key) from aws secrets manager ?

daxeshthakar
Автор

excellent content !!, crisp and clear. Thank you.

daxeshthakar
Автор

How can i do for use slider for dicom images?

katekeny
Автор

Bro can u do more videos on Snowflake...

sammy