Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError cannot find suitable AWS partition #787

Closed
xfudox opened this issue Mar 7, 2023 · 2 comments
Closed

ValueError cannot find suitable AWS partition #787

xfudox opened this issue Mar 7, 2023 · 2 comments

Comments

@xfudox
Copy link

xfudox commented Mar 7, 2023

Describe the bug
Running taskcat in a gitlab pipeline on a merge request.

Expected behavior
taskcat running correctly without error

Version

  • taskcat: 0.9.36
  • Python: 3.7

Gitlab pipeline job

testing:
  image: public.ecr.aws/sam/build-python3.7
  stage: testing
  before_script:
    - aws configure set aws_access_key_id $AWS_REGION
    - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
    - aws configure set default.region $AWS_REGION

    - python --version
    - curl -O https://bootstrap.pypa.io/get-pip.py
    - python3 get-pip.py --user
    - pip install --upgrade pip
    - pip3 install taskcat --user
    - export PATH=$PATH:~/.local/bin
  script:
    - taskcat test run

taskcat config file

general:
  auth:
    default: default
project:
  name: my-project
  regions:
    - eu-central-1
  parameters:
    StageName: testing
    ApplicationArtifactsBucketName: testing-bucket-name
    StripeSecretKey: (redacted)
  package_lambda: false
  shorten_stack_name: true
tests:
  stack-test:
    template: ./template.yaml

Pipeline command output

$ taskcat test run
 _            _             _   
| |_ __ _ ___| | _____ __ _| |_ 
| __/ _` / __| |/ / __/ _` | __|
| || (_| \__ \   < (_| (_| | |_ 
 \__\__,_|___/_|\_\___\__,_|\__|
                                
version 0.9.36
Not in terminal, reprint now using normal build-in print function.
[WARN   ] : No stacks were created... skipping cleanup.
[ERROR  ] : ValueError cannot find suitable AWS partition
Cleaning up project directory and file based variables
@andrew-glenn
Copy link
Contributor

andrew-glenn commented Mar 7, 2023

@xfudox please rotate the API Key you provided in your taskcat config.

This usually happens when you provide credentials for one partition (govcloud etc) and try to launch in another

@xfudox
Copy link
Author

xfudox commented Mar 8, 2023

Ok got it.

Read online that this error can occur when credentials are invalid or wrongly formatted, and than noticed that i mistakenly copy-pasted $AWS_REGION as input for aws configure set aws_access_key_id command.

Fixed it, not it works perfectly.

@xfudox xfudox closed this as completed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants