Sha256: 336ce351c320c1740fc2979c1417508af46f16d4b5dd2d9c1ab6db9fb4428f8f
Contents?: true
Size: 579 Bytes
Versions: 6
Compression:
Stored size: 579 Bytes
Contents
#!/bin/bash set -e # Create AMI Bundle AMI_NAME="<%= @ami_name %>" INSTANCE_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id) REGION=$(aws configure get region) # Note this will cause the instance to reboot. Not using the --no-reboot flag # to ensure consistent AMI creation. SOURCE_AMI_ID=$(wget -q -O - http://169.254.169.254/latest/meta-data/ami-id) echo "$SOURCE_AMI_ID" > /var/log/source-ami-id.txt mkdir -p /opt/forger/data aws ec2 create-image --name "$AMI_NAME" --instance-id "$INSTANCE_ID" --region "$REGION" > /opt/forger/data/ami-id.txt set +e
Version data entries
6 entries across 6 versions & 1 rubygems