one-observability-demo icon indicating copy to clipboard operation
one-observability-demo copied to clipboard

Increasing Cloud9 disk size to 30GB

Open comeddy opened this issue 4 years ago • 1 comments

pip3 install --user --upgrade boto3
export instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
python -c "import boto3
import os
from botocore.exceptions import ClientError 
ec2 = boto3.client('ec2')
volume_info = ec2.describe_volumes(
    Filters=[
        {
            'Name': 'attachment.instance-id',
            'Values': [
                os.getenv('instance_id')
            ]
        }
    ]
)
volume_id = volume_info['Volumes'][0]['VolumeId']
try:
    resize = ec2.modify_volume(    
            VolumeId=volume_id,    
            Size=30
    )
    print(resize)
except ClientError as e:
    if e.response['Error']['Code'] == 'InvalidParameterValue':
        print('ERROR MESSAGE: {}'.format(e))"
if [ $? -eq 0 ]; then
    sudo reboot
fi

comeddy avatar Jul 19 '21 14:07 comeddy

It need to be increasing Cloud9 disk size up to 30GB before CDK bootstrap install

comeddy avatar Jul 19 '21 14:07 comeddy

Not sure what the Issue is. The script we have on the workshop will resize the storage to 30GB. If that did not work, please raise the issue again.

awsimaya avatar Oct 24 '22 16:10 awsimaya