- Newest
- Most votes
- Most comments
Based on the error you're encountering, there are a few potential issues with your RestoreMetadataOverrides configuration:
Formatting Issues: The RestoreMetadataOverrides should use proper JSON or YAML formatting. In your example, you're using quotes around values that might need to be formatted differently. Specifically:
- securityGroupIds should be formatted as a list/array, not a string. It should look like:
- YAML:
securityGroupIds: ["sg-xxxxx"]or as a list - JSON:
"securityGroupIds": ["sg-xxxxx"]
-
requireImdsV2 should be a boolean value (
trueorfalse) without quotes, not a string. -
iamInstanceProfileName - if you're not using an IAM instance profile, you might want to remove this parameter entirely rather than leaving it as an empty string.
Common Causes of Restore Failures: Beyond formatting, restore testing plans can fail if:
- The specified subnet doesn't exist or isn't available in the test AWS Region
- There are insufficient IAM permissions for the restore role
- The restore role lacks access to AWS KMS keys that encrypt the backups
Recommendations:
- Verify that the subnet ID you're specifying exists and is available in your VPC
- Format securityGroupIds as an array:
["sg-xxxxx"] - Change requireImdsV2 to a boolean:
true(without quotes) - Ensure your IAM role has the necessary permissions to perform the restore operation
- Double-check that CloudFormation syntax validation passes for your template
Try reformatting your metadata overrides with proper data types and ensure all referenced resources (subnet, security group) exist in the target region.
Sources
Troubleshoot failed AWS Backup restore testing plans | AWS re:Post
AWS::EC2::Instance - AWS CloudFormation
Relevant content
- asked 4 years ago
- AWS OFFICIALUpdated 3 years ago
