Closed andreivmaksimov closed 1 month ago
Issue #, if available: NA
Description of changes: Adding ability to serialize and deserialize jobs information
Usage example:
python sync.py --src-role-arn SRC_ACCOUNT_IAM_ROLE_ARN --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
python sync.py --dst-role-arn TARGET_ACCOUNT_IAM_ROLE_ARN --dst-region us-east-1 --deserialize-from-file resources.json --config-path mapping.json --targets job,catalog --skip-prompt
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing:
Existing path is tested through executing the following command command: python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --dst-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-prod --dst-region us-east-1 --config-path mapping.json --targets job,catalog --verbose --skip-prompt
python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --dst-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-prod --dst-region us-east-1 --config-path mapping.json --targets job,catalog --verbose --skip-prompt
New paths are tested in the following way:
Serialization: python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
Deserialization: python sync.py --src-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
python sync.py --src-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
All tests are executed from the Cloud Shell in the testing AWS account.
Thank you for your contribution!
Issue #, if available: NA
Description of changes: Adding ability to serialize and deserialize jobs information
Usage example:
python sync.py --src-role-arn SRC_ACCOUNT_IAM_ROLE_ARN --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
python sync.py --dst-role-arn TARGET_ACCOUNT_IAM_ROLE_ARN --dst-region us-east-1 --deserialize-from-file resources.json --config-path mapping.json --targets job,catalog --skip-prompt
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing:
Existing path is tested through executing the following command command:
python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --dst-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-prod --dst-region us-east-1 --config-path mapping.json --targets job,catalog --verbose --skip-prompt
New paths are tested in the following way:
Serialization:
python sync.py --src-role-arn arn:aws:iam::SRC_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
Deserialization:
python sync.py --src-role-arn arn:aws:iam::DST_ACCOUNT_ID:role/GlueCrossAccountRole-dev --src-region us-east-1 --serialize-to-file resources.json --targets job,catalog --skip-prompt
All tests are executed from the Cloud Shell in the testing AWS account.