question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Role with name [my name]-executor already exists" on error

See original GitHub issue

I ran:

claudia create --name storingInDynamo --region us-west-2 --api-module index

but forgot the files property. That trigger an excellent error message: package.json does not contain the files property

Great - but when I fixed that and ran the create-command again:

{ [EntityAlreadyExists: Role with name storingInDynamo-executor already exists.]
  cause: 
   { [EntityAlreadyExists: Role with name storingInDynamo-executor already exists.]
     message: 'Role with name storingInDynamo-executor already exists.',
     code: 'EntityAlreadyExists',
     time: Fri Feb 26 2016 14:24:46 GMT+0100 (CET),
     requestId: '4df7b6fb-dc8c-11e5-9b40-35d169b930d8',
     statusCode: 409,
     retryable: false,
     retryDelay: 72.52002414315939 },
  isOperational: true,
  code: 'EntityAlreadyExists',
  time: Fri Feb 26 2016 14:24:46 GMT+0100 (CET),
  requestId: '4df7b6fb-dc8c-11e5-9b40-35d169b930d8',
  statusCode: 409,
  retryable: false,
  retryDelay: 72.52002414315939 }

And now I don’t know how to fix this, except updating the name of the function (--name)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
thom-niccommented, Feb 21, 2017

Did this cleanup function ever get implemented? calling aws iam delete-role is not so simple because you have to delete the inline log-writer policy first. So it seems you have to do

EDIT when I deleted the role but not the function, it created the role then failed to create the function, so I deleted the function but then when I ran create it failed because the role already exists… again.

So all steps:

aws iam delete-role-policy --role-name my-function-executor --policy-name log-writer
aws iam delete-role --role-name my-function-executor
aws lambda delete-function --function-name my-function

EDIT 2: I’ll mention I got into this situation because I changed my module entry point name from index.js to build/app.js (I started using babel precompilation.) I updated claudia.json but error messages seemed to indicate something was still attempting to import the old index.js so I deleted claudia.json and realized I had to delete the old lambda & role before it could create a new one with the same name.

0reactions
alpha-beta-soupcommented, Jun 23, 2019

Hmm, deleting the role in IAM doesn’t seem to be sufficient — I still get the error after doing so. Using the CLI has the same outcome. Is there something else that needs deleting? aws iam list-roles verifies that the role doesn’t exist.

I think these issues are the same or very similar:

Read more comments on GitHub >

github_iconTop Results From Across the Web

EntityAlreadyExists: Role with name chatbot-andrea-executor ...
I wanted to create a telegram bot and that's why the issue happened. Then, I used update rather than create like: claudia update...
Read more >
Troubleshoot the IAM "entity already exists" error for MFA - AWS
This error occurs because an MFA device was created but wasn't enabled for use with any IAM users. Resolution. First, deactivate the MFA...
Read more >
EKS K8S Role Mapping Module - Gruntwork
This Module only manages the mapping between IAM roles and Kubernetes RBAC ... We will assume that the IAM roles already exist (named...
Read more >
MooseApp Class Reference - MOOSE framework
Set a flag so that the parser will either warn or error when unused ... 1206 mooseError("an executor with name '", executor->name(), "'...
Read more >
6.5 HF1 - Data Vault Message Reference
authorization name that already exists in the current database. ... An internal error occurred: A function in the query could not be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found