I have recently deployed a test server for one of my projects on AWS EC2, utilizing an Ubuntu server with Gunicorn and Nginx.
During testing on my localhost, the Django server functioned correctly. Specifically, I have a function generating presigned URLs for files to be accessed in my frontend. These presigned URLs include the X-Amz-Algorithm.
However, upon obtaining the link from my EC2 server, I noticed that it incorporates a form of signing, including AWSAccessKeyId, a Signature, and an "Expires" parameter. But not the presigned link with the X-Amz-Algorithm
My objective is to achieve the same presigned URL functionality on the EC2 server. How can I accomplish this?
settings.py (S3 Bucket Config
#S3 BUCKETS CONFIG
AWS_ACCESS_KEY_ID = '*************'
AWS_SECRET_ACCESS_KEY = '*******************************'
AWS_STORAGE_BUCKET_NAME = 'project-backend'
AWS_S3_SIGNATURE_VERSION = 's3v4'
S3_USE_SIGV4 = True
AWS_S3_FILE_OVERWRITE = False
AWS_DEFAULT_ACL = None
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
#STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
AWS_S3_ADDRESSING_STYLE = 'virtual'
AWS_S3_ENDPOINT_URL = 'https://s3.eu-central-1.amazonaws.com'
AWS_S3_REGION_NAME = 'eu-central-1'