Here is a sample of mup.js I use that you can start from to set up a couple of things you asked about.
module.exports = {
app: {
// Tells mup that the AWS Beanstalk plugin will manage the app
type: 'aws-beanstalk',
name: 'app_name',
path: '../',
region: 'eu-central-1', // your prefered region
forceSSL: true,
env: {
METEOR_PROFILE: 2000,
ROOT_URL: 'https://www.your_domain.com',
MONGO_URL: 'xxxx',
MONGO_OPLOG_URL: 'xxxx',
MONGO_SOMETHING _ELSE: 'xxxxx',
PRERENDER_SERVICE_URL: 'xxxxxxx',
CDN_URL: 'xxxxx',
MONTI_APP_ID: 'xxxxx',
MONTI_APP_SECRET: 'xxxxx',
// MONTI_EVENT_STACK_TRACE: true,
AWS_ACCESS_KEY_ID: 'xxxxxx',
AWS_SECRET_ACCESS_KEY:'xxxxxx',
AWS_S3_REGION: 'eu-central-1',
MAIL_URL: 'smtps://xxxxxxx@email-smtp.eu-central-1.amazonaws.com:465',
PASSWORDLESS_VALIDITY_MINUTES: 3,
LOGIN_EXPIRATION_IN_DAYS: 30
},
auth: {
id: 'xxxxx',
secret: 'xxxxxx',
},
customBeanstalkConfig: [
{
namespace: 'aws:autoscaling:trigger',
option: 'LowerThreshold',
value: '1'
},
{
namespace: 'aws:elasticbeanstalk:cloudwatch:logs',
option: 'StreamLogs',
value: 'false'
},
{
namespace: 'aws:elasticbeanstalk:command',
option: 'DeploymentPolicy',
value: 'AllAtOnce'
},
{
namespace: 'aws:ec2:instances',
option: 'InstanceTypes',
value: 't2.nano' /* your prefered size */
},
{
namespace: 'aws:ec2:instances',
option: 'EnableSpot',
value: 'false'
},
{
namespace: 'aws:autoscaling:updatepolicy:rollingupdate',
option: 'RollingUpdateEnabled',
value: 'false'
},
{
namespace: 'aws:elasticbeanstalk:environment',
option: 'LoadBalancerIsShared',
value: 'true'
},
{
namespace: 'aws:elbv2:loadbalancer',
option: 'SharedLoadBalancer',
value: 'arn:aws:elasticloadbalancing:eu-central-1:.......add it here once you have it built.'
},
{
namespace: 'aws:autoscaling:launchconfiguration',
option: 'RootVolumeSize',
value: '8' // your disk size
}
],
minInstances: 1,
maxInstances: 1,
oldVersions: 2 // will store this number of previous versions of the app so you can revert to from the AWS console
},
plugins: ['mup-aws-beanstalk']
}
When you have the balancer running, there are some policies that need to be updated so that your health checks stay on green. If you get there and you are on red, let me know.