Make a request from Device Farm (appium python) to API Gateway

Conclusion

Can not

Background

Whew. I wrote from the conclusion because the great old men say it first from the conclusion. That's why.

  1. Preface: SSL handshake failure
  2. Main subject: Subprocess to peek at the server
  3. Final Chapter: Return me in February

Preface: SSL handshake failure

An ordinary handsome engineer, Takahashi Man, was struggling to evolve the products he is currently involved in into the next form.

I wanted to dynamically test the device using the serverless API created by API Gateway + Lambda from the appium-python code that runs on AWS Device Farm.

Install the package to stretch out as soon as you wake up in the morning

$ pip install requests

Yes, I wrote requests in my usual routine so that my spine stretches and I exhale as I inhale.

response = requests.post(
    url,
    headers=headers,
    data=json.dumps(payload)
)

return response.json()

It's the behavior I've been doing every day since I changed from PHPer to Pythonista. There is nothing scary. Gently package and pour into Device Farm. As an aside, Takahashi Man had a packaging shell called deploy.sh that didn't deploy anything. Once you've streamed it to Device Farm, you can fix the code for mistakes and you're done.

SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Takahashi Man was breathtaking.

The main subject: Subprocess to look into the server

I'm getting tired of it, so I'll finish the main subject quickly. Since I dived super in the sub process, I will write only what I understood.

--SSLv3 died from various vulnerabilities such as POODLE --requests-toolbelt can't be used --When I try to install PyOpenSSL, the wheel is not set to none-any. --Originally PyOpenSSL was included --Openssl version is 1.0.0 --The latest SSL version that can be used is TLSv1 --There was a cipher suite that could also be used for API Gateway --Curl allows you to connect outside with TLSv1

Final chapter: Return me in February

--API Gateway requires client-side SNI support --Python side supports SNI from 2.7.9 --The Python version in Device Farm is 2.7.6

I have no choice but to reverse proxy or do my best with curl and parse ...

This is the result of diving into a treasure map and a place where you do not know if there is a treasure. I don't think anyone in the world has fallen into such a trap, but I hope it helps when the second and third servants appear ...

** Return me in February! ** **

Recommended Posts

Make a request from Device Farm (appium python) to API Gateway
python / Make a dict from a list.
Rubyist tried to make a simple API with Python + bottle + MySQL
How to send a request to the DMM (FANZA) API with python
[Python] How to make a class iterable
Send a message from Python to Slack
I tried to make a Web API
API explanation to touch mastodon from python
Connect to coincheck's Websocket API from Python
I tried to make "Sakurai-san" a LINE BOT with API Gateway + Lambda
How to make a request to bitFlyer Lightning's Private API in Go language
Edit Excel from Python to create a PivotTable
How to open a web browser from python
I want to make a game with Python
How to generate a Python object from JSON
Try to make a "cryptanalysis" cipher with Python
Try to make a dihedral group with Python
I want to make C ++ code from Python code!
Lark Basics (Python, Lark to make a shell-like guy)
WEB scraping with python and try to make a word cloud from reviews
Try to make a Python module in C language
Try to make a command standby tool with python
Changes from Python 3.0 to Python 3.5
Changes from Python 2 to Python 3.0
Make a copy of a Google Drive file from Python
Push notifications from Python to Android using Google's API
From buying a computer to running a program with python
How to make a Python package using VS Code
[Python] I want to make a nested list a tuple
Consider a conversion from a Python recursive function to a non-recursive function
How to post a ticket from the Shogun API
Python script to create a JSON file from a CSV file
[Python] How to call a c function from python (ctypes)
How to create a kubernetes pod from python code
A little bit from Python using the Jenkins API
I tried to make a generator that generates a C # container class from CSV with Python
I tried to create API list.csv in Python from swagger.yaml
[Python] How to make a list of character strings character by character
Quickly take a query string with API Gateway-> Lambda (Python)
How to slice a block multiple array from a multiple array in Python
How to run a Python program from within a shell script
The first API to make with python Djnago REST framework
How to launch AWS Batch from a python client app
I want to start a lot of processes from python
Experiment to make a self-catering PDF for Kindle with Python
How to make a Python package (written for an intern)
I want to send a message from Python to LINE Bot
I tried to make a stopwatch using tkinter in python
I want to make input () a nice complement in python
Send a request from AWS Lambda to Amazon Elasticsearch Service
Extract the value closest to a value from a Python list element
Call github api in python to get pull request information
Post from Python to Slack
Cheating from PHP to Python
A road to intermediate Python
AWS CDK-Lambda + API Gateway (Python)
Make MeCab available from Python3
Anaconda updated from 4.2.0 to 4.3.0 (python3.5 updated to python3.6)
Make a bookmarklet in Python
Make a fortune with Python
Switch from python2.7 to python3.6 (centos7)