Skip to main content
Glama

select-profile

Choose an AWS profile and optional region for subsequent AWS interactions. Automatically handles SSO authentication if required, ensuring secure and streamlined access to AWS resources.

Instructions

Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication

Input Schema

NameRequiredDescriptionDefault
profileYesName of the AWS profile to select
regionNoRegion to use (if not provided, us-east-1 is used)

Input Schema (JSON Schema)

{ "properties": { "profile": { "description": "Name of the AWS profile to select", "type": "string" }, "region": { "description": "Region to use (if not provided, us-east-1 is used)", "type": "string" } }, "required": [ "profile" ], "type": "object" }

Implementation Reference

  • The main execution logic for the 'select-profile' tool. It parses the input arguments using SelectProfileSchema, fetches credentials for the specified profile using getCredentials function, updates the global selectedProfile, selectedProfileCredentials, and selectedProfileRegion state variables, and returns a success text response.
    } else if (name === "select-profile") { const { profile, region } = SelectProfileSchema.parse(args); const credentials = await getCredentials( profiles[profile], profile, profiles ); selectedProfile = profile; selectedProfileCredentials = credentials; selectedProfileRegion = region || "us-east-1"; return createTextResponse("Authenticated!");
  • Zod schema defining the input validation for the 'select-profile' tool: requires 'profile' string, optional 'region' string.
    const SelectProfileSchema = z.object({ profile: z.string(), region: z.string().optional(), });
  • index.ts:91-109 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for 'select-profile'.
    { name: "select-profile", description: "Selects AWS profile to use for subsequent interactions. If needed, does SSO authentication", inputSchema: { type: "object", properties: { profile: { type: "string", description: "Name of the AWS profile to select", }, region: { type: "string", description: "Region to use (if not provided, us-east-1 is used)", }, }, required: ["profile"], }, },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RafalWilinski/aws-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server