How to make an entire S3 bucket public

Add the below bucket policy to make the entire bucket publicly accessible.

{                                           
  "Version": "2012-10-17",                   
  "Statement":                             
[                                           
{                                            
    "Sid": "publicbucket",                   
    "Effect": "Allow",                        
    "Principal": { "AWS": "*" },               
    "Action": ["s3:GetObject"],               
    "Resource": ["arn:aws:s3:::bucketname/*" ]
}                                            
]                                            
}                                            
See also  How to allocate a new Elastic IP and associate it to an EC2 Instance