Sha256: 86744d8240d6b52fab4c733c7e0205caae9e9da43bf541990fac6ad27d47380b

Contents?: true

Size: 726 Bytes

Versions: 6

Compression:

Stored size: 726 Bytes

Contents

Examples:

  $ aws-ec2 ami myrubyami --profile ruby --noop

The launches an EC2 instance with using the profile running it's user-data script.  An ami creation script is appended to the end of the user-data script. The ami creation script uses the AWS CLI `aws ec2 create-image` command to create an AMI.  It is useful to include to timestamp as a part of the ami name with the date command.

  $ aws-ec2 ami $(date "+ruby-2.5.0_%Y-%m-%d-%H-%M") --profile ruby --noop

Note, it is recommended to use the `set -e` option in your user-data script so that if the script fails, the ami creation script is never reached and instance is left behind so you can debug.

The instance also automatically gets terminated and cleaned up.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
aws-ec2-0.7.0 lib/aws_ec2/help/ami.md
aws-ec2-0.6.0 lib/aws_ec2/help/ami.md
aws-ec2-0.5.2 lib/aws_ec2/help/ami.md
aws-ec2-0.5.1 lib/aws_ec2/help/ami.md
aws-ec2-0.5.0 lib/aws_ec2/help/ami.md
aws-ec2-0.4.0 lib/aws_ec2/help/ami.md