In this blog post, we’ll explore how to trigger an Amazon SageMaker Jupyter notebook file from an AWS Lambda function using WebSockets. This method allows you to automate your machine learning workflows and run Jupyter notebooks on demand, providing a powerful tool for data scientists and engineers. Prerequisites Before we dive in, ensure you have […]
Hello Everyone, AWS Lambda is phasing out support for Python 3.7 following Python 3.7 reaching its End-Of-Life on June 27, 2023. To ensure the smooth operation of your functions, AWS strongly advises upgrading your Python 3.7 functions to Python 3.10 or Python 3.11 before November 27, 2023. AWS follows a two-stage process for ending support […]
Hey , In this Video we are going to learn Step function AWS service with real-time Scenario. We will trigger step function from Lambda as soon as file will drop into S3 bucket. We have configured Two lambda in our Step function’s state Machine, first will truncate the redshift table and 2nd will copy […]
import json import boto3 import pandas as pd from datetime import datetime import s3fs from urllib.parse import unquote def lambda_handler(event, context): # TODO implement now = datetime.now() date_time=now.strftime(“%Y-%m-%d_%H-%M-%S”) s3 = boto3.client(‘s3′) bucket=’deltafrog-training-dev’ src_Key=’real_time_data/’ dest_file=”s3://deltafrog-training-dev/combined_data/anual_combined_” archive_Key=’archive/’ res=s3.list_objects(Bucket=bucket,Prefix=src_Key) print(res) fname_list=[] final_df=pd.DataFrame() if “Contents” in res: for i in res[“Contents”]: print(i) if “csv” in i[‘Key’]: filename=i[‘Key’].split(‘/’)[-1] print(filename) fname_list.append(filename) […]
I have create the Video and explain the same. Below is the code used in Video tutorial ###### import json import boto3 from datetime import datetime import psycopg2 from env import ENV from settings import credential,REDSHIFT_ROLE,BUCKET ENV=’dev’ credential = { ‘dbname’ : ‘dev’, ‘port’ : ‘5439’, ‘user’ : ‘awsuser’, ‘password’ : ‘Deltafrog#123’, ‘host_url’:’redshift-cluster-1.cgymtibgpcfw.us-east-1.redshift.amazonaws.com’ } […]
In Lambda when we write code in python we need to import some module that is not build in . As Lambda is serverless service and We dont have access to server where we can do “pip install module”. In this case we need to create layer for that we have to download required module […]
1)How to get user input in Python 2)Write Python Program to Find the Square Root 3)Write Python Program to Calculate the Area of a Triangle 4)Write Python program to swap two variables with and without using temp variable. 5)Write Python program to check if a number is positive or negative 6)Write Python Program to Check […]