aws-samples / service-screener-v2

A tool for customers to evaluate their AWS service configurations based on AWS and community best practices and receive recommendations on potential improvements.
Apache License 2.0
337 stars 62 forks source link

China region support #158

Open gypsydang opened 1 week ago

gypsydang commented 1 week ago

Pick a category

Is your feature request related to a problem? Please describe. I tried to run it in China region EC2 with proper roles and changed some region code in the main.py/config ..., but still not work. I think there may be some configuration/dependencies. Any details about the APIs or services used would be valueable for me.

Describe the solution you'd like A clear and concise description of what you want to happen. Hope to run this tool in AWS China regions.

kuettai commented 1 week ago

Hi, can I know your EC2 OS? I don't have access to China region.

gypsydang commented 1 week ago

amazon Linux. i also tried on my mac with admin ak/sk

kuettai commented 1 week ago

For Mac, can you follow this guide: https://github.com/aws-samples/service-screener-v2/blob/main/DEVELOPER.md

I will only check Amazon Linux in next 24 hours

gypsydang commented 1 week ago

i can run the tools and the cloudformation stack is created successfully. But no resources are scanned and the program stopped there with no outputs. i used debug parameter, the output shows all services with total 0 resource. i don't know if there is any default region or api endpoint in this tool caused this problem as China region is a independent partition to global regions.

kuettai commented 1 week ago

That is unusual.

Can you run without debug and provide me the following:

1/ the actual ss command you use 2/ the entire output of ss during execution 3/ after you run ss, check if "error.txt" exists in the adminlte// folder, if there is, please provide to me as well

gypsydang commented 1 week ago
  1. screener --regions cn-north-1 --services ec2 --debug true
  2. output: -- Acquiring identify info...

    Processing the following account id: 27***49

[info] Empty CF stacked created successfully, name:ssv2-696dd4ee9632 {"rds": {"rdsmariadb": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmysql": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmssql": {"total": 0, "items": [], "rules": {"ConsiderOpenSource": []}}, "rdspostgres": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmysqlaurora": {"total": 0, "items": [], "rules": {}}, "rdspostgresaurora": {"total": 0, "items": [], "rules": {}}}, "dynamodb": {"dynamodbcommon": {"total": 0, "items": [], "rules": {}}}, "ec2": {"ec2instance": {"total": 0, "items": [], "rules": {"WindowsOSNotLatest": [], "WindowsOSOutdated": [], "MoveToGraviton": []}}}, "eks": {"ekscommon": {"total": 0, "items": [], "rules": {}}}, "lambda": {"lambdacommon": {"total": 0, "items": [], "rules": {}}}} {"rds": {"rdsmariadb": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmysql": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmssql": {"total": 0, "items": [], "rules": {"ConsiderOpenSource": []}}, "rdspostgres": {"total": 0, "items": [], "rules": {"MoveToGraviton": [], "ConsiderAurora": []}}, "rdsmysqlaurora": {"total": 0, "items": [], "rules": {}}, "rdspostgresaurora": {"total": 0, "items": [], "rules": {}}}, "dynamodb": {"dynamodbcommon": {"total": 0, "items": [], "rules": {}}}, "ec2": {"ec2instance": {"total": 0, "items": [], "rules": {"WindowsOSNotLatest": [], "WindowsOSOutdated": [], "MoveToGraviton": []}}}, "eks": {"ekscommon": {"total": 0, "items": [], "rules": {}}}, "lambda": {"lambdacommon": {"total": 0, "items": [], "rules": {}}}}

  1. No error.txt

Terminal is stuck at the output and there is no response.

kuettai commented 1 week ago

Run this and let me know if you still encounter similar issue.

screener --regions cn-north-1 --services ec2 --workerCounts 1

gypsydang commented 1 week ago

Yes, the same output. Do you use any APIs that are not related to the resources services? like WA tools or other management services.

kuettai commented 1 week ago

Try one more thing, check if you can call aws ec2 describes aws ec2 describe-instances --region cn-north-1

gypsydang commented 1 week ago

the permission is ok