Ask Your Question
1

Connect to AWS development endpoint

asked 2020-09-30 23:50:54 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Does Wing provide equivalent PyCharm functionality to the one shown in the following instructions to connect to an AWS development endpoint to allow remote development and debugging of AWS Glue Python scripts from within a local Wing IDE?

https://docs.aws.amazon.com/glue/late...

Thanks,

Ray

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-11-18 13:02:34 -0600

I think this may be doable in Wing 7 after all as follows:

1) Create a new project with "Connect to Remote Host via SSH" project type, or just a new blank project and set Python Executable under Project Properties to Remote and then create a remote host configuration for your AWS instance. Save the project and check that this works by doing Restart in the Python Shell's Options menu and verifying that it's running Python on the AWS instance.

2) Use Project > Add Existing Directory to add your local source directory to your project. Since you've set Python Executable to a remote interpreter, the dialog will default to selecting from the remote host but you can switch to Local Host in the selector at the top.

3) In Project Properties under the Debug/Execute tab set a Build Command that runs the sftp command line needed to deploy your code to AWS. In the build command that you define ,you'll need to select 'localhost' for the Hostname field under the OS Command's Environment tab so it is run locally and not on the remote host.

4) Run the build command once from the OS Commands tool to test and to get your files onto the remote server.

5) Use Project > Add Existing Directory again to add the remote side directory to your project. The Project tree may take some time to update and may show the added item initially as a file until it finishes scanning.

6) Select your main entry point from the remote side directory and open it in the editor and/or right click on it to set it as the main debug file for the project.

Now when you start debug, Wing will first run that build command to run sftp to update the code on the AWS side and then start debug.

The downside of this approach is that Wing will open files from the remote host when you debug and you'll need to switch to the local copies when you edit. This is what the different approach in Wing 8 will address. We're working on that actively and hope to have another release in a month or so, but there are some significant unknowns still left in the development process so this estimate may be incorrect.

Please let us know if this doesn't work for you. I tried it with a remote host and it worked for me, but it wasn't specifically an AWS Glue Endpoint.

edit flag offensive delete link more

Comments

I really appreciate you going the extra mile to address this concern. I will update here with the results once I give it a try.

rayserrano2735 gravatar imagerayserrano2735 ( 2020-11-18 13:21:05 -0600 )edit
0

answered 2020-10-02 08:11:10 -0600

updated 2020-10-02 08:11:33 -0600

Yes, this is described here: https://wingware.com/doc/howtos/aws

There are also two relevant articles on this:

https://wingware.com/hints/aws-1

https://wingware.com/hints/aws-2

Please let us know if you run into any problems.

edit flag offensive delete link more

Comments

Please review the link I originally provided.
https://docs.aws.amazon.com/glue/late...

This question is about how to configure Wing to connect to the AWS Glue Endpoint, the way the link describes for PyCharm, and your answers really do not address the actual question.

rayserrano2735 gravatar imagerayserrano2735 ( 2020-11-18 09:02:55 -0600 )edit

Thanks for clarifying. We would need to look into actually setting this up here to provide detailed instructions. The remote dev part is doable and set up in a similar way, by setting the Python Executable in Project Properties to Remote and creating a configuration for the remote host. But Wing doesn't have a way to transfer/deploy code via sftp so that part would have to be done manually. Our existing remote dev support assumes the master copy of files are on the remote system so you add the remote directory to Wing's project and not a local directory as I think is done in those PyCharm instructions. We're working on some additional support for Wing 8 that I think will be able to support the sftp case, where the master copy of files is local but executed/debugged on a remote host (that's also ...(more)

Wingware Support gravatar imageWingware Support ( 2020-11-18 10:43:20 -0600 )edit

Thanks for the information. To summarize, at this point Wing is unable to match the PyCharm functionality as related to AWS Glue endpoint-based development. Could you provide an estimate on the general release date for Wing 8? I am a Wing fan, but if PyCharm is overall ahead of Wing for many months then I might have to reconsider my IDE preference. As stated in the link I provided, PyCharm has had this functionality since 2019 Q3.

rayserrano2735 gravatar imagerayserrano2735 ( 2020-11-18 12:26:13 -0600 )edit

Actually I think it can be configured in Wing now and will add an answer with details.

Wingware Support gravatar imageWingware Support ( 2020-11-18 12:47:25 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-09-30 23:50:54 -0600

Seen: 119 times

Last updated: Nov 18