function create-bucket --argument name
    if empty "$name"
        usage create-bucket '<name>'
        return (false)
    end

    print-status s3/create-bucket $name
    set --local options

    has region s3/buckets/$name
    and set -- options $options --create-bucket-configuration LocationConstraint=(get s3/buckets/$name/region)

    has acl s3/buckets/$name
    and set -- options $options --acl (get s3/buckets/$name/acl)

    aws s3api create-bucket --bucket $name $options
end

function create-bucket --argument name
    if empty "$name"
        usage create-bucket '<name>'
        return (false)
    end

    print-status create-bucket $name
    set --local options

    has region buckets/$name
    and set -- options $options --create-bucket-configuration LocationConstraint=(get buckets/$name/region)

    has acl buckets/$name
    and set -- options $options --acl (get buckets/$name/acl)

    aws s3api create-bucket --bucket $name $options
end

Remove s3 from create bucket
Remove s3 from  create bucket

colstrom/shellops-aws,colstrom/piranha