To create an S3 bucket using CloudFormation, you can follow these steps:
Resources:
MyS3Bucket:
Type: "AWS::S3::Bucket"
Properties:
BucketName: "my-s3-bucket"
Save the CloudFormation template file with a .yaml or .json extension.
Open the AWS Management Console and navigate to the CloudFormation service.
Click on the "Create stack" button and choose to upload the CloudFormation template file you created.
Follow the prompts to input any necessary parameters and create the stack.
Once the stack creation is complete, the S3 bucket will be created and ready to use.
Alternatively, you can also use the AWS CLI or AWS SDK to deploy your CloudFormation template and create the S3 bucket programmatically.