aws-sdk/client-amplify createAppCommand method is creating the file but not automatically building it. #4512
Unanswered
saimarshadsaim31
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to create and deploy a Next js app using aws-sdk/client-amplify. I am using createAppCommand method to create an app. The thing is my app is being created but it does not build and deploy automatically. Also, I am not able to see the build settings of my app it shows
Please reload this page to continue Sorry, we can't render this page. We'll review the cause and continue to improve your console experience.
Also, it is not showing Framework, service role, and other things in the general tab in my console.
here is the code of how I am using the createAppCommand function:
`const config = {
region: process.env.AWS_REGION, // Your AWS region
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID, // Your AWS access key ID
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, // Your AWS secret access key
},
}
const amplifyClient = new AmplifyClient(config)
here is the response I get when create the app
{ '$metadata': { httpStatusCode: 200, requestId: 'reqId here', extendedRequestId: undefined, cfId: 'cfid here, attempts: 1, totalRetryDelay: 0 }, app: { appArn: 'appArnId here', appId: 'appId here', autoBranchCreationConfig: { buildSpec: 'version: 1\r\n' + 'frontend:\r\n' + ' phases:\r\n' + ' preBuild:\r\n' + ' commands:\r\n' + ' - npm install\r\n' + ' build:\r\n' + ' commands:\r\n' + ' - npm run build\r\n' + ' artifacts:\r\n' + ' baseDirectory: .next\r\n' + ' files:\r\n' + " - '**/*'\r\n" + ' cache:\r\n' + ' paths:\r\n' + ' - node_modules/**/*\r\n', enableAutoBuild: true, enableBasicAuth: false, enablePullRequestPreview: false, environmentVariables: [Object], framework: 'Next.js - SSR', stage: 'PRODUCTION' }, autoBranchCreationPatterns: [ '*/**', '*' ], buildSpec: 'version: 1\r\n' + 'frontend:\r\n' + ' phases:\r\n' + ' preBuild:\r\n' + ' commands:\r\n' + ' - npm install\r\n' + ' build:\r\n' + ' commands:\r\n' + ' - npm run build\r\n' + ' artifacts:\r\n' + ' baseDirectory: .next\r\n' + ' files:\r\n' + " - '**/*'\r\n" + ' cache:\r\n' + ' paths:\r\n' + ' - node_modules/**/*\r\n', createTime: 2023-10-24T10:56:48.433Z, customHeaders: '', customRules: [ [Object] ], defaultDomain: 'domain here', enableAutoBranchCreation: true, enableBasicAuth: false, enableBranchAutoBuild: true, enableBranchAutoDeletion: false, environmentVariables: { NEXT_PUBLIC_STRAPI_API_BASE_URL: 'env value', NEXT_PUBLIC_STRAPI_TOKEN: 'env value', NEXT_PUBLIC_STRAPI_URL: 'env value' }, name: 'news', platform: 'WEB_COMPUTE', repository: 'https://github.com/saimarshadsaim31/newTemplate', repositoryCloneMethod: 'SSH', updateTime: 2023-10-24T10:56:48.433Z } }
Beta Was this translation helpful? Give feedback.
All reactions