aws-codepipeline

CodePipeline buildspec and multiple build actions

夙愿已清 提交于 2020-01-25 08:00:40
问题 A simple buildspec like: version: 0.2 phases: install: commands: - (cd lambda/src; npm install) - aws cloudformation package --template-file lambda/sam.yml --s3-bucket skynet-lambda --output-template-file SkynetLambdaPackaged.yml artifacts: type: zip files: - SkynetLambdaPackaged.yml Works fine when I have one action in my build stage. But what if I want to have more build actions for example: I want to build my api server and frontend files in parallel. How do I model this? UPDATE In

Errors on using CodeBuild for first time

别来无恙 提交于 2020-01-25 05:16:05
问题 When starting a code build as part of a simple code pipeline, I get the following error within a few seconds. Action execution failed Error calling startBuild: Cannot have more than 0 builds in queue for the account (Service: AWSCodeBuild; Status Code: 400; Error Code: AccountLimitExceededException; Request ID: 80bfxxxxx I have used the AWS Code pipeline wizard to create a simple build and deploy process, so I assume a misconfiguration did this. My question is what is the queue it refers to?

How to retrieve Secret Manager data in buildspec.yaml

坚强是说给别人听的谎言 提交于 2020-01-23 12:51:57
问题 Im working on creating the CodeBuild which is integrated with SonarQube, So I pass values and sonar credentials directly in my Buildspec.yaml Instead of Hardcoding directly, I tried to retrieve using the below command from SecretManager as it is mentioned in the below link. But it is not getting the correct values. it throws an error. Command : '{{resolve:secretsmanager:MyRDSSecret:SecretString:username}}' Link : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic

AWS CodePipeline error: Cross-account pass role is not allowed

假装没事ソ 提交于 2020-01-23 03:19:06
问题 I am trying to create an AWS CodePipeline that deploys the production code to a separate account. The code consists of a lambda function which is setup using a sam template and cloudformation. I have it currently deploying to the same account without error. I added another stage that has a manual approval action and after approval it should deploy to the other account. It fails with the following error: Cross-account pass role is not allowed (Service: AmazonCloudFormation; Status Code: 403;

Getting “Unable to recognize \”hello-k8s.yml\“: Unauthorized” error when running kubectl apply -f hello-k8s.yml in CodeBuild phase

戏子无情 提交于 2020-01-22 02:30:08
问题 I am new to Kubernetes and trying to create a AWS CodePipeline to deploy service to EKS stack. I am following this tutorial I have followed all the steps including creating a role and adding permissions, so that CodeBuild will be able to talk with EKS. The issue I am facing right now is when CodePipeline runs, it is failing for below command in the CodeBuild phase. kubectl apply -f hello-k8s.yml and giving this error [Container] 2019/12/04 07:41:43 Running command kubectl apply -f hello-k8s

Is it possible to use AWS CodePipeline with Lightsail?

旧时模样 提交于 2020-01-14 08:36:09
问题 I'm working all the day and couldn't find the answer. So I'm asking you guys: is it possible to use AWS Pipeline with AWS Lightsail? My objective is to store the code inside CodeCommit and use CodeBuild, CodeDeploy, CodePipeline and S3 to create a Continuous Deployment inside a Lightsail instance. Those are the steps I think I have to follow to accomplish the task: [x] setup a Lightsail instance [x] create an IAM user and set permissions [x] transfer my repository to CodeCommit [x] create an

AWS Codebuild fails while downloading source. Message: Access Denied

 ̄綄美尐妖づ 提交于 2020-01-14 07:25:07
问题 I created a CodeBuild Project that uses a docker image for node8. The purpose of this CodeBuild project is to do unit testing. It takes an input artifact from CodeCommit. And in the buildspec.yml it runs a test command. This is my (simple) buildspec file: version: 0.2 phases: install: commands: - echo "install phase started" - npm install - echo "install phase ended" pre_build: commands: - echo "pre_build aka test phase started" - echo "mocha unit test" - npm test - echo "mocha unit test

CodePipeline: CodeDeploy reports “BundleType must be either YAML or JSON”

此生再无相见时 提交于 2020-01-12 09:31:24
问题 buildspec.yml: version: 0.2 phases: build: commands: - echo Build started on `date` - echo Compiling the Python code... - python HelloWorld_tst.py post_build: commands: - echo Build completed on `date` artifacts: files: - HelloWorld.py - appspec.yml discard-paths: yes appspec.yml version: 0.0 Resources: - autovisionfunction: Type: AWS::Lambda::Function Properties: Name: "autovisionfunction" Alias: "staging" CurrentVersion: "1" TargetVersion: "2" Seems while in CodePipeline can't find appspec

CodePipeline: CodeDeploy reports “BundleType must be either YAML or JSON”

我是研究僧i 提交于 2020-01-12 09:29:02
问题 buildspec.yml: version: 0.2 phases: build: commands: - echo Build started on `date` - echo Compiling the Python code... - python HelloWorld_tst.py post_build: commands: - echo Build completed on `date` artifacts: files: - HelloWorld.py - appspec.yml discard-paths: yes appspec.yml version: 0.0 Resources: - autovisionfunction: Type: AWS::Lambda::Function Properties: Name: "autovisionfunction" Alias: "staging" CurrentVersion: "1" TargetVersion: "2" Seems while in CodePipeline can't find appspec

AWS codebuild fails cant download source when initiated from codepipeline

拟墨画扇 提交于 2020-01-02 06:13:13
问题 I have a an AWS codebuild job that works fine when I initate manually as a root user. I have a codepipe line that should initiate the build job when codecommit merges into master. It fires the job and the build start but it fails when trying to download source. Ive attached full S3/codebuild/codecommit policies to the pipeline, but it still throws access denied. Which permissions am I missing? 回答1: This generally happens when you have a CodeBuild project already and you integrate it to the