aws-codebuild

AWS CodePipeline: Get CloudFormation outputs in CodeBuild

冷暖自知 提交于 2019-12-11 08:53:30
问题 I'm learning some DevOps techniques using AWS CodePipeline (Cloudformation and CodeBuild). My (simplified) pipeline is this: Push to github repo triggers pipeline CloudFormation builds/updates backend infrastructure CodeBuild does some additional work At the moment, CloudFormation outputs the following: Outputs: RestApiId: Value: !Ref ApiGateway Description: 'API Id' Question: How can I get the ApiGateway ID in CloudBuild? 回答1: According to: https://docs.aws.amazon.com/AWSCloudFormation

How do you handle config files for AWS CodePipelines?

不想你离开。 提交于 2019-12-11 08:07:11
问题 I am on a team of developers using Git as our version control. We want to have a minimum of 3 stages of our development process: staging, dev, and production. The only thing that should change between these stages is a single config file, to tell the Serverless framework what to name the lambda functions, S3 buckets, and any other resource that needs to be created for the CloudFormation stack. However, this makes source control a bit harder. If we put the config files directly in the source

Automating Angular 7 App Deployment with AWS S3 and CodePipeline

谁都会走 提交于 2019-12-11 05:40:01
问题 I have hosted an angular 7 app on AWS S3 bucket as a static website and now want to automate the deployment of newer version when my github repo is updated. I want the files from the newer version to replace the files of the previous version in the s3 bucket. Here's how I am going about it I have a buildspec file version: 0.2 phases: install: commands: # install dependencies - echo Installng source NPM dependencies... - npm install npm@latest -g - npm install -g @angular/cli pre_build:

Installing NLTK/WORDNET on AWS Lambda via CodeBuild

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 02:21:27
问题 I'm trying to get NLTK and Wordnet working on a lambda via CodeBuild. It looks like it installs fine in CloudFormation, but I get the following error in the Lambda: START RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c Version: $LATEST Unable to import module 'index': No module named 'nltk' END RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c REPORT RequestId: c660c446-e1c4-11e8-8047-15f59f1e002c Duration: 2.10 ms Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 21 MB However when

Code Build Access denied while downloading artifact from S3

只愿长相守 提交于 2019-12-11 00:37:45
问题 My CodeBuild is configured with CodePipeline. S3 is my artifact store. I continue to get an Access denied message despite having attached IAM roles with sufficient access. Screenshot of the error message I have already checked the service role associated with Codebuild. It has the following policy attached to it. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Resource": [ "arn:aws:logs:ap-southeast-1:682905754632:log-group:/aws/codebuild/Build", "arn:aws:logs:ap-southeast-1

Building Windows Containers with AWS CodeBuild

左心房为你撑大大i 提交于 2019-12-08 02:49:50
问题 I'm getting started with the CI/CD functionality of AWS. To this point, I have been creating my docker image locally on Windows Server 2016, based on the microsoft/windowsservercore image, and manually pushing it to the ECR (amazon container registry). At this point, I'm not trying to compile the application in CodeBuild. I'm only trying to build the container. Locally, the binaries are in a sub-directory and copied into the container. The CodeBuild project is failing with an error: image

Codepipeline restricting artifact properties in codebuild

半腔热情 提交于 2019-12-08 00:57:27
问题 I had created a codebuild to build my project based on the changes in codecommit. This is the batch-get-projects command details for it { "projects": [ { "name": "MultiRepBuild", "arn": "arn:aws:codebuild:us-east-1:100000xxx0x:project/MultiRepBui ld", "source": { "type": "CODECOMMIT", "location": "https://git-codecommit.us-east-1.amazonaws.com/v1/r epos/PythonRep", "gitCloneDepth": 1, "insecureSsl": false }, "secondarySources": [], "artifacts": { "type": "S3", "location": "testxxxthe

AWS CodeBuild does not work with Yarn Workspaces

本小妞迷上赌 提交于 2019-12-07 14:45:52
问题 I'm using Yarn Workspaces in my repository and also using AWS CodeBuild to build my packages. When build starts, CodeBuild takes 60 seconds to install all packages and I'd want to avoid this time caching node_modules folder. When I add: cache: paths: - 'node_modules/**/*' to my buildspec file and enable LOCAL_CUSTOM_CACHE , I receive this error: error An unexpected error occurred: "EEXIST: file already exists, mkdir '/codebuild/output/src637134264/src/git-codecommit.us-east-2.amazonaws.com/v1

How to add rollback functionality to a basic S3 CodeBuild deploy

此生再无相见时 提交于 2019-12-07 06:45:57
问题 I have followed this instruction to get a very basic ci workflow in aws. It works flawless but I want to have a extra functionality, rollback. First i though it would work "out-of-the-box", but not in my case, if I select the the previous job in CodeBuild that i want to rollback to and hit "Retry" i get this error message: "Error ArtifactsOverride must be set when using artifacts type CodePipelines". I have also tried to rerun the whole pipeline again with pipeline history page, but it's just

Building Windows Containers with AWS CodeBuild

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 12:33:18
I'm getting started with the CI/CD functionality of AWS. To this point, I have been creating my docker image locally on Windows Server 2016, based on the microsoft/windowsservercore image, and manually pushing it to the ECR (amazon container registry). At this point, I'm not trying to compile the application in CodeBuild. I'm only trying to build the container. Locally, the binaries are in a sub-directory and copied into the container. The CodeBuild project is failing with an error: image operating system "windows" cannot be used on this platform I'm pretty sure that's because the build