- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Python task to check AWS connectivity from Morpheu...
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 07:40 AM
04-15-2024 07:40 AM
Python task to check AWS connectivity from Morpheus application node
In a scenario where an AWS cloud is failing to integrate with Morpheus app due to issues with the infrastructure. This simple python script may come in handy to confirm if the issue is related to Morpheus or something outside of Morpheus. The script will simply lists all VPCs in the specified region.
The script requires the following python modules which can be installed via pip:
morpheus-cypher
boto3
The script will pull the AWS creds from the Morpheus cypher. So if you are running the task outside of Morpheus then please modify the variables ‘access_key’ and ‘access_secret’ as required.
#AWS creds loaded from Morpheus Cypher
c = Cypher(morpheus=morpheus,ssl_verify=False)
access_key=c.get("secret/aws_access_key")
access_secret=c.get("secret/aws_access_secret")
Specify AWS region you want to connect to:
default_region="eu-west-2"
To run the task from Morpheus configure the task as shown below:
Make sure you specify the Additional Packages as shown.
When successfully executed the task will list VPCs available on the specified region.
Test via proxy server
If the appliance node is behind a proxy server, then to test connectivity via proxy please modify the following variable as required.
#No proxy
proxy_definitions = {}
#With proxy creds
#proxy_definitions = {
# 'https': 'username:password@proxy_address:3128'
#}
#Without proxy creds
#proxy_definitions = {
# 'https': 'proxy_address:3128'
#}