SAM deploy error - Template format error: Unrecognized resource types: [AWS::Athena::NamedQuery]

0

I am trying to deploy updates to an existing SAM template and receiving the following error in us-east-1 -

An error occurred (ValidationError) when calling the GetTemplateSummary operation: Template format error: Unrecognized resource types: [AWS::Athena::NamedQuery]

I have removed NamedQuery resources in the updated template that I am trying to deploy. I don't know why SAM still thinks the resources are still there in the template.

I have never seen this error and searching for information about it does not return any meaningful results. If anyone here has faced this issue, I would really appreciate some guidance to resolve this. Thanks!

posta 2 anni fa802 visualizzazioni
2 Risposte
0

As you mentioned you're deploying the Stack in us-east-1, this would rule out the AWS::Athena::NamedQuery resource not being supported.

Seems to be on the GetTemplateSummary API which is called as part of aws cloudformation deploy and also sam deploy.

  • Was the AWS::Athena::NamedQuery resource previously in the template as part of a condition that did not actually create the resource?

If so, did a subsequent update to the stack fail causing it to rollback?

Performing an update operation directly on the Stack via CloudFormation, for example, adding a WaitConditionHandle and removing it in a subsequent update should allow you to proceed.

con risposta 2 anni fa
  • Yes, the NamedQuery was a conditional resource previously.

  • Interesting, a successful update of your Stack manually (by adding any resource) should bring the template into a consistent state that will pass the GetTemplateSummary and subsequently your sam deploy

  • Adding a WaitConditionHandle, updating the stack and then removing it seems to have done the trick. Thanks for the suggestion @dylanredm0nd!

0

Did you do a

sam package

after you removed the NamedQuery resource?

Kishan
con risposta 2 anni fa
  • Yes, I do a sam package before the deploy. But I have tried sam deploy right after sam build and that returns the same error.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande