-
Notifications
You must be signed in to change notification settings - Fork 18
/
template.yaml
45 lines (37 loc) · 1.49 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
lambda-authorizer-basic-auth
SAM Template for lambda-authorizer-basic-auth
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 3
Resources:
LambdaAuthorizerBasicAuthFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: lambda_authorizer_basic_auth/build/
Handler: app.lambda_handler
Runtime: python2.7
Tracing: Active
Policies:
- DynamoDBReadPolicy:
TableName: !Ref LambdaAuthorizerBasicAuthUserTable
Environment:
Variables:
TABLE_NAME: lambda-authorizer-basic-auth-users
LOG_LEVEL: INFO
LambdaAuthorizerBasicAuthUserTable:
Type: AWS::Serverless::SimpleTable
Properties:
TableName: lambda-authorizer-basic-auth-users
PrimaryKey:
Name: username
Type: String
SSESpecification:
SSEEnabled: true
Outputs:
LambdaAuthorizerBasicAuthFunction:
Description: "Lambda Authorizer Basic Auth Function ARN"
Value: !GetAtt LambdaAuthorizerBasicAuthFunction.Arn