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

AWS SSO credentials not working #151

Closed
angelolloqui opened this issue Dec 11, 2024 · 1 comment
Closed

AWS SSO credentials not working #151

angelolloqui opened this issue Dec 11, 2024 · 1 comment
Labels
bug Something isn't working triage

Comments

@angelolloqui
Copy link

angelolloqui commented Dec 11, 2024

Expected Behaviour

I am following the quickstart guide in https://awslabs.github.io/multi-agent-orchestrator/general/quickstart/ . I have set my environment with the AWS CLI, and it seems to work ok. When I run the aws sts get-caller-identity I get the proper response. I have also tried login in again just in case.

When running npx ts-node main.ts (I have renamed the .ts file) then I expect it to run the example agent. However, it does not seem to work

Current Behaviour

I get an error :

Error processing request: TypeError: Cannot read properties of undefined (reading 'sso_region')

and the stacktrace:

Error processing request: TypeError: Cannot read properties of undefined (reading 'sso_region')
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js:201:36
    at resolveProfileData (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js:245:12)
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:97:27
    at coalesceProvider (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:124:18)
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:142:18
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/core/dist-cjs/index.js:86:17
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22
    at BedrockClassifier.processRequest (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/classifiers/bedrockClassifier.ts:151:24)
    at BedrockClassifier.classify (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/classifiers/classifier.ts:178:14)
    at MultiAgentOrchestrator.classifyRequest (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/orchestrator.ts:343:32)
Error during intent classification: TypeError: Cannot read properties of undefined (reading 'sso_region')
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js:201:36
    at resolveProfileData (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js:245:12)
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:97:27
    at coalesceProvider (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:124:18)
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/property-provider/dist-cjs/index.js:142:18
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@smithy/core/dist-cjs/index.js:86:17
    at /Users/angelgarcia/playtomic/others/bedrock-test/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:34:22
    at BedrockClassifier.processRequest (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/classifiers/bedrockClassifier.ts:151:24)
    at BedrockClassifier.classify (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/classifiers/classifier.ts:178:14)
    at MultiAgentOrchestrator.classifyRequest (/Users/angelgarcia/playtomic/others/bedrock-test/node_modules/multi-agent-orchestrator/src/orchestrator.ts:343:32)

Code snippet

The code is the one from the guide

When running a debugger, in the ssoSessions inside credential-provider-sso/dist-cjs/index.js:186 are empty

I have tried several changes to my .aws/config file, and now it looks like:

[profile default]
sso_session = Syltek admin
sso_account_id = 118590098072
sso_role_name = AdministratorAccess
region = eu-central-1
output = json

[profile syltek-admin-profile]
sso_session = Syltek admin
sso_account_id = 118590098072
sso_role_name = AdministratorAccess
region = eu-central-1
output = json

[sso-session 'Syltek admin']
sso_start_url = https://d-99671edaa6.awsapps.com/start/#
sso_region = eu-central-1
sso_registration_scopes = sso:account:access

Possible Solution

I have tried setting my env variables AWS_DEFAULT_REGION and AWS_PROFILE, but it does not seem to work either.

Steps to Reproduce

Just run the quickstart code.

@angelolloqui angelolloqui added the bug Something isn't working label Dec 11, 2024
@angelolloqui
Copy link
Author

I was missing a config for the default. Replacing:

[profile default]

by:

[default]

and then, the name of the sso session with spaces was making it fail. I just replaced the name by something else and worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant