Updated package versions in pom.xml to latest, fixing build issues related to outdated dependencies.
Improved Error Handling
For when command fails or when invalid value is written to /command-output.txt
Error message about checking cloud-init-output.log also includes network related issues.
When no default VPC exists.
Added try catch block for catching exception if no default VPC.
Error message - "No default VPC found in this region, please specify a subnet using the SubnetId property."
Improved logging
Added contents of /command-output.txt to CloudWatch logs under cloud-init-output.log.
Updated BaseTemplate to add contents of /command-output.txt to cloudwatch logs.
Added catch for failures on CommandRunner stack.
Failure on CommandRunner stack was not being caught when response sent to CommandRunner stack in WaitCondition is malformed.
Failures are now caught right away, if CommandRunner stack goes into ROLLBACK_COMPLETE, or ROLLBACK_FAILED, then it will now gracefully clean up the CommandRunner stack.
Updated user installation script register.sh
Added creation of log group in register.sh, along with handling the case where it already exists.
LogGroup not created for new region, line 103 of register.sh check if log-group exists if not, create one.
register.sh will try to create a fresh execution role stack, if it exists it will try to update it, if it is up to date it will skip it.
Fixed bugs with networking configuration properties i.e SubnetId, SecurityGroupId
Removed empty string checks, now all different scenarios with/without SubnetId, SecurityGroupId work.
Added new Timeout property.
Timeout property to change timeout in WaitCondition in BaseTemplate, this will give the option to easy fail, by default timeout is 600 right now, this will allow for a max timeout of 12 hours i.e 43200
Added new DisableTerminateInstancesCheck property.
Some users were running into issues where their SCP policies did not allow the ec2:TerminateInstances action, but they still want to create CommandRunner instances. Setting this property to true allows them to create CommandRunner instances even without the ec2:TerminateInstances action.
Added new InstanceType property.
Now works in Private Subnets. We had seen some issues where CommandRunner wouldn't work in private subnets, this issue is now resolved.
Added check for Instance Profile validity. An error is thrown within 5 seconds of resource creation if the Role property specified is not a valid Instance Profile.
Check for Instance Profile validity, performs DescribeInstanceProfile and catches the error if it doesn’t exist.
Description of changes:
Version 2.0
Changelog:
/command-output.txt
/command-output.txt
to CloudWatch logs undercloud-init-output.log
.register.sh
register.sh
, along with handling the case where it already exists.SubnetId
,SecurityGroupId
Timeout
property.DisableTerminateInstancesCheck
property.ec2:TerminateInstances
action, but they still want to create CommandRunner instances. Setting this property to true allows them to create CommandRunner instances even without theec2:TerminateInstances
action.InstanceType
property.