I am trying to communicate/deply aws lambda via pulumi by following node code on url https://pulumi.io/quickstart/aws/tutorial-rest-api.html
and additionally I login to aws from cmd, also my user have full rights for lambda. But it is giving below error:
aws:lambda:Function (hello66382ec5):
error: Plan apply failed: Error creating Lambda function: AccessDeniedException: Cross-account pass role is not allowed.
status code: 403, request id: 882ffd22-38ab-11e9-b66c-07979886e804
aws:iam:RolePolicyAttachment (hello4c238266):
error: Plan apply failed: Error attaching policy arn:aws:iam::aws:policy/AmazonS3FullAccess to IAM Role hello4c238266-531ff17: NoSuchEntity: The role with name hello4c238266-531ff17 cannot be found.
status code: 404, request id: 8845a738-38ab-11e9-ae34-1b91e3cf7465
aws:iam:RolePolicyAttachment (hello66382ec5-32be53a2):
error: Plan apply failed: Error attaching policy arn:aws:iam::aws:policy/AWSLambdaFullAccess to IAM Role hello66382ec5-b302f63: NoSuchEntity: The role with name hello66382ec5-b302f63 cannot be found.
status code: 404, request id: 881262ee-38ab-11e9-b9bc-f57a45e4467f
kindly help
w
white-balloon-205
02/25/2019, 4:39 AM
It sounds like some of your resources were deployed in a different region or account than others.
Did you perhaps change the region/account after partially deploying this, and then retried doing the deployment?
g
gray-greece-11354
02/25/2019, 4:56 AM
do user also have any region?
I am trying to deploy on us-west-2 for pulumi with aws
w
white-balloon-205
02/25/2019, 4:58 AM
No - users don't have a region - it should be base on what you set for
pulumi config set aws:region ...
g
gray-greece-11354
02/25/2019, 4:59 AM
I tried to set as per your advice
pulumi config set --plaintext aws:region us-west-2