storage_backend_s3/views/backend_storage_view.xml
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="storage_backend_view_form" model="ir.ui.view">
<field name="model">storage.backend</field>
<field name="inherit_id" ref="storage_backend.storage_backend_view_form" />
<field name="arch" type="xml">
<group name="config" position="after">
<group name="Amazon S3" string="Amazon S3" attrs="{'invisible': [('backend_type', '!=', 'amazon_s3')]}">
<field name="aws_access_key_id" attrs="{'required': [('backend_type', '=', 'amazon_s3')]}"/>
<field name="aws_secret_access_key" attrs="{'required': [('backend_type', '=', 'amazon_s3')], 'readonly':[('backend_type', '!=', 'amazon_s3')]}"/>
<field name="aws_region" attrs="{'required': [('backend_type', '=', 'amazon_s3')]}"/>
<field name="aws_bucket" attrs="{'required': [('backend_type', '=', 'amazon_s3')]}"/>
<field name="aws_cache_control"/>
</group>
</group>
</field>
</record>
</odoo>