Amplify-cli: CloudFormation stack fails to create with error

Created on 9 Dec 2018  路  11Comments  路  Source: aws-amplify/amplify-cli

Describe the bug
Cloudformation stack fails to create with error:

[ElasticSearchStreamingLambdaCodeS3Bucket, ElasticSearchStreamingLambdaCodeS3Key] do not exist in the template

To Reproduce
Steps to reproduce the behavior:

Setup an environment
Have @searchable directive fail based on aws-amplify/amplify-cli#566
Remove @searchable directive for the time being and try again
Try to deploy again and get the above error
Expected behavior
I've remove all references to @searchable so I'm not sure that any references to ElasticSearch or ElasticSearch buckets should exist.

Versions:
amplify-cli - 0.2.1-multienv.7

investigating

Most helpful comment

@kaustavghosh06 Can we please re-open this issue? This has occurred again.

After encountering https://github.com/aws-amplify/amplify-cli/issues/631, I tried to back out my change to the schema. I was not able to and got the same error as above.

@mikeparisstuff I did see the keys in the parameters.json file and tried removing them. Running amplify push puts them back in, and then the push then fails for the same reason. There doesn't appear to be a way to undo this change. Please advise.

All 11 comments

Update: Created a new environment to test out if a previous failure matters, and it appears to fail no matter what with this same error. I'm not sure what would cause this.

Thanks for reporting this. If you have removed the @searchable directive then it should remove all dependencies on ES. Can you do me a favor and check the parameters.json file in your amplify/backend/api/[project] directory? Does that file contain a value for "ElasticSearchStreamingLambdaCodeS3Key" or "ElasticSearchStreamingLambdaCodeS3Bucket"? If so try removing them and pushing again. If you don't see those values in the params file please let me know as well.

I was at a point where I could re-create the project from scratch, so I did that to solve my issue.

Before I did that, I did look for those keys and do remember seeing them in the parameters json file. I thought later to remove them, but have since updated the project. I do believe that to be the source of the problem. If I can, I will try to re-create and confirm.

Thanks @mwarger.

Thanks a lot @mikeparisstuff !!
I have to mention though. While making a push, parameters.json is modified by amplify I guess, so I had to edit this file right before the update to the cloud begins.

Closing this issue. Please feel free to re-opne if the issue persists.

@kaustavghosh06 Can we please re-open this issue? This has occurred again.

After encountering https://github.com/aws-amplify/amplify-cli/issues/631, I tried to back out my change to the schema. I was not able to and got the same error as above.

@mikeparisstuff I did see the keys in the parameters.json file and tried removing them. Running amplify push puts them back in, and then the push then fails for the same reason. There doesn't appear to be a way to undo this change. Please advise.

I was seeing this issue as well, after adding and removing @searchable from my schema. Manually deleting the directory amplify\backend\api\<api_name>\build seems to workaround the issue.

@jesse-bonzo This was able to solve my issue with doing a push. Thanks!

Hey guys, this issue seems to be fixed in the latest version of the CLI. Pleae feel to re-open if you're still seeing this issue.

[ElasticSearchStreamingLambdaCodeS3Bucket, ElasticSearchStreamingLambdaCodeS3Key] do not exist in the template

@kaustavghosh06 I'm getting this error again with the latest version of the CLI. Can we please re-open? This time it doesn't appear to have anything to do with @searchable...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jkeys-ecg-nmsu picture jkeys-ecg-nmsu  路  3Comments

davo301 picture davo301  路  3Comments

adriatikgashi picture adriatikgashi  路  3Comments

amlcodes picture amlcodes  路  3Comments

nason picture nason  路  3Comments