UNPKG

@incdevco/framework

Version:
78 lines (77 loc) 2.05 kB
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Template For Custom CF Resource Stack", "Parameters": { "LambdaPackageS3ObjectVersion": { "Type": "String" } }, "Mappings": { }, "Resources": { "Function": { "Type": "AWS::Lambda::Function", "DependsOn": [ "Role" ], "Properties": { "Code": { "S3Bucket": {"Fn::ImportValue": "AssetsBucket"}, "S3Key": "lambda-packages/custom-cf-resource.zip", "S3ObjectVersion": {"Ref": "LambdaPackageS3ObjectVersion"} }, "Description": "function for custom cloud formation resources", "FunctionName": "custom-cf-resource", "Handler": "index.handler", "MemorySize": 128, "Role": { "Fn::GetAtt": ["Role", "Arn"]}, "Runtime": "nodejs6.10", "Timeout": "300" } }, "Role": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }, "ManagedPolicyArns": [], "Path": "/", "Policies": [ { "PolicyName": "allow-all", "PolicyDocument": { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "*", "Resource": "*" } ] } } ], "RoleName": "custom-cf-resource-lambda-role" } } }, "Outputs": { "CustomCFResourceFunctionArn": { "Description": "the ARN of the function created to create custom cloud formation resources.", "Value": {"Fn::GetAtt": ["Function", "Arn"]}, "Export": { "Name": "CustomCFResourceFunctionArn" } } } }