You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/AWSCore/Code/Tools/ResourceMappingTool
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
5 years ago
..
controller Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
manager Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
model Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
multithread Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
style Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
tests Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
utils Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
view Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago
README.md [LYN-3149] Update AWSCore Editor menu to invoke resource mapping tool through engine python environment (#318) 5 years ago
requirements.txt Integrating latest 47acbe8 5 years ago
resource_mapping_tool.py Shorten copyright headers by splitting into 2 lines (#2213) 5 years ago

README.md

Welcome to the AWS Core Resource Mapping Tool project!

Setup aws config and credential

Resource mapping tool is using boto3 to interact with aws services:

  • Read boto3 Configuration to setup default aws region.
  • Read boto3 Credentials to setup default profile or credential keys.

Or follow AWS CLI configuration which can be reused by boto3 lib:

Python Environment Setup Options

1. Engine python environment (Including Editor)

  1. In order to use engine python environment, it requires to link Qt binaries for this tool. Follow cmake instructions to configure your project, for example:

    $ cmake -B <BUILD_FOLDER> -S . -G "Visual Studio 16 2019" -DLY_3RDPARTY_PATH=<PATH_TO_3RDPARTY> -DLY_PROJECTS=<PROJECT_NAME>
    
  2. At this point, double check engine python environment gets setup under <ENGINE_ROOT_PATH>/python/runtime directory

  3. Build project with AWSCore.Editor (or AWSCore.ResourceMappintTool, or Editor) target to generate required Qt binaries.

    $ cmake --build <BUILD_FOLDER> --target AWSCore.Editor --config <CONFIG> -j <NUM_JOBS>
    
  4. At this point, double check Qt binaries gets generated under <BUILD_FOLDER>/bin/<CONFIG_FOLDER>/AWSCoreEditorQtBin directory

  5. Launch resource mapping tool under engine root folder:

    • Windows
      • release mode
      $ python\python.cmd Gems\AWSCore\Code\Tools\ResourceMappingTool\resource_mapping_tool.py --binaries_path <PATH_TO_BUILD_FOLDER>\bin\profile\AWSCoreEditorQtBin
      
      • debug mode
      $ python\python.cmd debug Gems\AWSCore\Code\Tools\ResourceMappingTool\resource_mapping_tool.py --binaries_path <PATH_TO_BUILD_FOLDER>\bin\debug\AWSCoreEditorQtBin
      
  • Note - Editor is integrated with the same engine python environment to launch Resource Mapping Tool. If it is failed to launch the tool in Editor, please follow above steps to make sure expected scripts/binaries are present.

2. Python virtual environment

This project is set up like a standard Python project. The initialization process also creates a virtualenv within this project, stored under the .env directory. To create the virtualenv it assumes that there is a python3 (or python for Windows) executable in your path with access to the venv package. If for any reason the automatic creation of the virtualenv fails, you can create the virtualenv manually.

  1. To manually create a virtualenv:

    • Windows
    $ python -m venv .env
    
    • Mac or Linux
    $ python3 -m venv .env
    
  2. Once the virtualenv is created, you can use the following step to activate your virtualenv:

    • Windows
    % .env\Scripts\activate.bat
    
    • Mac or Linux
    $ source .env/bin/activate
    
  3. Once the virtualenv is activated, you can install the required dependencies:

    • Windows
    $ pip install -r requirements.txt
    
    • Mac or Linux
    $ pip3 install -r requirements.txt
    
  4. At this point you can launch tool like other standard python project.

    • Windows
    $ python resource_mapping_tool.py
    
    • Mac or Linux
    $ python3 resource_mapping_tool.py