Which library to replace requests module post in AWS lambda - aws-lambda

Since python 3.6 version lambda functions won't be supported by AWS in future, I'm looking to replace requests module which uses requests.post(url,data,headers,json) by any other python modules which does similar functionality in python 3.9+ versions. Any suggestions please.

If you are looking for an alternative to requests, you can use e.g. https://docs.aiohttp.org/en/stable/. However, if you want to keep using requests, you can still use it in newer Python versions (like 3.9) without issues. Did you find that to not be the case?

Related

Apache Ozone. No REST API in the newer versions. How to communicate from third applications?

I can find REST API docs for the alpha versions of apache Ozone. However, I can find it for the current version (0.5.0) Has it been removed? 
Is there a way to communicate from any application with OZone without using the specific Java Client or shell commands?
Thanks
It's S3 compatible. You'd therefore be able to use any S3 client

Upgrade SpringXD custom module

I have a question about SpringXD and custom modules, that even being quite obvious I haven't been able to find out an answer in the official docs.
How am I supposed to upgrade a Custom Spring XD module. I have usually removed a module, and then re-uploaded it again through xd-shell. But it is not a convenient way, since you need to destroy all your streams using that module.
Is there a nice way to do it, ideally something like module upgrade --file in the shell. (There is not such a thing).
Thank you.
Well, since it looks like there is no way to upgrade custom modules I have just opened a ticket in Jira.
https://jira.spring.io/browse/XD-3392

Does Ruby Amazon S3 SDK use SSLv3?

I have a Rails application that uses Amazon S3 for image upload storage. Upload is handled directly in the browser, file manipulation is handled on the serverside.
Recently I received an automail that Amazon discontinues support for SSLv3. I wanted to clarify whether my application that uses an older version of Ruby SDK (aws-sdk-v1 1.61.0) could be affected because of that, since I am not sure what mechanism it uses for the ssl handshake.
Thank you in advance.
Short answer: it depends.
The old aws sdk allows you to provide (as a configuration setting) the http handler to use - the answer is dependant on the http handler user. Assuming you're using the default net/http based handler, then it depends on which ruby version you use and which openssl version it was built against.
As of ruby 2.1.4, 2.0.0p594, 1.9.3p550, ruby will not allow SSL3 connections by default (see the announcement). If you are running such a version of ruby, then SSL3 connections shouldn't be attempted, unless you go out of your way to do so.
If you use an earlier version then ruby may default to SSLv3 (depending on the openssl version built against) but if that fails it should be able to switch to a newer protocol instead. I'd highly recommend updating to the latest version in the ruby series you are already using, but I don't think you'll run into problems when SSLv3 is disabled.

What gem should I use to work with AWS

I'm currently writing an application in ruby on rails that uses AWS. I see two options for gems, aws-sdk and fog. Fog seems to support almost all of the AWS services except for sns(which I wanted to use :/) and has mock services for testing not to mention you can change out for rackspace or a different provider rather easily. Is there any big reason why I should use AWS's sdk? It supports sns, but not rds and does not come with mocking.
If I'm missing something please let me know as I am new to this.
Thanks in advance.
You may also want to checkout rightaws though unfortunately it doesn't have support for sns either. It was one of the first libraries available and provides support for most of the functionalities. However, fog is releasing new versions more often and is catching up quickly and is a bit more high level. The aws_sdk was only released recently and the main reason to go with it is that it comes from Amazon itself and will likely become the standard. This is why we included it in rubystack. We expect that people will provide higher level libraries that will build on top of it.
aws-sdk supports SNS but does not mock the services. It does hoever provide basic stubbing:
AWS.stub!
This causes all service requests to "do nothing" and return "empty responses". It is used extensively inside the specs provided with the gem. This is is not the same as mocking a service but it can be a useful testing aid.

cURL Ruby Library

Are there any active cURL libraries for Ruby?
Look at HTTPClient and Typhoeus. I've used them both and they're very powerful and easy to use. Both support parallel connections well.
There's also Patron but I haven't used it lately and don't know if it's under active support.

Resources