Skills covered: 3.1.1, 3.1.2, 3.3.4, 3.4.1
sam init --runtime python3.12 --name my-api --app-template hello-world
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
Handler: app.lambda_handler
Runtime: python3.12
Events:
Api:
Type: Api
Properties:
Path: /items
Method: get
sam local invoke MyFunction -e events/event.json
sam local start-api
curl http://localhost:3000/items
sam build
sam deploy --guided