Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"

Resources:
MyApi:
Type: "AWS::Serverless::Api"
Properties:
StageName: Prod
Auth:
DefaultAuthorizer: !Ref MyCognitoAuth
Authorizers:
MyCognitoAuth:
UserPoolArn: arn:aws:1
Identity:
Header: MyAuthorizationHeader
ValidationExpression: myauthvalidationexpression

MyFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://sam-demo-bucket/thumbnails.zip
Handler: index.handler
Runtime: nodejs8.10
Events:
Api:
Type: Api
Properties:
RestApiId: !Ref MyApi
Path: /
Method: get
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. DefaultAuthorizer is not a string."
}