number-switcher-3000
A project for setting up number forwarding for an apartment buzzer
Running the site
- Setup AWS credentials
- Set environment variables for values in
api/conf.js
npm install --production
npm start
Dev requirements
- nvm
Running the dev site
- Setup AWS credentials
- Consider setting environment variables for values in
api/conf.js
npm install
npm run watch
to run the dev sitenpm test
to run the continuous integration tests
AWS IAM policy template
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::<aws_s3_bucket>/number.xml"
}
]
}
CI AWS IAM template
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::number-switcher-3000-dev/number.xml"
},
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::number-switcher-3000-deployments"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::number-switcher-3000-deployments/*"
},
{
"Effect": "Allow",
"Action": "elasticbeanstalk:CreateApplicationVersion",
"Resource": "arn:aws:elasticbeanstalk:us-east-1:762636538502:applicationversion/number-switcher-3000/*"
},
{
"Effect": "Allow",
"Action": "elasticbeanstalk:UpdateEnvironment",
"Resource": "arn:aws:elasticbeanstalk:us-east-1:762636538502:environment/number-switcher-3000/number-switcher-3000"
},
{
"Effect": "Allow",
"Action": [
"cloudformation:CancelUpdateStack",
"cloudformation:GetTemplate",
"cloudformation:DescribeStackEvents",
"cloudformation:DescribeStackResource",
"cloudformation:DescribeStackResources",
"cloudformation:DescribeStacks",
"cloudformation:UpdateStack"
],
"Resource": "arn:aws:cloudformation:us-east-1:762636538502:stack/*"
},
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::elasticbeanstalk*",
"arn:aws:s3:::elasticbeanstalk*/*"
]
},
{
"Effect": "Allow",
"Action": [
"ec2:DescribeAddresses",
"ec2:DescribeKeyPairs",
"ec2:DescribeImages",
"ec2:DescribeInstances",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"SNS:CreateTopic",
"SNS:GetTopicAttributes",
"SNS:ListSubscriptionsByTopic"
],
"Resource": "arn:aws:sns:us-east-1:762636538502:ElasticBeanstalkNotifications-Environment-number-switcher-3000"
},
{
"Effect": "Allow",
"Action": [
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DescribeScalingActivities",
"autoscaling:ResumeProcesses",
"autoscaling:SuspendProcesses"
],
"Resource": "*"
}
]
}