The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
var async = require("async"); | |
var AWS = require("aws-sdk"); | |
var im = require("gm").subClass({imageMagick: true}); | |
var s3 = new AWS.S3(); | |
var path = require("path"); | |
var CONFIG = require("./config.json"); |
fetch('https://api.hubapi.com/companies/v2/companies/' + inputData.companyId+ '/contacts?hapikey=' + inputData.hapiKey ) | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(body) { | |
var contacts = []; | |
body.contacts.forEach(function(contact) { | |
contact.identities.forEach(function(identity) { | |
identity.identity.forEach(function(i) { | |
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
fetch('https://api.hubapi.com/companies/v2/companies/' + inputData.companyId + '?hapikey=' + inputData.hapiKey) | |
.then(function(res) { | |
return res.json(); | |
}) | |
.then(function(body) { | |
var output = {id: inputData.companyId, company: body}; | |
callback(null, output); | |
}) | |
.catch(callback); |
aws configure |
aws route53 test-dns-answer --hosted-zone-id /hostedzone/ZQPYH2JHZAVQV --record-name laravelaws.com --record-type A |
ECSCluster: | |
Type: AWS::ECS::Cluster | |
Properties: | |
ClusterName: !Ref EnvironmentName | |
ECSAutoScalingGroup: | |
Type: AWS::AutoScaling::AutoScalingGroup | |
Properties: | |
VPCZoneIdentifier: !Ref PrivateSubnets | |
LaunchConfigurationName: !Ref ECSLaunchConfiguration |
# This security group defines who/where is allowed to access the ECS hosts directly. | |
# By default we're just allowing access from the load balancer. If you want to SSH | |
# into the hosts, or expose non-load balanced services you can open their ports here. | |
ECSSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
VpcId: !Ref VPC | |
GroupDescription: Access to the ECS hosts and the tasks/containers that run on them | |
SecurityGroupIngress: | |
# Only allow inbound access to ECS from the ELB |
# This security group defines who/where is allowed to access the Application Load Balancer. | |
# By default, we've opened this up to the public internet (0.0.0.0/0) but can you restrict | |
# it further if you want. | |
LoadBalancerSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
VpcId: !Ref VPC | |
GroupDescription: Access to the load balancer that sits in front of ECS | |
SecurityGroupIngress: | |
# Allow access from anywhere to our ECS services |
# This security group defines who/where is allowed to access the RDS instance. | |
# Only instances associated with our ECS security group can reach to the database endpoint. | |
DBSecurityGroup: | |
Type: AWS::EC2::SecurityGroup | |
Properties: | |
GroupDescription: Open database for access | |
VpcId: !Ref VPC | |
SecurityGroupIngress: | |
- IpProtocol: tcp | |
FromPort: '3306' |