Open biloshkurskyi-ss opened 9 months ago
Hi @biloshkurskyi-ss, I am unable to replicate the issue on my end with the same CLI version 12.10.1
. When I add searchable to a model and deploy, I'm able to deploy a cluster with t2.small.search
instance type.
Can you check your amplify/team-provider-info.json
file and see if you have any overrides for instance type setup in your project? Doc link
Hello @phani-srikar,
Thank you for checking on your end.
Today I have tried to do a push and it still doesn't work.
Deployment failed.
api-app-name AWS::CloudFormation::Stack UPDATE_FAILED
SearchableStack AWS::CloudFormation::Stack CREATE_FAILED
I've reviewed the app settings in the team-provider-info.json
file and noticed that the OpenSearchInstanceType
parameter is missing. I was under the impression that it would be automatically added after implementing @searchable
.
dev": {
"awscloudformation": {
"AuthRoleName": "amplify-app-name-xxxx-dev-xxxxxxx-authRole",
"UnauthRoleArn": "arn:aws:iam::XXXXXXXXXX:role/amplify-app-name-xxxx-dev-xxxxxxx-unauthRole",
"AuthRoleArn": "arn:aws:iam::XXXXXXXXXX:role/amplify-app-name-xxxx-dev-xxxxxxx-authRole",
"Region": "xx-xxxx-x",
"DeploymentBucketName": "amplify-app-name-xxxx-dev-xxxxxxx-deployment",
"UnauthRoleName": "amplify-app-name-xxxx-dev-xxxxxxx-unauthRole",
"StackName": "amplify-app-name-xxxx-dev-xxxxxxx",
"StackId": "arn:aws:cloudformation:xx-xxxx-x:XXXXXXXXXX:stack/amplify-app-name-xxxx-dev-xxxxxxx/xxxxx-xxxxx-xxxxx",
"AmplifyAppId": "xxxxxxxxxx"
},
"categories": {
"auth": {
"app-name-xxxx": {}
},
"api": {
"app-name-xxxx": {}
},
"storage": {
"s3app-name-xxxxstoragexxxxxxx": {}
}
}
}
What additional information or settings would be helpful for you to investigate this issue further?
Also, could you please check if the system logs have been shared? If they haven't been exported, could you guide me on how to do so? I assumed they would be automatically transferred with the Session Identifier
or a similar method. Is there a way for me to manually push these logs?
The latest logs:
🛑 The following resources failed to deploy:
Resource Name: OpenSearchDomain (AWS::Elasticsearch::Domain)
Event Type: create
Reason: Invalid instance type: t2.small.elasticsearch (Service: AWSElasticsearch; Status Code: 409; Error Code: InvalidTypeException; Request ID: 7d16c53d-2458-49cb-8541-eb9b4e0637bf; Proxy: null)
🛑 Resource is not in the state stackUpdateComplete
Name: OpenSearchDomain (AWS::Elasticsearch::Domain), Event Type: create, Reason: Invalid instance type: t2.small.elasticsearch (Service: AWSElasticsearch; Status Code: 409; Error Code: InvalidTypeException; Request ID: 7d16c53d-2458-49cb-8541-eb9b4e0637bf; Proxy: null), IsCustomResource: false
Session Identifier: a18a3328-116e-4f25-9f64-3af675f66339
Hey @biloshkurskyi-ss, Thank you for checking and providing the team-provider-info file. Can you please confirm the region where you are deploying this app?
Hello @AnilMaktala the eu-north-1
region is used.
Hey @biloshkurskyi-ss, Appreciate your confirmation regarding the region. We've successfully replicated this issue in the 'eu-north-1' region, so we're flagging it as a bug for the team to investigate further.
@biloshkurskyi-ss, As a workaround, you can perform the following steps to switch the search instance type to t3.small.elasticsearch
and inform us if it resolves your issue.
amplify override api
.\amplify\backend\api\<api name>\override.ts
.
import { AmplifyApiGraphQlResourceStackTemplate, AmplifyProjectInfo } from '@aws-amplify/cli-extensibility-helper';
export function override(resources: AmplifyApiGraphQlResourceStackTemplate, amplifyProjectInfo: AmplifyProjectInfo) { resources.opensearch.OpenSearchDomain.elasticsearchClusterConfig = { ...resources.opensearch.OpenSearchDomain.elasticsearchClusterConfig, instanceType: "t3.small.elasticsearch", };
}
Hello @AnilMaktala the workaround is working in dev and prod environments. Thanks for your help! 🤝
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v21.6.1
Amplify CLI Version
12.10.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Do not remember exactly. Note: The environment was cloned from another one. No something special
Describe the bug
have a type Recorder @model @auth(rules: [...]) { { id: ID! firstName: String ... }
Add @searchable to it like: type Recorder @model @searchable ...
Expected behavior
@searchable should be added to the model
Reproduction steps
amplify push
Project Identifier
26019afdc69d49143fe99441bf73b9d3
Log output
Additional information
Checked on the little bit older amplify and node.js version after that do updated it to the latest and the issue is still the same.
Before submitting, please confirm: