- Newest
- Most votes
- Most comments
Works fine for root user
$ aws sts get-caller-identity
{
"UserId": "9**********4",
"Account": "9**********4",
"Arn": "arn:aws:iam::9**********4:root"
}
$ aws lexv2-models describe-bot --bot-id D979UA813X
{
"botId": "D979UA813X",
"botName": "test",
"roleArn": "arn:aws:iam::9**********4:role/aws-service-role/lexv2.amazonaws.com/AWSServiceRoleForLexV2Bots_1G7Z1IPTQA5",
"dataPrivacy": {
"childDirected": true
},
"idleSessionTTLInSeconds": 300,
"botStatus": "Available",
"creationDateTime": "2024-07-03T18:29:47.859000+00:00",
"lastUpdatedDateTime": "2024-07-03T18:29:47.859000+00:00",
"botType": "Bot"
}
However it's not recommended to use root
https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html
Important We strongly recommend that you don't use the root user for your everyday tasks and that you follow the root user best practices for your AWS account. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials.
https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshooting_root-user.html
If you can't complete tasks when you are signed in as the root user for the account, your account might be a member of an organization in AWS Organizations. If so, and your organizational administrator used a service control policy (SCP) to limit the permissions of your account, then all users, including the root user, are affected. For more information, see Service control policies in the AWS Organizations User Guide.
Make sure that you are replacing the your-bot-id with the alphanumeric bot id you are trying to use.
Such as:
aws lexv2-models describe-bot --bot-id ONHXXXX885
Relevant content
- AWS OFFICIALUpdated 9 months ago

yeah i was able to get it to work; just had to replace your-bot-id with the actual bot ID of the Lex bot i wanted to work with. so you recommend i have to set up users, roles, and permissions in IAM (not IAM Identity Center)?
ideally, SSO, because it provides temporary permission and protects you from credentials leak (even if it leaks, it expires soon)
In SSO you will have user/password/mfa, but you will assume IAM roles in background and your credentials will be short-term
if you can not use IAM Identity Center, use a separate IAM User, but ensure Least Privilege Principle + regular password rotation and strong password policy + MFA
i already set up IAM Identity Center months ago, but not IAM Console; i have user, password, and MFA set up for my business partner although i only have those for myself at the account level