Created
May 10, 2019 21:13
-
-
Save deeheber/fdfd05ad3fc5be519058c611aaacbbfa to your computer and use it in GitHub Desktop.
GetFile Function YAML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GetFile: | |
Type: AWS::Serverless::Function | |
Properties: | |
FunctionName: !Sub ${AWS::StackName}-GetFile | |
Description: !Sub | |
- Stack ${StackTagName} Environment ${EnvironmentTagName} Function ${ResourceName} | |
- ResourceName: GetFile | |
CodeUri: src/GetFile | |
Handler: index.handler | |
Runtime: nodejs8.10 | |
MemorySize: 3008 | |
Timeout: 30 | |
Tracing: Active | |
Policies: | |
- AWSXrayWriteOnlyAccess | |
- Version: 2012-10-17 | |
Statement: | |
- Effect: Allow | |
Resource: !GetAtt Table.Arn | |
Action: | |
- dynamodb:GetItem | |
- dynamodb:Scan | |
Events: | |
ApiGETfile: | |
Type: Api | |
Properties: | |
Path: /file | |
Method: GET | |
RestApiId: !Ref Api | |
Environment: | |
Variables: | |
TABLE_NAME: !Ref Table | |
TABLE_ARN: !GetAtt Table.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment