Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourceConflictException: Function already exist #182

Closed
jugaltheshah opened this issue Feb 8, 2017 · 9 comments
Closed

ResourceConflictException: Function already exist #182

jugaltheshah opened this issue Feb 8, 2017 · 9 comments
Labels

Comments

@jugaltheshah
Copy link

I get this error when I try to deploy a function that I've previously deployed. Of course I can delete the function from Lambda manually and deploy, but that kind of feels like it's defeating the purpose (creating an easier deployment process). Am I missing something?

Possibly relates to and would be solved by issue #49, but not sure.

@DeviaVir
Copy link
Collaborator

DeviaVir commented Feb 9, 2017

hi @jugaltheshah, there is a fair bit of logic for checking if a function already exists and this has for sure worked in the past:
https:/motdotla/node-lambda/blob/master/lib/main.js#L517
I have not tried it recently but it might be a change on AWS API's that is messing this up.

@aohrvall
Copy link

Check the permissions of the user that you use to upload the function. Something like this did the trick for me, even if it might be a bit permissible.

    {
        "Sid": "CreateFunctionPermissions",
        "Effect": "Allow",
        "Action": [
            "lambda:*"
        ],
        "Resource": "*"
    },

@DeviaVir DeviaVir removed the bug label Mar 29, 2017
@DeviaVir
Copy link
Collaborator

Is this still an active problem?

@jugaltheshah
Copy link
Author

Sorry I have not had occasion to use Lambda recently. Will check and report back, hopefully within the next 12 hours.

@tyshcr
Copy link

tyshcr commented Apr 14, 2017

I was getting the same error. When I added @aohrvall 's suggested IAM Policy, I was able to overwrite existing Lambdas.

Here is the Policy I created:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "CreateFunctionPermissions",
            "Effect": "Allow",
            "Action": [
                "lambda:*"
            ],
            "Resource": "*"
        }
    ]
}

@luillyfe
Copy link

luillyfe commented May 19, 2017

Hi there,
I am stucked in that. I tried the polices you mentioned above but still not working !

@tyshcr
Copy link

tyshcr commented Feb 8, 2018

I also got a ResourceConflictException when I had an invalid value in .env for the AWS_VPC_SUBNETS, despite the fact that my terminal output was saying message: Function already exists

I tried changing my AWS_FUNCTION_NAME in .env and got the terminal to say The subnet ID subnet-XXXXX does not exist' ... at which point I re-checked my subnets and found an error.

@AmirSasson
Copy link

AmirSasson commented Jul 13, 2018

i am getting the same error, when specifying subnet and security group.
double checked , all seems to be configured right.
lambda deployment updates work, when not specifying subnets.
any clue? i am lost here...

@teebu
Copy link

teebu commented Jul 25, 2018

I'm getting ResourceConflictException: Function already exist: error as well. It turned out to be a permission error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants