def bucket_policy_document(bucket):
    """Return the policy document to access an S3 bucket

    Parameters
    ----------
    bucket: string
        An Amazon S3 bucket name

    Returns
    -------
    s3_policy_doc: dict
        A dictionary containing the AWS policy document
    """
    s3_policy_doc = {'Version': '2012-10-17', 'Statement': [{'Effect':
        'Allow', 'Action': ['s3:ListBucket'], 'Resource': [
        'arn:aws:s3:::{0:s}'.format(bucket)]}, {'Effect': 'Allow', 'Action':
        ['s3:PutObject', 's3:GetObject'], 'Resource': [
        'arn:aws:s3:::{0:s}/*'.format(bucket)]}]}
    return s3_policy_doc
