Загрузка страницы

Creating lambda function using cloudformation stack

This video show you creating lambda function using cloudformation stack.

---------------------------- Template Using code inside cloudformation stack -------------------------------

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "A template is for creating lambda ",
"Resources": {
"LambdaFunResource": {
"Type": "AWS::Lambda::Function",
"Properties": {
"FunctionName": "SurajLambdaCFT",

"Code": {
"ZipFile": {
"Fn::Join": [
"\n",
[

"def lambda_handler(event, context):",
" print('THIS IS LAMBDA CREATED FROM CloudFormation')",
" return 'success'"
]
]
}
},
"Description": "Used to run job",
"Handler": "index.lambda_handler",
"Role": "arn:aws:iam::13015229333333455024:role/lambda_basic_execution",
"Runtime": "python3.6",
"Timeout": 120
}
}
}
}

------------------- Template Using code (your lambda python code file) stored S3 Bucket ---------------------

{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "A template is for creating lambda from s3 buckets",
"Resources": {
"LambdaFunResource": {
"Type": "AWS::Lambda::Function",
"Properties": {
"FunctionName": "SurajLambdaCFT",

"Code": {
"S3Bucket" : "surajyt",
"S3Key" : "index.zip"
},
"Description": "Used to run job",
"Handler": "index.lambda_handler",
"Role": "arn:aws:iam::13015229333333455024:role/lambda_basic_execution",
"Runtime": "python3.6",
"Timeout": 120
}
}
}
}

Видео Creating lambda function using cloudformation stack канала Easy-Way To Learn
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
16 июня 2019 г. 17:30:13
00:08:54
Яндекс.Метрика