Hi guys, I am trying to delete files using the API but I get the following error : The AWS Access Key Id you provided does not exist in our records
I am using Ruby On Rails
I have this in my gemfile :
gem 'aws-sdk', '< 2.0'
and I created a aws.rb in initializer folder to have global variable in my app with the following :
[code]AWS.config(access_key_id: ‘…key id…’, secret_access_key: ‘…secret_key…’)
S3_BUCKET = AWS::S3.new.buckets[‘my_bucket’][/code]
When I upload a file the path for that file is like the following :
and finally here the method to delete the file :
key = '391cd178-a64a-4fda-83b6-210430c34a0c/file.png' S3_BUCKET.objects[key].delete
and the error is :
AWS::S3::Errors::InvalidAccessKeyId in ImagesController#delete_file
The AWS Access Key Id you provided does not exist in our records.
any help please ?