The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

85212 (4) [Avatar] Offline
#1


> get-video-list@1.0.0 create /Users/emmett/dev/serverless-book-app/get-video-list
> ~/Library/Python/2.7/bin/aws lambda create-function --function-name get-video-list --handler index.handler --memory-size 128 --runtime nodejs4.3 --role arn:aws:iam::644843699445:role/lambda-s3-execution-role --timeout 3 --publish --zip-file fileb://Lambda-Deployment.zip


An error occurred (AccessDeniedException) when calling the CreateFunction operation: User: arn:aws:iam::644843699445:user/lambda-upload is not authorized to perform: iamsmilieassRole on resource: arn:aws:iam::644843699445:role/lambda-s3-execution-role
403987 (1) [Avatar] Offline
#2
You probably need to give permission to pass the IAM role. Try adding the following below the part of the policy that allows the user to create a Lambda function:

{
"Sid": "Something-ID",
"Effect": "Allow",
"Action": [
"iamsmilieassRole"
],
"Resource": "arn:aws:iam::YOUR-ACCOUNT:role/lambda-s3-execution-role"
}