Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "AWSTemplateFormatVersion": "2010-09-09",
- "Transform": "AWS::Serverless-2016-10-31",
- "Resources": {
- "Myfunc01": {
- "Type": "AWS::Serverless::Function",
- "Properties": {
- "Handler": "index.handler",
- "Runtime": "nodejs12.x",
- "MemorySize": 512,
- "Timeout": 6,
- "Environment": {
- "Variables": {
- "ALTO_FUNCTION_ID": "Myfunc01",
- "ALTO_FUNCTION_NAME": "get-users",
- "ALTO_DEPLOYMENT_TIME": "2021-05-19T08:42:52.693Z",
- "TOPIC_MYSNS01": {
- "Ref": "MySns01"
- },
- "TABLE_DYNAMO01": {
- "Ref": "Dynamo01"
- }
- }
- },
- "Layers": [],
- "Events": {
- "ApiEndpoint03": {
- "Type": "Api",
- "Properties": {
- "Path": "/users",
- "RestApiId": {
- "Ref": "Api02"
- },
- "Method": "get"
- }
- }
- },
- "Policies": [
- {
- "SNSPublishMessagePolicy": {
- "TopicName": {
- "Fn::GetAtt": [
- "MySns01",
- "TopicName"
- ]
- }
- }
- },
- {
- "DynamoDBCrudPolicy": {
- "TableName": {
- "Ref": "Dynamo01"
- }
- }
- }
- ],
- "InlineCode": "module.exports.handler = async (event, context) => { return { statusCode: 200 } }"
- }
- },
- "Api02": {
- "Type": "AWS::Serverless::Api",
- "Properties": {
- "StageName": "Prod"
- }
- },
- "MySns01": {
- "Type": "AWS::SNS::Topic",
- "Properties": {
- "DisplayName": ""
- }
- },
- "Dynamo01": {
- "Type": "AWS::Serverless::SimpleTable",
- "Properties": {
- "PrimaryKey": {
- "Name": "id",
- "Type": "String"
- },
- "ProvisionedThroughput": {
- "ReadCapacityUnits": 5,
- "WriteCapacityUnits": 5
- }
- }
- },
- "NewUser01": {
- "Type": "AWS::Serverless::Function",
- "Properties": {
- "Handler": "index.handler",
- "Runtime": "nodejs12.x",
- "MemorySize": 512,
- "Timeout": 6,
- "Environment": {
- "Variables": {
- "ALTO_FUNCTION_ID": "NewUser01",
- "ALTO_FUNCTION_NAME": "new-user",
- "ALTO_DEPLOYMENT_TIME": "2021-05-19T08:42:52.693Z",
- "TABLE_DYNAMO01": {
- "Ref": "Dynamo01"
- }
- }
- },
- "Layers": [],
- "Events": {
- "ApiEndpoint04": {
- "Type": "Api",
- "Properties": {
- "Path": "/users",
- "RestApiId": {
- "Ref": "Api02"
- },
- "Method": "post"
- }
- }
- },
- "Policies": [
- {
- "DynamoDBCrudPolicy": {
- "TableName": {
- "Ref": "Dynamo01"
- }
- }
- }
- ],
- "InlineCode": "module.exports.handler = async (event, context) => { return { statusCode: 200 } }"
- }
- }
- },
- "Outputs": {
- "Domain15Api02StageProd": {
- "Value": {
- "Fn::Sub": [
- "https://${apiId}.execute-api.${AWS::Region}.amazonaws.com/Prod",
- {
- "apiId": {
- "Ref": "Api02"
- }
- }
- ]
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment