You encounter the error ” ValidateTemplate failed: TemplateURL must reference a valid S3 object to which you have access ” when using AWS CloudFormation. This blog post illustrates what are the scenarios which throw this error.
Difficulty with the Error Message
Both the options of using CloudFormation upload will throw the same error message. The thing to note here is it is the same error but it is due to different operation. This is due to non-accessibility of the S3 backup, so by extension, even if you upload a cloud formation template from your local machine, it still goes to the S3 bucket and then fed to CloudFormation Engine.
|Upload File Error|
|Provide Template URL error|
- When You Upload a template file with its file name containing space. To solve it just re-name the file without spaces.
- You can pick the the S3 URL of the sample CloudFormation templates, however you should ensure the S3’s region is same as your target CloudFormation region in the portal / console.