Spin up EC2 instance, install a tool, run a command, download result, destroy the instance.

This page summarizes the projects mentioned and recommended in the original post on /r/aws

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • quickstart-linux-utilities

    Discontinued Linux Common Utilitys

  • Here is some sample code that starts an EC2 Instance with a startup script. You can also set a timer and destroy the instance. Note the userData.addCommands which will run the first time an instance starts up. Also note init: CloudFormationInit.fromConfigSets({ which runs every time the instance starts or reboots.: userData.addCommands( 'sudo -s', 'apt-get update -y', 'apt-get install -y git awscli ec2-instance-connect', 'until git clone https://github.com/aws-quickstart/quickstart-linux-utilities.git; do echo "Retrying"; done', 'cd quickstart-linux-utilities/', 'source quickstart-cfn-tools.source', 'qs_update-os || qs_err', 'qs_bootstrap_pip || qs_err', 'qs_aws-cfn-bootstrap || qs_err', 'mkdir -p /opt/aws/bin', 'ln -s /usr/local/bin/cfn-* /opt/aws/bin/', `apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release`, 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null', 'apt-get update && \ apt-get install -y docker-ce docker-ce-cli containerd.io', 'curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose', 'chmod +x /usr/local/bin/docker-compose', 'cd .. && git clone https://github.com/getsentry/onpremise.git', 'cd onpremise/ && ./install.sh --no-user-prompt' ) /** * Disk drive */ const rootVolume: BlockDevice = { deviceName: '/dev/sda1', volume: BlockDeviceVolume.ebs(50) } /** * EC2 instance */ this.sentryInstance = new Instance(this, 'HubsSentryIO', { vpc: this.loggingVpc, securityGroup: sentrySG, allowAllOutbound: false, instanceName: 'HubsSentryIO', instanceType: InstanceType.of( InstanceClass.BURSTABLE3, InstanceSize.LARGE ), resourceSignalTimeout: Duration.minutes(30), detailedMonitoring: true, machineImage: MachineImage.genericLinux( { // Ubuntu 20.04 AMD64 image, obtained from https://cloud-images.ubuntu.com/locator/ec2/ 'ap-southeast-2': 'ami-03cfcb06be7fa0860' }, { userData } ), blockDevices: [rootVolume], init: CloudFormationInit.fromConfigSets({ configs: { sentry: new InitConfig([ InitCommand.shellCommand( 'cd /onpremise/ && sudo docker-compose up -d' ) ]) }, configSets: { default: ['sentry'] } }), keyName: 'keyname' })

  • Docker Compose

    Define and run multi-container applications with Docker

  • Here is some sample code that starts an EC2 Instance with a startup script. You can also set a timer and destroy the instance. Note the userData.addCommands which will run the first time an instance starts up. Also note init: CloudFormationInit.fromConfigSets({ which runs every time the instance starts or reboots.: userData.addCommands( 'sudo -s', 'apt-get update -y', 'apt-get install -y git awscli ec2-instance-connect', 'until git clone https://github.com/aws-quickstart/quickstart-linux-utilities.git; do echo "Retrying"; done', 'cd quickstart-linux-utilities/', 'source quickstart-cfn-tools.source', 'qs_update-os || qs_err', 'qs_bootstrap_pip || qs_err', 'qs_aws-cfn-bootstrap || qs_err', 'mkdir -p /opt/aws/bin', 'ln -s /usr/local/bin/cfn-* /opt/aws/bin/', `apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release`, 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null', 'apt-get update && \ apt-get install -y docker-ce docker-ce-cli containerd.io', 'curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose', 'chmod +x /usr/local/bin/docker-compose', 'cd .. && git clone https://github.com/getsentry/onpremise.git', 'cd onpremise/ && ./install.sh --no-user-prompt' ) /** * Disk drive */ const rootVolume: BlockDevice = { deviceName: '/dev/sda1', volume: BlockDeviceVolume.ebs(50) } /** * EC2 instance */ this.sentryInstance = new Instance(this, 'HubsSentryIO', { vpc: this.loggingVpc, securityGroup: sentrySG, allowAllOutbound: false, instanceName: 'HubsSentryIO', instanceType: InstanceType.of( InstanceClass.BURSTABLE3, InstanceSize.LARGE ), resourceSignalTimeout: Duration.minutes(30), detailedMonitoring: true, machineImage: MachineImage.genericLinux( { // Ubuntu 20.04 AMD64 image, obtained from https://cloud-images.ubuntu.com/locator/ec2/ 'ap-southeast-2': 'ami-03cfcb06be7fa0860' }, { userData } ), blockDevices: [rootVolume], init: CloudFormationInit.fromConfigSets({ configs: { sentry: new InitConfig([ InitCommand.shellCommand( 'cd /onpremise/ && sudo docker-compose up -d' ) ]) }, configSets: { default: ['sentry'] } }), keyName: 'keyname' })

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • onpremise

    Discontinued Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept [Moved to: https://github.com/getsentry/self-hosted]

  • Here is some sample code that starts an EC2 Instance with a startup script. You can also set a timer and destroy the instance. Note the userData.addCommands which will run the first time an instance starts up. Also note init: CloudFormationInit.fromConfigSets({ which runs every time the instance starts or reboots.: userData.addCommands( 'sudo -s', 'apt-get update -y', 'apt-get install -y git awscli ec2-instance-connect', 'until git clone https://github.com/aws-quickstart/quickstart-linux-utilities.git; do echo "Retrying"; done', 'cd quickstart-linux-utilities/', 'source quickstart-cfn-tools.source', 'qs_update-os || qs_err', 'qs_bootstrap_pip || qs_err', 'qs_aws-cfn-bootstrap || qs_err', 'mkdir -p /opt/aws/bin', 'ln -s /usr/local/bin/cfn-* /opt/aws/bin/', `apt-get update && apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release`, 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null', 'apt-get update && \ apt-get install -y docker-ce docker-ce-cli containerd.io', 'curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose', 'chmod +x /usr/local/bin/docker-compose', 'cd .. && git clone https://github.com/getsentry/onpremise.git', 'cd onpremise/ && ./install.sh --no-user-prompt' ) /** * Disk drive */ const rootVolume: BlockDevice = { deviceName: '/dev/sda1', volume: BlockDeviceVolume.ebs(50) } /** * EC2 instance */ this.sentryInstance = new Instance(this, 'HubsSentryIO', { vpc: this.loggingVpc, securityGroup: sentrySG, allowAllOutbound: false, instanceName: 'HubsSentryIO', instanceType: InstanceType.of( InstanceClass.BURSTABLE3, InstanceSize.LARGE ), resourceSignalTimeout: Duration.minutes(30), detailedMonitoring: true, machineImage: MachineImage.genericLinux( { // Ubuntu 20.04 AMD64 image, obtained from https://cloud-images.ubuntu.com/locator/ec2/ 'ap-southeast-2': 'ami-03cfcb06be7fa0860' }, { userData } ), blockDevices: [rootVolume], init: CloudFormationInit.fromConfigSets({ configs: { sentry: new InitConfig([ InitCommand.shellCommand( 'cd /onpremise/ && sudo docker-compose up -d' ) ]) }, configSets: { default: ['sentry'] } }), keyName: 'keyname' })

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts