
Serverless Framework Has a Free API That Deploys Lambda Functions in 60 Seconds
Serverless Framework is the original infrastructure-as-code tool for serverless. Define your Lambda functions, API Gateway, DynamoDB, and S3 in one YAML file. serverless.yml: Your Entire Backend service : scraping-api frameworkVersion : ' 4' provider : name : aws runtime : nodejs20.x region : us-east-1 environment : TABLE_NAME : ${self:service}-products BUCKET_NAME : ${self:service}-data functions : scrape : handler : src/handlers/scrape.handler timeout : 300 memorySize : 512 events : - http : path : /scrape method : post cors : true - schedule : rate : rate(1 hour) input : source : scheduled getProducts : handler : src/handlers/products.list events : - http : path : /products method : get cors : true getProduct : handler : src/handlers/products.get events : - http : path : /products/{id} method : get cors : true resources : Resources : ProductsTable : Type : AWS::DynamoDB::Table Properties : TableName : ${self:provider.environment.TABLE_NAME} BillingMode : PAY_PER_REQUEST AttributeDef
Continue reading on Dev.to DevOps
Opens in a new tab


