Implement a CloudWatch Events Rule That Calls an AWS Lambda Function

  Рет қаралды 2,573

Knowledge Amplifier

Knowledge Amplifier

Күн бұрын

Пікірлер: 1
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 жыл бұрын
Code: import requests import json import boto3 def lambda_handler(event, context): city_name="Orlando" api_key="****************" url="api.openweathermap.org/data/2.5/weather?q="+city_name+"&appid="+api_key+"&units=metric" print("URL for API: ",url) result=requests.get(url) data_extracted=result.json() temp_orlando=data_extracted['main']['temp'] subject = 'Temperature Information of Orlando' client = boto3.client("ses") body = """ This mail comes from AWS Lambda Event Scheduling. Current temperature of Orlando is {} . """.format(temp_orlando) message = {"Subject": {"Data": subject}, "Body": {"Html": {"Data": body}}} response = client.send_email(Source = "****************", Destination = {"ToAddresses": ["****************"]}, Message = message) print("The mail is sent successfully")
Build and automate Serverless DataLake using an AWS Glue , Lambda , Cloudwatch
39:06
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 28 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
37:51
bayGUYS
Рет қаралды 1,6 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 131 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 42 МЛН
AWS Cloudwatch Alarm Setup Tutorial | Step by Step
16:54
Be A Better Dev
Рет қаралды 93 М.
7 Design Patterns EVERY Developer Should Know
23:09
ForrestKnight
Рет қаралды 108 М.
Meet Willow, our state-of-the-art quantum chip
6:39
Google Quantum AI
Рет қаралды 1,2 МЛН
Automate Start-Stop EC2 Instances Using Lambda - Step-by-Step Guide
8:45
Schedule AWS Lambda Functions Using EventBridge
7:22
Ajay Wadhara
Рет қаралды 15 М.
Chinese app design: weird, but it works. Here's why
10:51
Phoebe Yu
Рет қаралды 568 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 28 МЛН