I have a requirement that, we want to increase the ebs volume size dynamically and friends please guide me how to perform this operation.
Asked
Active
Viewed 64 times
-1
-
Welcome, you should provide information about what you have tried so far. – Ignacio Alorre Aug 20 '17 at 09:24
-
up to now I have done it manually but I want it to be done automatically – sai ananth Aug 20 '17 at 09:40
-
I'm afraid that isn't enough information. It doesn't happen "automatically." You have to write code that tests the condition that you want to trigger a change, and generates the necessart API requests and performs the relevant filesystem resize. – Michael - sqlbot Aug 20 '17 at 14:18
1 Answers
0
You can write a Lambda function using AWS EC2 SDK to increase the volume size based on your conditions.
Examples: Calling the modifyVolume operation
var params = {
VolumeId: 'STRING_VALUE', /* required */
DryRun: true || false,
Iops: 0,
Size: 0,
VolumeType: standard | io1 | gp2 | sc1 | st1
};
ec2.modifyVolume(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});

Ashan
- 18,898
- 4
- 47
- 67
-
can you please guide me how to perform this operation..as i am new to aws@ashan – sai ananth Aug 21 '17 at 06:31