ruby on rails - How to read yml file uploaded to aws s3 -


I have a yml file that contains some credentials and keys, so I'm surprised if it is on S3 It would be nice to upload and use it via private URL or AAS object.

I tried to give the URL in my development. RB is not working to try to load the file.

Next I tried to create an AOS object and access the file in the S3 bucket.

  s3 = AWS :: S3.new (access_key_id: '.xxx, to read the file and read it.) But this empty me  {}  Returns whether the url / file has to do anything with permission? How can I get it? 

This is the first time that I am using AOS and I am not sure That's my approach right or if this is the best way to keep sensitive data safe. Plz how do i get this Guide for the purpose.

Thanks

I will use the following gem for this Improved Implementation with Imam.

Install it and add to you Gemfile

then vim .env or your choice Create this new file by using the editor.

Add your keys:

  S3_BUCKET = YOURS3BUCKET SECRET_KEY = YOURSECRETKEYGOESHERE  

and Save it.

Whenever you need the S3 key, you can set it up Can call from the application. Once the Heroku is pushed, just update your environment variable, there is no need for you. Mystery to Github


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -