Pedro Ricardo Muñoz Amador
Diego Quintana Hernández
Pedro Ricardo Muñoz Amador
Diego Quintana Hernández
Julio Cesar Arbieto Chavez
john ct
john ct
john ct
Usuario anónimo
john ct
john ct
john ct
Para Python existe una libreria que hace despliegues de lambdas de forma rápida: https://aws.github.io/chalice/index
No sabes cómo te agradezco tu aporte, ya me veía con un montón de trabajo por delante pasando mi API de FastAPI a serverless. 💚
Cuando utilizar AWS::Serverless::Function o AWS::Lambda::Function
documentation site: https:// docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
json> { "Type" : "AWS::Lambda::Function", "Properties" : { "Code" : Code, "DeadLetterConfig" : DeadLetterConfig, "Description" : String, "Environment" : Environment, "FileSystemConfigs" : [ FileSystemConfig, ... ], "FunctionName" : String, "Handler" : String, "KmsKeyArn" : String, "Layers" : [ String, ... ], "MemorySize" : Integer, "ReservedConcurrentExecutions" : Integer, "Role" : String, "Runtime" : String, "Tags" : [ Tag, ... ], "Timeout" : Integer, "TracingConfig" : TracingConfig, "VpcConfig" : VpcConfig } }
YAML> AWSTemplateFormatVersion: '2010-09-09' Description: Lambda function with cfn-response. Resources: primer: Type: AWS::Lambda::Function Properties: Runtime: nodejs12.x Role: arn:aws:iam::123456789012:role/lambda-role Handler: index.handler Code: ZipFile: | var aws = require('aws-sdk') var response = require('cfn-response') exports.handler = function(event, context) { console.log("REQUEST RECEIVED:\n" + JSON.stringify(event)) // For Delete requests, immediately send a SUCCESS response. if (event.RequestType == "Delete") { response.send(event, context, "SUCCESS") return } var responseStatus = "FAILED" var responseData = {} var functionName = event.ResourceProperties.FunctionName var lambda = new aws.Lambda() lambda.invoke({ FunctionName: functionName }, function(err, invokeResult) { if (err) { responseData = {Error: "Invoke call failed"} console.log(responseData.Error + ":\n", err) } else responseStatus = "SUCCESS" response.send(event, context, responseStatus, responseData) }) } Description: Invoke a function during stack creation. TracingConfig: Mode: Active
interesante :)
bien util ))
le hace falta bueno sonidoo.
AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and AWS CloudFormation takes care of provisioning and configuring those resources for you. You don't need to individually create and configure AWS resources and figure out what's dependent on what; AWS CloudFormation handles all of that. The following scenarios demonstrate how AWS CloudFormation can help.