Aws_route53_record: Error Building Changeset

When Im trying to deploy my code, I’m getting this error: Creating…
[ERR]: Error building changeset: InvalidChangeBatch: [Tried to create resource record set [name=‘MYNAME’, type=‘MYTYPE’] but it already exists]
status code: 400, request id: XXXXXXXXXX
When I inspect the stack, it seems empty, so I’m not able to delete the stack? Could anyone help with this, I’m a newcomer to terraform. Thanks in advance!

What are you meaning by “the stack”?

That error means that you are trying to create a record in a Route53 zone but one with the same name already exists.

You need to either delete the existing record or use terraform import to add it to the state file.

1 Like

Hi thanks for your response, it turns out to be route53 issue, and I deleted that record on their console and I was able to make it work. Thanks for getting back to me !