Created
October 7, 2020 08:21
-
-
Save zainafzal88/76c412c4e1af7a88f839318e7edf210a to your computer and use it in GitHub Desktop.
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Transform": "AWS::Serverless-2016-10-31", | |
"Description": "An AWS Serverless Application that uses the ASP.NET Core framework running in Amazon Lambda.", | |
"Resources": { | |
"AspNetCoreFunction": { | |
"Type": "AWS::Serverless::Function", | |
"Properties": { | |
"Handler": "CommentsAPI::CommentsAPI.LambdaEntryPoint::FunctionHandlerAsync", | |
"Runtime": "dotnetcore3.1", | |
"CodeUri": "", | |
"MemorySize": 256, | |
"Timeout": 30, | |
"Role": null, | |
"Policies": [ | |
"AWSLambdaFullAccess", | |
"AmazonDynamoDBFullAccess" | |
], | |
"Events": { | |
"ProxyResource": { | |
"Type": "Api", | |
"Properties": { | |
"Path": "/{proxy+}", | |
"Method": "ANY" | |
} | |
}, | |
"RootResource": { | |
"Type": "Api", | |
"Properties": { | |
"Path": "/", | |
"Method": "ANY" | |
} | |
} | |
} | |
} | |
}, | |
"CommentsTable": { | |
"Type": "AWS::DynamoDB::Table", | |
"Properties": { | |
"AttributeDefinitions": [ | |
{ | |
"AttributeName": "id", | |
"AttributeType": "S" | |
} | |
], | |
"KeySchema" : [ | |
{ | |
"AttributeName": "id", | |
"KeyType": "HASH" | |
} | |
], | |
"TableName":"comments", | |
"ProvisionedThroughput": { | |
"ReadCapacityUnits": "1", | |
"WriteCapacityUnits": "1" | |
} | |
} | |
} | |
}, | |
"Outputs": { | |
"ApiURL": { | |
"Description": "API endpoint URL for Prod environment", | |
"Value": { | |
"Fn::Sub": "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/swagger" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment