123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- {
- "AWSTemplateFormatVersion": "2010-09-09",
- "Description": "The AWS CloudFormation template for this Serverless application",
- "Resources": {
- "ServerlessDeploymentBucket": {
- "Type": "AWS::S3::Bucket",
- "Properties": {
- "BucketEncryption": {
- "ServerSideEncryptionConfiguration": [
- {
- "ServerSideEncryptionByDefault": {
- "SSEAlgorithm": "AES256"
- }
- }
- ]
- }
- }
- },
- "ServerlessDeploymentBucketPolicy": {
- "Type": "AWS::S3::BucketPolicy",
- "Properties": {
- "Bucket": {
- "Ref": "ServerlessDeploymentBucket"
- },
- "PolicyDocument": {
- "Statement": [
- {
- "Action": "s3:*",
- "Effect": "Deny",
- "Principal": "*",
- "Resource": [
- {
- "Fn::Join": [
- "",
- [
- "arn:",
- {
- "Ref": "AWS::Partition"
- },
- ":s3:::",
- {
- "Ref": "ServerlessDeploymentBucket"
- },
- "/*"
- ]
- ]
- },
- {
- "Fn::Join": [
- "",
- [
- "arn:",
- {
- "Ref": "AWS::Partition"
- },
- ":s3:::",
- {
- "Ref": "ServerlessDeploymentBucket"
- }
- ]
- ]
- }
- ],
- "Condition": {
- "Bool": {
- "aws:SecureTransport": false
- }
- }
- }
- ]
- }
- }
- },
- "NumpyLogGroup": {
- "Type": "AWS::Logs::LogGroup",
- "Properties": {
- "LogGroupName": "/aws/lambda/ambt-anoicos-dev-numpy"
- }
- },
- "IamRoleLambdaExecution": {
- "Type": "AWS::IAM::Role",
- "Properties": {
- "AssumeRolePolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Service": [
- "lambda.amazonaws.com"
- ]
- },
- "Action": [
- "sts:AssumeRole"
- ]
- }
- ]
- },
- "Policies": [
- {
- "PolicyName": {
- "Fn::Join": [
- "-",
- [
- "ambt-anoicos",
- "dev",
- "lambda"
- ]
- ]
- },
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "logs:CreateLogStream",
- "logs:CreateLogGroup"
- ],
- "Resource": [
- {
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/ambt-anoicos-dev*:*"
- }
- ]
- },
- {
- "Effect": "Allow",
- "Action": [
- "logs:PutLogEvents"
- ],
- "Resource": [
- {
- "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/ambt-anoicos-dev*:*:*"
- }
- ]
- }
- ]
- }
- }
- ],
- "Path": "/",
- "RoleName": {
- "Fn::Join": [
- "-",
- [
- "ambt-anoicos",
- "dev",
- {
- "Ref": "AWS::Region"
- },
- "lambdaRole"
- ]
- ]
- }
- }
- },
- "PythonRequirementsLambdaLayer": {
- "Type": "AWS::Lambda::LayerVersion",
- "Properties": {
- "Content": {
- "S3Bucket": {
- "Ref": "ServerlessDeploymentBucket"
- },
- "S3Key": "serverless/ambt-anoicos/dev/1623974011018-2021-06-17T23:53:31.018Z/pythonRequirements.zip"
- },
- "LayerName": "ambt-anoicos-dev-python-requirements",
- "Description": "Python requirements generated by serverless-python-requirements.",
- "CompatibleRuntimes": [
- "python3.8"
- ]
- }
- },
- "NumpyLambdaFunction": {
- "Type": "AWS::Lambda::Function",
- "Properties": {
- "Code": {
- "S3Bucket": {
- "Ref": "ServerlessDeploymentBucket"
- },
- "S3Key": "serverless/ambt-anoicos/dev/1623974011018-2021-06-17T23:53:31.018Z/ambt-anoicos.zip"
- },
- "Handler": "handler.main",
- "Runtime": "python3.8",
- "FunctionName": "ambt-anoicos-dev-numpy",
- "MemorySize": 1024,
- "Timeout": 6,
- "Role": {
- "Fn::GetAtt": [
- "IamRoleLambdaExecution",
- "Arn"
- ]
- },
- "Layers": [
- {
- "Ref": "PythonRequirementsLambdaLayer"
- }
- ]
- },
- "DependsOn": [
- "NumpyLogGroup"
- ]
- },
- "NumpyLambdaVersion4nqiRdtNg2AbGSGlzGV12aNY2OuUh7esxvqofgY": {
- "Type": "AWS::Lambda::Version",
- "DeletionPolicy": "Retain",
- "Properties": {
- "FunctionName": {
- "Ref": "NumpyLambdaFunction"
- },
- "CodeSha256": "IVZ5bTPa382jcJBMQHlQd0Zn9gjSEEfl2vSmrUqAhWk="
- }
- }
- },
- "Outputs": {
- "ServerlessDeploymentBucketName": {
- "Value": {
- "Ref": "ServerlessDeploymentBucket"
- },
- "Export": {
- "Name": "sls-ambt-anoicos-dev-ServerlessDeploymentBucketName"
- }
- },
- "PythonRequirementsLambdaLayerQualifiedArn": {
- "Description": "Current Lambda layer version",
- "Value": {
- "Ref": "PythonRequirementsLambdaLayer"
- },
- "Export": {
- "Name": "sls-ambt-anoicos-dev-PythonRequirementsLambdaLayerQualifiedArn"
- }
- },
- "PythonRequirementsLambdaLayerHash": {
- "Description": "Current Lambda layer hash",
- "Value": "35b9f3a28aa474ce779bef4f48b8e95d200c045e",
- "Export": {
- "Name": "sls-ambt-anoicos-dev-PythonRequirementsLambdaLayerHash"
- }
- },
- "PythonRequirementsLambdaLayerS3Key": {
- "Description": "Current Lambda layer S3Key",
- "Value": "serverless/ambt-anoicos/dev/1623974011018-2021-06-17T23:53:31.018Z/pythonRequirements.zip",
- "Export": {
- "Name": "sls-ambt-anoicos-dev-PythonRequirementsLambdaLayerS3Key"
- }
- },
- "NumpyLambdaFunctionQualifiedArn": {
- "Description": "Current Lambda function version",
- "Value": {
- "Ref": "NumpyLambdaVersion4nqiRdtNg2AbGSGlzGV12aNY2OuUh7esxvqofgY"
- },
- "Export": {
- "Name": "sls-ambt-anoicos-dev-NumpyLambdaFunctionQualifiedArn"
- }
- }
- }
- }
|