By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS CodeStar

Sort by most recent
  • 1
  • 2
  • 12 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

AWS CodePipeline throwing error "Missing required parameter in pipeline.stages[0]: "name""

I am trying to create a CICD of my application that is available on Bitbucket. For this, I have created AWS CodePipeline that will deploy this app to ECS Cluster. I am trying to do this via AWS CLI. Here is my JSON file: ``` { "pipeline": { "roleArn": "arn:aws:iam::xxxxxxxxxxxx:role/service-role/AWSCodePipelineServiceRole-us-east-1-HubspotConnector", "stages": [{ "Name": "Source", "Actions": [{ "InputArtifacts": [], "ActionTypeId": { "Version": "1", "Owner": "AWS", "Category": "Source", "Provider": " " }, "OutputArtifacts": [{ "Name": "SourceArtifact" }], "RunOrder": 1, "Configuration": { "ConnectionArn": "arn:aws:codestar-connections:us-east-1:7xxxxxxxx3930:connection/5bxxxx2-257f-4xxxxx0-xxx3-edfdsfsdf7d672f", "FullRepositoryId": "rxxxxxh/hubspotcctorpipeline", "BranchName": "main", "OutputArtifactFormat": "CODE_ZIP" }, "Name": "ApplicationSource" }] }, { "name": "Build", "actions": [{ "inputArtifacts": [{ "name": "SourceArtifact" }], "name": "Build", "actionTypeId": { "category": "Build", "owner": "AWS", "version": "1", "provider": "CodeBuild" }, "outputArtifacts": [{ "name": "default" }], "Configuration": { "ProjectName": "cicdCli" }, "runOrder": 1 }] }, { "Name": "DeployECS", "ActionTypeId": { "Category": "Deploy", "Owner": "AWS", "Provider": "ECS", "Version": "1" }, "RunOrder": 2, "Configuration": { "ClusterName": "my-ecs-cluster", "ServiceName": "sample-app-service", "FileName": "imagedefinitions.json", "DeploymentTimeout": "15" }, "OutputArtifacts": [], "InputArtifacts": [{ "Name": "my-image" }] } ], "artifactStore": { "type": "S3", "location": "codepipeline-us-east-1-1xxx5xxxx29" }, "name": "newPipelineCicd", "version": 1 } } ``` Here is the error I am facing: ![Error](/media/postImages/original/IMevKWkplzTF6rf1ySM-KXmg) Can Someone describe me what I am doing wrong? I have searched for these errors but didn't get any help from anywhere. Also no one have written any tutorial or proper guide for this. I have found AWS documentation, one of the complexest documentations. Please guide me here.I would really appreciate that.
1
answers
0
votes
28
views
asked 12 days ago

Unable to Add CodeStarNotification to CodePipeline with properly configured SNS access policy

Currently facing an issue with creating a notification rule for code pipeline using CDK with Pipeline or CodePipeline constructs ``` Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications::NotificationRule" (RequestToken: <GUID>, HandlerErrorCode: InvalidRequest) ``` The topic and chatbot are already defined in a different stack. The topic already has configured an access policy. However when I attempt to create a rule for my pipelines, it fails. Every time. ``` { "Version": "2008-10-17", "Statement": [ { "Sid": "AWSCodeStarNotifications_publish", "Effect": "Allow", "Principal": { "Service": "codestar-notifications.amazonaws.com" }, "Action": "SNS:Publish", "Resource": "arn:aws:sns:us-east-1:123456789:PipelineNotifications" } ] } ``` Referencing topic: ``` const pipelineNotificationsTopic = sns.Topic.fromTopicArn( this, "PipelineNotifications", `arn:aws:sns:${props?.env.region}:${props?.env.account}:PipelineNotifications ` ); ``` Pipeline code: ``` this.pipeline = new Pipeline( this, `${props?.appName}-MyPipeline`, { pipelineName: "MyPipeline", crossAccountKeys: true, restartExecutionOnUpdate: true, } ); const rule = this.pipeline.notifyOn( "CodeStarRule", pipelineNotificationsTopic, { events: [ PipelineNotificationEvents.PIPELINE_EXECUTION_SUCCEEDED, PipelineNotificationEvents.PIPELINE_EXECUTION_FAILED, PipelineNotificationEvents.ACTION_EXECUTION_FAILED, ], detailType: DetailType.FULL, } ); ``` or ``` this.pipeline = new Pipeline( this, `${props?.appName}-MyPipeline`, { pipelineName: "MyPipeline", crossAccountKeys: true, restartExecutionOnUpdate: true, } ); const rule =new NotificationRule(this, "Notification", { detailType: DetailType.FULL, events: [ "codepipeline-pipeline-pipeline-execution-failed", "codepipeline-pipeline-action-execution-failed", "codepipeline-pipeline-stage-execution-failed", "codepipeline-pipeline-manual-approval-failed", "codepipeline-pipeline-manual-approval-needed", ], source: pipeline, targets: [pipelineNotificationsTopic], }); ```
0
answers
0
votes
30
views
asked 2 months ago

codebuild not pulling bitbucket lfs large files

I am running codepipeline with codebuild, I can pull the repo, however, I cannot pull the LFS large files. I have followed various guides on the internet, but have come to realize that codestar is not trying to connect to bitbucket LFS. In the bitbucket history I see the regular clone request but do not see the git lfs request. Codestar seems to be acting as a proxy I am enclosing my buildpec.yml and some logs. It fails at line `git lfs pull` ``` phases: install: commands: - cd /tmp/ - curl -OJL https://github.com/git-lfs/git-lfs/releases/download/v2.13.3/git-lfs-linux-amd64-v2.13.3.tar.gz - tar xzf git-lfs-linux-amd64-v2.13.3.tar.gz - ./install.sh - cd $CODEBUILD_SRC_DIR - git lfs pull build: commands: - echo Build started on `date` - echo Building the Docker image... - docker build -f ci/Dockerfile -t system1.datagen.tech:5000/dg-simulated-reality-ecr:teststeve . post_build: commands: - echo Build completed on `date` - echo Pushing the Docker images... - docker push system1.datagen.tech:5000/dg-simulated-reality-ecr:teststeve - echo Writing image definitions file... ``` aws logs ``` [Container] 2021/12/28 14:06:47 Running command git lfs pull batch response: Authorization error: https://codestar-connections.us-east-1.amazonaws.com/git-http/ACCOUNTNUMBER/us-east-1/ARNSTUFF/MYCOMPANY/MYREPO.git/info/lfs/objects/batch Check that you have proper access to the repository ........ [Container] 2021/12/28 14:06:47 Command did not exit successfully git lfs pull exit status 2 [Container] 2021/12/28 14:06:47 Phase complete: INSTALL State: FAILED [Container] 2021/12/28 14:06:47 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: git lfs pull. Reason: exit status 2 ```
0
answers
0
votes
30
views
asked 9 months ago
1
answers
0
votes
167
views
asked 4 years ago
  • 1
  • 2
  • 12 / page