I want to configure AWS s3 bucket with my wordpress plugin

Here is my example plugin for AWS S3 configuration
Here is my php my-s3-plugin.php

<?php
/*
Plugin Name: My S3 Plugin
Description: A plugin to integrate AWS S3 with WordPress.
Version: 1.0
Author: Your Name
*/

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require __DIR__ . '/vendor/autoload.php';
}

use AwsS3S3Client;
use AwsExceptionAwsException;

function pda_s3_integration_update_general_setting() {
    error_reporting(E_ALL);
    ini_set('display_errors', true);

    // Security check
    $nonce = $_REQUEST['security_check'];
    if (!wp_verify_nonce($nonce, 'pdas3_ajax_nonce')) {
        error_log('Nonce verification failed', 0);
        wp_die('invalid_nonce');
    }

    // Get settings from request
    $settings = $_REQUEST['settings'];
    if (empty($settings)) {
        error_log('Settings are empty', 0);
        wp_die('Settings are empty');
    }

    // Assign settings to variables
    $region = $settings["region"] ?? null;
    $accessKeyId = $settings["aws_key"] ?? null;
    $secretAccessKey = $settings["aws_secret"] ?? null;
    $bucketName = $settings["bucket"] ?? null;

    // Log and verify settings
    if (!$region || !$accessKeyId || !$secretAccessKey || !$bucketName) {
        error_log("Region: $region, Access Key ID: $accessKeyId, Secret Access Key: $secretAccessKey, Bucket Name: $bucketName", 0);
        wp_die('Invalid AWS configuration settings');
    }

    // Initialize S3 client and check bucket
    try {
        $s3Client = new S3Client([
            'version' => 'latest',
            'region' => $region,
            'credentials' => [
                'key' => $accessKeyId,
                'secret' => $secretAccessKey,
            ],
        ]);

        $isOk = $s3Client->doesBucketExist($bucketName);

        if (!$isOk) {
            wp_send_json($isOk);
            wp_die();
        }

    } catch (AwsException $e) {
        error_log('AWS Error: ' . $e->getMessage(), 0);
        wp_die('AWS SDK error');
    }
}

// Hook into WordPress admin to add your function
add_action('wp_ajax_pda_s3_integration_update_general_setting', 'pda_s3_integration_update_general_setting');

// Enqueue the JavaScript file
function my_s3_plugin_enqueue_scripts() {
    wp_enqueue_script('my-s3-plugin-js', plugins_url('js/my-s3-plugin.js', __FILE__), array('jquery'), '1.0', true);

    // Localize the script with new data
    wp_localize_script('my-s3-plugin-js', 'myS3Plugin', array(
        'ajaxurl' => admin_url('admin-ajax.php'),
        'nonce' => wp_create_nonce('pdas3_ajax_nonce')
    ));
}
add_action('admin_enqueue_scripts', 'my_s3_plugin_enqueue_scripts');

Here is my js file

jQuery(document).ready(function($) {
    var data = {
        action: 'pda_s3_integration_update_general_setting',
        security_check: myS3Plugin.nonce,
        settings: {
            region: 'EXAMPLE',
            aws_key: 'EXAMPLE',
            aws_secret: 'EXAMPLE',
            bucket: 'EXAMPLE'
        }
    };

    $.post(myS3Plugin.ajaxurl, data, function(response) {
        console.log(response);
    });
});

Here is my composer.json file

{
    "require": {
      "aws/aws-sdk-php": "^3.318",
        "coenjacobs/mozart": "^0.7.1"
    }
}

I want to configure AWS s3 bucket with the latest version 3.318.0

Here is the errors I am getting

<br />
<b>Warning</b>:  AwsClientResolver::_default_ignore_configured_endpoint_urls(): Argument #1 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_ignore_configured_endpoint_urls(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_default_endpoint(): Argument #1 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  Undefined array key "ignore_configured_endpoint_urls" in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcClientResolver.php</b> on line <b>1245</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_endpoint(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_region(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsS3S3Client::_applyApiProvider(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_defaults(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_default_use_fips_endpoint(): Argument #1 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_use_fips_endpoint(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_default_use_dual_stack_endpoint(): Argument #1 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_use_dual_stack_endpoint(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  AwsClientResolver::_apply_endpoint_provider(): Argument #2 ($args) must be passed by reference, value given in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php</b> on line <b>419</b><br />
<br />
<b>Warning</b>:  Undefined array key "api" in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcClientResolver.php</b> on line <b>1155</b><br />
<br />
<b>Fatal error</b>:  Uncaught TypeError: AwsApiService::createSerializer(): Argument #1 ($api) must be of type AwsApiService, null given, called in C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcClientResolver.php on line 1154 and defined in C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcApiService.php:83
Stack trace:
#0 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcClientResolver.php(1154): AwsApiService::createSerializer(NULL, '')
#1 [internal function]: AwsClientResolver::_default_serializer(Array)
#2 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsprevent-direct-access-gold-3.0vendorantecedentpatchworksrcCallRerouting.php(419): call_user_func_array(Array, Array)
#3 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcClientResolver.php(393): PatchworkCallReroutingdispatchDynamic(Array, Array)
#4 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcAwsClient.php(248): AwsClientResolver->resolve(Array, Object(AwsHandlerList))
#5 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcS3S3Client.php(381): AwsAwsClient->__construct(Array)
#6 C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginmy-s3-plugin.php(47): AwsS3S3Client->__construct(Array)
#7 C:UsersMeetLocal Sitespda-liveapppublicwp-includesclass-wp-hook.php(324): pda_s3_integration_update_general_setting('')
#8 C:UsersMeetLocal Sitespda-liveapppublicwp-includesclass-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#9 C:UsersMeetLocal Sitespda-liveapppublicwp-includesplugin.php(517): WP_Hook->do_action(Array)
#10 C:UsersMeetLocal Sitespda-liveapppublicwp-adminadmin-ajax.php(192): do_action('wp_ajax_pda_s3_...')
#11 {main}
  thrown in <b>C:UsersMeetLocal Sitespda-liveapppublicwp-contentpluginsmy-s3-pluginvendorawsaws-sdk-phpsrcApiService.php</b> on line <b>83</b><br />
<p>There has been a critical error on this website.</p><p><a href="https://wordpress.org/documentation/article/faq-troubleshooting/">Learn more about troubleshooting WordPress.</a></p> 

Here is the snapshot of errors and warning I am getting
enter image description here

New contributor

Riddhish is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật