mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
139 lines
3.6 KiB
JSON
139 lines
3.6 KiB
JSON
{
|
|
"name": "serverless-project",
|
|
"version": "0.0.1",
|
|
"profile": "serverless-0",
|
|
"location": "https://github.com...",
|
|
"author": "",
|
|
"description": "",
|
|
"cloudFormation": {
|
|
"AWSTemplateFormatVersion": "2010-09-09",
|
|
"Description": "The AWS CloudFormation template for this Serverless application's resources outside of Lambdas and Api Gateway",
|
|
"Resources": {
|
|
"IamRoleLambda": {
|
|
"Type": "AWS::IAM::Role",
|
|
"Properties": {
|
|
"AssumeRolePolicyDocument": {
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Allow",
|
|
"Principal": {
|
|
"Service": [
|
|
"lambda.amazonaws.com"
|
|
]
|
|
},
|
|
"Action": [
|
|
"sts:AssumeRole"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"Path": "/"
|
|
}
|
|
},
|
|
"IamPolicyLambda": {
|
|
"Type": "AWS::IAM::Policy",
|
|
"Properties": {
|
|
"PolicyName": "${stage}-${projectName}-lambda",
|
|
"PolicyDocument": {
|
|
"Version": "2012-10-17",
|
|
"Statement": [
|
|
{
|
|
"Effect": "Allow",
|
|
"Action": [
|
|
"logs:CreateLogGroup",
|
|
"logs:CreateLogStream",
|
|
"logs:PutLogEvents"
|
|
],
|
|
"Resource": "arn:aws:logs:${region}:*:"
|
|
}
|
|
]
|
|
},
|
|
"Roles": [
|
|
{
|
|
"Ref": "IamRoleLambda"
|
|
}
|
|
],
|
|
"Groups": [
|
|
{
|
|
"Ref": "IamGroupLambda"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"Outputs": {
|
|
"IamRoleArnLambda": {
|
|
"Description": "ARN of the lambda IAM role",
|
|
"Value": {
|
|
"Fn::GetAtt": [
|
|
"IamRoleLambda",
|
|
"Arn"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"custom": {},
|
|
"plugins": [],
|
|
|
|
"modules": {
|
|
"users": {
|
|
"name": "users",
|
|
"version": "0.0.1",
|
|
"profile": "aws-0",
|
|
"location": "https://github.com...",
|
|
"runtime": "nodejs",
|
|
"author": "",
|
|
"description": "",
|
|
"cloudFormation": {
|
|
"lambdaIamPolicyDocumentStatements": [{}],
|
|
"resources": {}
|
|
},
|
|
"custom": {},
|
|
|
|
"functions": {
|
|
"usersCreate": {
|
|
"name": "usersCreate",
|
|
"handler": "modules/users/users/handlers.usersCreate",
|
|
"timeout": 6,
|
|
"memorySize": 1024,
|
|
"custom": {
|
|
"excludePatterns": [],
|
|
"envVars": []
|
|
},
|
|
"endpoints": [
|
|
{
|
|
"path": "users/create",
|
|
"method": "POST",
|
|
"authorizationType": "none",
|
|
"apiKeyRequired": false,
|
|
"requestParameters": {
|
|
"integration.request.querystring.code": "method.request.querystring.code",
|
|
"integration.request.querystring.state": "method.request.querystring.state"
|
|
},
|
|
"requestTemplates": {
|
|
"application/json": "{\"code\":\"$input.params('code')\"}"
|
|
},
|
|
"responses": {
|
|
"400": {
|
|
"statusCode": "400"
|
|
},
|
|
"default": {
|
|
"statusCode": "200",
|
|
"responseParameters": {},
|
|
"responseModels": {},
|
|
"responseTemplates": {
|
|
"application/json": ""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
|
|
"templates": {}
|
|
}
|
|
}
|
|
} |