{ "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" } } } }