/books/{id}:
delete:
responses:
"200":
description: 200 response
headers:
Access-Control-Allow-Origin:
type: string
x-amazon-apigateway-integration:
uri:
Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${BookDelete.Arn}/invocations"
responses:
default:
statusCode: 200
responseParameters:
method.response.header.Access-Control-Allow-Origin: "'*'"
passthroughBehavior: when_no_match
httpMethod: POST #always POST
type: aws_proxy
Events:
DeleteBook:
Type: Api
Properties:
Path: /books/{id}
Method: delete
RestApiId:
Ref: BookApi
sam build
sam deploy --guided
Enter “y” if asked “BookDelete may not have authorization defined, Is this okay? [y/N]: "
BinaryMediaTypes:
- multipart~1form-data
sam build
sam deploy --guided