{ "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "The BitNami PostgreSQL 5.3.12: PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). For more information, please visit: http://bitnami.org.", "Parameters" : { "BitnamiInstanceType" : { "Default" : "m1.small", "Type" : "String", "Description" : "The type of EC2 instances: only t1.micro, m1.small and m1.medium supported" }, "KeyName": { "Description" : "Name of an existing EC2 KeyPair to enable SSH access", "Type": "String", "Default" : "default" }, "BitnamiUser" : { "Default" : "user", "Type" : "String", "Description" : "The BitNami PostgreSQL user login" }, "BitnamiPassword" : { "Default" : "bitnami", "Type" : "String", "Description" : "The BitNami PostgreSQL user password (minimum 6 characters, default value: bitnami )", "NoEcho" : "TRUE" }, "BitnamiEmail" : { "Default" : "user@example.com", "Description" : "The BitNami PostgreSQL user email", "Type" : "String" }, "BitnamiUserName" : { "Default" : "BitNami User", "Description" : "The BitNami PostgreSQL user full name", "Type" : "String" } }, "Resources" : { "BitnamiSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "Allow HTTP/SSH to BitNami machine.", "SecurityGroupIngress" : [ { "IpProtocol" : "tcp", "FromPort" : "80", "ToPort" : "80", "CidrIp" : "0.0.0.0/0" }, { "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "0.0.0.0/0" } ] } }, "BitnamiServer" : { "Type" : "AWS::EC2::Instance", "Properties" : { "ImageId" : { "Fn::FindInMap": [ "AWSRegionArch2AMI", { "Ref": "AWS::Region" }, { "Fn::FindInMap": [ "AWSInstanceType2Arch", {"Ref": "BitnamiInstanceType" },"Arch" ] } ]}, "KeyName" : {"Ref": "KeyName"}, "SecurityGroups" : [ { "Ref" : "BitnamiSecurityGroup" } ], "UserData" : { "Fn::Base64" : { "Fn::Join" : [ "\n", [ { "Fn::Join" : [ "=", [ "base_user", { "Ref" : "BitnamiUser" } ] ] }, { "Fn::Join" : [ "=", [ "base_mail", { "Ref" : "BitnamiEmail" } ] ] }, { "Fn::Join" : [ "=", [ "base_user_name", { "Ref" : "BitnamiUserName" } ] ] }, { "Fn::Join" : [ "=", [ "base_password", { "Ref" : "BitnamiPassword" } ] ] }, { "Fn::Join" : [ "=", [ "stack_name", "postgresql" ] ] }, { "Fn::Join" : [ "=", [ "stack_version", "5.3.12-0" ] ] } ] ] } }, "InstanceType" : { "Ref" : "BitnamiInstanceType" }, "Tags" : [ { "Key" : "Name", "Value" : "The BitNami PostgreSQL 5.3.12" } ] } }, "BitnamiIP" : { "Type" : "AWS::EC2::EIP", "Properties" : { "InstanceId" : { "Ref" : "BitnamiServer" } } } }, "Mappings": { "AWSInstanceType2Arch" : { "t1.micro" : { "Arch" : "32" }, "m1.small" : { "Arch" : "32" }, "c1.medium" : { "Arch" : "32" } }, "AWSRegionArch2AMI" : { "us-east-1" : { "32" : "ami-bc0ff6d5"} } }, "Outputs" : { "URL" : { "Description" : "URL of the BitNami PostgreSQL 5.3.12 server:", "Value" : { "Fn::Join" : [ "", [ "http://", { "Ref" : "BitnamiIP" } ] ] } } } }