AWS Cloudformation - Template format error: At least one Resources member must be defined

This is a very common error that says your cloudformation yaml or json is not in the correct format, for example 

This would give you an error:

AWSTemplateFormatVersion: 2010-09-09
Description: simple-s3-bucket
    s3Bucket:
      Type: AWS::S3::Bucket
      Properties:
        AccessControl: Private
        BucketName: mytest
        Tags:
          - Key: squad
            Value: foc

When it should be (the resources is added as shown below ) 


AWSTemplateFormatVersion: 2010-09-09
Description: simple-s3-bucket
Resources: <---- This one here
    s3Bucket:
      Type: AWS::S3::Bucket
      Properties:
        AccessControl: Private
        BucketName: mytest
        Tags:
          - Key: squad
            Value: foc

To help you resolve this issue, you can go use CloudFormation designer via this link here and then click on validate. 



Then you should be able to work with your template.


Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm