PinkyJie / aws-transcribe-demo

A simple AWS demo utilises Amazon Transcribe to convert audio to text and analyse.
45 stars 22 forks source link

An error occurred: IamRoleLambdaExecution - API: iam:GetRole User: #1

Closed dariushazimi closed 5 years ago

dariushazimi commented 5 years ago

Hi Wenbo Jie,

I am running to an issue when tyring to run the yarn build.

During the process the program fails here:

CloudFormation - CREATE_FAILED - AWS::IAM::Role - IamRoleLambdaExecution CloudFormation - CREATE_FAILED - AWS::S3::Bucket - TranscribedTextFileBucket

An error occurred: IamRoleLambdaExecution - API: iam:GetRole User: arn:aws:iam::678230727708:user/dariushuser is not authorized to perform: iam:GetRole on resource: role voice-assist-dev-us-east-1-lambdaRole.

I have assigned the user the role of admin plus the following but the error still comes up.

AWSLambdaFullAccess IAMFullAccess AWSLambdaExecute AWSLambdaBasicExecutionRole AWSLambdaRole

Any idea? Thanks

` …/packages/backend   mast●  yarn deploy
Serverless: Checking Stack update progress... ... CloudFormation - CREATE_IN_PROGRESS - AWS::IAM::Role - IamRoleLambdaExecution CloudFormation - CREATE_FAILED - AWS::IAM::Role - IamRoleLambdaExecution CloudFormation - CREATE_FAILED - AWS::S3::Bucket - TranscribedTextFileBucket CloudFormation - UPDATE_ROLLBACK_IN_PROGRESS - AWS::CloudFormation::Stack - voice-assist-dev CloudFormation - UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS - ... ... CloudFormation - UPDATE_ROLLBACK_COMPLETE - AWS::CloudFormation::Stack - voice-assist-dev

Serverless: Operation failed!

Serverless Error ---------------------------------------

An error occurred: IamRoleLambdaExecution - API: iam:GetRole User: arn:aws:iam::678230727708:user/dariushuserId is not authorized to perform: iam:GetRole on resource: role voice-assist-dev-us-east-1-lambdaRole.

Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com

Your Environment Information ----------------------------- OS: darwin Node Version: 10.15.1 Serverless Version: 1.32.0

error Command failed with exit code 1. `

dariushazimi commented 5 years ago

Resolved the issue by specifically adding in-line policy to the user.

mikelangmayr commented 3 years ago

What policy was that?