From e8c688f58a4a6a1440027419af28424cbfe29a01 Mon Sep 17 00:00:00 2001 From: Ambuj Raj Date: Sun, 19 May 2024 22:36:21 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Required=20API=20key=20in=20SAM?= =?UTF-8?q?=20template?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/template.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/middleware/template.yaml b/middleware/template.yaml index f961847..c814f4e 100644 --- a/middleware/template.yaml +++ b/middleware/template.yaml @@ -102,6 +102,8 @@ Resources: Ref: ByteShareAPIGW Path: /health Method: any + Auth: + ApiKeyRequired: true UploadApi: Type: Api Properties: @@ -109,6 +111,8 @@ Resources: Ref: ByteShareAPIGW Path: /upload/{proxy+} Method: any + Auth: + ApiKeyRequired: true DownloadApi: Type: Api Properties: @@ -116,6 +120,8 @@ Resources: Ref: ByteShareAPIGW Path: /download/{proxy+} Method: any + Auth: + ApiKeyRequired: true FeedbackApi: Type: Api Properties: @@ -123,6 +129,8 @@ Resources: Ref: ByteShareAPIGW Path: /feedback Method: any + Auth: + ApiKeyRequired: true SubscribeApi: Type: Api Properties: @@ -130,6 +138,8 @@ Resources: Ref: ByteShareAPIGW Path: /subscribe Method: any + Auth: + ApiKeyRequired: true SecuredApi: Type: Api Properties: @@ -139,6 +149,7 @@ Resources: Method: any Auth: Authorizer: AWS_IAM + ApiKeyRequired: true WebhookApi: Type: Api Properties: @@ -159,6 +170,8 @@ Resources: StageName: prod OpenApiVersion: "3.0.0" TracingEnabled: true + Auth: + ApiKeyRequired: true Cors: AllowMethods: "'OPTIONS,GET,POST,PUT,DELETE'" AllowHeaders: "'Content-Type,X-Amz-Date,Authorization,x-api-key,X-Amz-Security-Token,File-Length,X-Auth-Token'"