New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when amplify push with custome category (AWS CodeBuild) #5683
Comments
@tmizuma I looked at the CodeBuild CloudFormation documentation (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-pattern) and I believe there is an issue with the YML tied to your FilterGroups resource which you've mentioned above. The FilterGroups ClodFormation resource should like the following: AmplifyCodeBuild:
Type: 'AWS::CodeBuild::Project'
Properties:
Artifacts:
Type: NO_ARTIFACTS
Triggers:
Webhook: true
**FilterGroups:
- Pattern: PUSH
Type: EVENT
- Pattern: ^refs/heads/develop$
Type: HEAD_REF**
One quick tip when designing custom cloudFormation stacks is to use the CloudFormation designer to find out formatting issues like these upfront - https://console.aws.amazon.com/cloudformation/designer/home?region=us-east-1 |
Closing this issue based on my recommendation above. I was able to deploy the CloudFormation template with the above changes. Please let me know if you're still not able to deploy. |
Thanks for the answer. FilterGroups:
- - Type: EVENT
Pattern: PUSH
- Type: HEAD_REF
Pattern: ^refs/heads/develop$ CloudFormation designer doesn't show any errors. I could deploy with Management Console. I couldn't deploy with amplify cli only. ✖ An error occurred when pushing the resources to the cloud
Cannot read property 'Pattern' of undefined
An error occurred during the push operation: Cannot read property 'Pattern' of undefined |
@tmizuma Could you give more details about your use case? I see that you're trying to create a "Custom Category" here but why do you need CodeBuild for SSR? Is this for a container deployment or something else? Can you give more details about what you're trying to accomplish? |
@undefobj |
@tmizuma what piece of deployment are you doing here? Will your backend be running on Lambda? Can you clarify a bit what is running in CodeBuild? |
@undefobj https://aws.amazon.com/jp/blogs/mobile/ssr-support-for-aws-amplify-javascript-libraries/ We can deploy to CloudFront and Lambda@Edge with the |
Ok understood. This might be a bit out of our scope right now as we don't have customers combining frameworks with Amplify and serverless. It might be more difficult in your workflow and automating it all in Amplify or serverless is a better bet. |
I believe that if we can resolve the CloudFromation errors I mentioned above, automation with CodeBuild can be achieved. The problem here is that I get an error when I write the following yml and issue # Adding the following configuration template.yml causes an error.
FilterGroups:
- - Type: EVENT
Pattern: PUSH
- Type: HEAD_REF
Pattern: ^refs/heads/develop$ ↓ I get an error when issue Invalid CloudFormation template: /home/ec2-user/environment/amplify-nextjs-ssr/amplify/backend/codebuild/amplifycodebuild/template.yaml
✖ An error occurred when pushing the resources to the cloud
Cannot read property '0' of undefined
An error occurred during the push operation: Cannot read property '0' of undefined |
@tmizuma Were you able to resolve this issue? |
Closing due to lack of response and further communication. |
@kaustavghosh06 |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
I try to create AWS CodeBuild by custome category in order to deploy Server Side Rendering application with Amplify Library when git push.
I faced the error when issue
amplify push
.Describe the bug
A clear and concise description of what the bug is.
template.yml is below.
When I remove below settings, I can deploy correctly.
Amplify CLI Version
You can use
amplify -v
to check the amplify cli version on your systemTo Reproduce
Steps to reproduce the behavior or terminal output if applicable
Expected behavior
A clear and concise description of what you expected to happen.
I expected to create CodeBuild which starts build when I issue
git push
command with specified branch.Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
node -v
to check the node version on your systemOS: AWS Cloud9 (Amazon Linux 2)
node version: v10.22.1
Additional context
Amplify Console can't be used Server Side Rendering deployment, so I tried to create CI/CD pipeliine with AWS CodeBuild.
aws-amplify/amplify-hosting#412
The text was updated successfully, but these errors were encountered: