aws-codepipeline-action | GitHub Actions will help you trigger a pipeline in your AWS | Continous Integration library
kandi X-RAY | aws-codepipeline-action Summary
kandi X-RAY | aws-codepipeline-action Summary
This GitHub Actions will help you trigger a pipeline in your AWS CodePipeline - assumming you already have the pipeline. This will not create the pipeline for you.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Parses header string into an object .
- Generate v2 bytes from a Buffer .
- An object .
- Constructor .
- Construct a new Structure .
- Properties of a Swagger .
- Add endpoints to endpoint
- generate URI
- Callback called when an operation is received .
- Parse the incoming message .
aws-codepipeline-action Key Features
aws-codepipeline-action Examples and Code Snippets
Community Discussions
Trending Discussions on aws-codepipeline-action
QUESTION
I recently set up an application on AWS via CDK. The application consists of a Dockerized nodejs application, which connects to an RDS instance, and has a Redis caching layer as well. After having the application deployed for a few days, the costs are much higher than I had anticipated, even with minimal traffic. After looking through the cost explorer, it looks like half of the cost is coming from the NAT gateways.
In my current setup, I have created two VPCs. One is used for the application stack, and the other is for the CodePipeline. I needed to add one for the pipeline because without it I was hitting rate limits when trying to pull Docker images during the CodeBuildAction steps.
I'm not very comfortable with the networking bits, but I feel like there are extra resources involved. The pipeline VPC has three NAT gateways and three EIPs. These end up just sitting there waiting for the next deployment, which seems like a huge waste. It seems like a new gateway + EIP is allocated for each construct the VPC is attached to in CDK. Can I just make it reuse the same one? Is there an alternative to adding a VPC at all and not getting rate limited by Docker?
I also find it very surprising (I might just be naive) that the NAT gateway is so far equally as expensive as my current Fargate task costs. Is there an alternative that would serve my purposes, but come at a little lower cost?
Anyways, here are my two stacks:
...ANSWER
Answered 2022-Feb-11 at 11:08I would strongly advise moving from the Docker directory to ECR public gallery to avoid ratelimit issues: https://gallery.ecr.aws/
That said, to answer the question about the number of NATs created. As you can see in the CDK docs, what you're seeing reflects the default behavior (emphasis mine):
A VPC consists of one or more subnets that instances can be placed into. CDK distinguishes three different subnet types:
Public (SubnetType.PUBLIC) - public subnets connect directly to the Internet using an Internet Gateway. If you want your instances to have a public IP address and be directly reachable from the Internet, you must place them in a public subnet.
Private with Internet Access (SubnetType.PRIVATE_WITH_NAT) - instances in private subnets are not directly routable from the Internet, and connect out to the Internet via a NAT gateway. By default, a NAT gateway is created in every public subnet for maximum availability. Be aware that you will be charged for NAT gateways.
Isolated (SubnetType.PRIVATE_ISOLATED) - isolated subnets do not route from or to the Internet, and as such do not require NAT gateways. They can only connect to or be connected to from other instances in the same VPC. A default VPC configuration will not include isolated subnets,
A default VPC configuration will create public and private subnets. However, if natGateways:0 and subnetConfiguration is undefined, default VPC configuration will create public and isolated subnets.
So a separate NAT is created for every Public subnet.
Also, the docs for the natGateways
parameter mentioned above also describe the default behavior:
(default: One NAT gateway/instance per Availability Zone)
To limit the number of AZs used by the VPC, specify the maxAzs
parameter. Set it to 1 to only have a single NAT per VPC.
If you're fine with making the resources in the VPC publicly reachable from the internet, you can place them in Public subnets and avoid the creation of NATs altogether.
QUESTION
I use CDK to deploy a codepipeline. It works fine until I try to add notification for codepipeline success/fail events. It gives CREATE_FAILED
error with message Resource handler returned message: "Invalid request provided: AWS::CodeStarNotifications::NotificationRule" (RequestToken: bb566fd0-1ac9-5d61-03fe-f9c27b4196fa, HandlerErrorCode: InvalidRequest)
. What could be the reason? Thanks.
ANSWER
Answered 2022-Feb-09 at 09:02This is because imported resources cannot be modified. As you pointed out in the comments, setting up the notification involves modifying the Topic resource, specifically its access policy.
Reference: https://docs.aws.amazon.com/cdk/v2/guide/resources.html#resources_importing
QUESTION
I have the following AWS CDK pipeline which works. It basically takes source from 2 different GitHub repositories (one for the application code, one for the cdk code) and builds the application code and the cdk code :
...ANSWER
Answered 2022-Feb-04 at 15:36So I found a solution. Maybe not the solution. Indeed, this seems quite convoluted ... and I am sure there is a better way.
So the solution lies in the fact that the ShellStep in the CodePipeline construct attaches the output of additionalInputs
(so the result of the previous CodeBuildStep i.e. lambdaBuildStep
) in a specific directory which is dynamically generated but stored in an environment variable called CODEBUILD_SRC_DIR_BuildLambda_lambda_repo
so you can see it's a combination of the name of the CodeBuildStep and the repo (with the dash changed to underscores).
So my solution was to use this environment variables as my Lambda code asset.
QUESTION
I am using AWS cdk to deploy codebuild and use BitBucketSourceAction
class to build bitbucket source stage in the codepipeline. Below is the code I am using when using cdk v1. But after upgrading to cdk v2, I can't find this class from the library aws-cdk-lib
. How can I build a bitbucket source stage from V2?
ANSWER
Answered 2022-Jan-31 at 08:46According to the docs from the 1.x version You should use CodeStarConnectionsSourceAction instead of BitBucketSourceAction because it is deprecated. The CDK 2.x major version removed all the deprecated packages from the aws-cdk-lib package.
Here the references:
Deprecated properties, methods, and types in AWS CDK v1.x and its Construct Library have been removed completely from the CDK v2 API. In most supported languages, these APIs produce warnings under v1.x, so you may have already migrated to the replacement APIs. A complete list of deprecated APIs in CDK v1.x is available on GitHub.
QUESTION
Im using this code to create pipeline to lambda.
I was able to create stack in the app with vpc before the the pipeline and use it for the lambda, but when Im trying to put stack with gateway in app after the pipeline and connect the lambda to it as authorizer, it trying to deploy lambda stack and Im getting failed: Error: The following CloudFormation Parameters are missing a value: FirstLambdaLambdaSourceBucketNameParameter4BB158A3, FirstLambdaLambdaSourceObjectKeyParameter65E28DA5
.
I understand it happens because of this line const lambdaCode = lambda.Code.fromCfnParameters();
and filling of the parameters happen in the pipeline on lambdaCode.assign(lambdaBuildOutput.s3Location)
and not in the lambda.
Is there any solution instead of putting all code in the pipeline?
EDIT:code example:
cdk.ts:
...ANSWER
Answered 2022-Jan-10 at 12:17My understanding: you want to deploy ConnectionsStack
and LambdasStack
in a pipeline.
When you deploy stacks with a pipeline, the stacks are children of a cdk.Stage
, grandchildren of a PipelineStack
, and great-granchildren of a cdk.App
. A pipeline can have many stages. A stage can have many stacks. Pipelines (like constructs generally) are meant to be modified and redeployed multiple times as requirements are added. Compose your pipeline app with a App > Pipeline Stack > Stage > Stacks
hierarchy in mind.
Your top-level app definition is not in the OP, but my guess is you are not composing correctly. Here's an idiomatic way to compose the pipeline:
(1) Add the pipeline stack as the app's entry point, as in the workshop:
QUESTION
I'm trying to have a pipeline that fetches code from Github and deploys it (Lambda, DynamoDB, etc, using CDK). I'm trying to make it work with CodeStarConnectionsSourceAction
at the moment and my code is failing with this error:
ANSWER
Answered 2022-Jan-08 at 12:50I figured it out, this is the working code, much shorter/concise:
QUESTION
I am deploying a AWS codepiepline which includes cross region action in each stage. I am using CodebuildAction (https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-codepipeline-actions.CodeBuildAction.html) inside stage of the pipeline and define all the build commands inside the action.
However, I can't see there is any parameter I can specify a region when create CodebuildAction
instance. It is always run from the default region. How can I specify the region for CodebuildAction
?
ANSWER
Answered 2021-Dec-10 at 11:20You would need to create the CodeBuild Project in another region, then import it with Project.fromProjectArn()
when creating the action. The action's region is determined by the Project's region.
QUESTION
I am currently working on aws cdk, where I am using Typescript for the setup. I have a question, where I have same library but they are referred as not same type.
Compilation Error:
...ANSWER
Answered 2021-Sep-10 at 15:47You need to make sure that you Aws-cdk packages are all the same version.
Set them all on 1.122.0, don't use ^. Not good practice, things change very ofton in cdk.
QUESTION
I am trying to set up a cross account deployment pipeline with CDK and CodePipeline.
I built the sample CodePipeline example from the AWS Docs and was able to deploy successfully with cdk into a single account. (https://docs.aws.amazon.com/cdk/latest/guide/codepipeline_example.html)
...ANSWER
Answered 2020-May-22 at 01:23The key is in that line in your output:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-codepipeline-action
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page