JetBrains / kotless

Kotlin Serverless Framework
Apache License 2.0
1.15k stars 57 forks source link

Error creating IAM Role kotless-static-role while deploying two lambdas in the same region result #76

Open matthewbartos opened 3 years ago

matthewbartos commented 3 years ago

While my first Kotless lambda is running happily in the eu-central-1 zone, I wanted to deploy a second application as lambda in the same zone.

Different bucket, different name, same zone.

Error log while deploying:

aws_api_gateway_deployment.root: Creation complete after 1s [id=ywczmf]

Error: Error creating IAM Role kotless-static-role: EntityAlreadyExists: Role with name kotless-static-role already exists.
        status code: 409, request id: 6c2f64fc-919c-458b-3434-a234d5d9a1bb

  on myapp.tf line 103, in resource "aws_iam_role" "kotless_static_role":
 103: resource "aws_iam_role" "kotless_static_role" {

Line 103 in myapp.tf is:

resource "aws_iam_role" "kotless_static_role" {
  name = "kotless-static-role"
  assume_role_policy = data.aws_iam_policy_document.kotless_static_assume.json
}
matthewbartos commented 3 years ago

Kotless version: 0.1.7-beta-4 🙂