Questions tagged with AWS CodeDeploy

Content language: English

Sort by most recent

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

I have a pipeline on CodePipeline that checks the master branch on a repo on CodeCommit. Every time there's a change in the master branch, the branch is deployed to my production stack. Pretty standard. Now, for test purposes, I want to create a new pipeline to be able to push any feature branch to the test stack. Every time I execute git push origin feature-1, or git push origin feature-2, ecc..., I want that feature branch to be deployed. In this way I can test the branch and then merge it to master to deploy it to prd. Is that possible? It is OK if the branches to be deployed to test need to have a prefix. Of courde I would like not to trigger the first pipeline. thanks M
2
answers
0
votes
16
views
asked 21 hours ago
I have a duplicate website the www. and the nacked version. I would like to redirect all traffic to the nacked link www to non-www traffic. I have updated the .htaccess file but it doesn't work. Coding used: RewriteEngine Enabled RewriteRule ^(.*)$ http://www.example.com [NC] RewriteCond %{HTTP_HOST} ^example.com/$1 [L,R=301] It seems that changes to the .htaccess in Apache are handled differently... And the edits are not applied. Could you advise me on how to handle the www to non-www redirection?
1
answers
0
votes
20
views
asked a day ago
I'm setting up an on-premise CodeDeploy Agent. The instructions [here](https://docs.aws.amazon.com/codedeploy/latest/userguide/register-on-premises-instance-iam-session-arn.html#register-on-premises-instance-iam-session-arn-prerequisites) have an issue. I completed Step 2: Generate temporary credentials for an individual instance using AWS STS I'm trying Step3: Add a configuration file to the on-premises instance The instructions say to use the iam-session-arn noted in Step 2. However, there is no session arn to note in Step 2. There's a session name, there's a role arn. No session arn. What is the session arn that is being referred to?
0
answers
0
votes
3
views
asked 3 days ago
Hello, I have an application whose code is split between two repositories, and I would like to use code pipeline to combine them. The first one contains the actual code and needs to be built. The second contains a .env file with parameters needed to run the build. It also needs to be deployed to Beanstalk for the application to run properly. What I tried so far: * I defined a source that is triggered by commits to repo A, and outputs the artifacts to SourceArtifacts. * Then I defined another source that is triggered by commits to repo B, and outputs the artifacts to SourceArtifacts2. * Then I defined a Build stage that uses SourceArtifacts and SourceArtifacts2 as Input Artifacts, runs the build command and outputs to BuildOutput. * Finally I defined a deploy stage that gets the code from BuildOutput and deploy to Beanstalk. My problem is that when the build runs it can't access the values in the .env file, so it fails. Also the .env file from repo B is not deployed. I was wordering if there's any specific workaround to achieve this. thanks M
6
answers
0
votes
23
views
asked 4 days ago
I have a node application that I need to depoy to Elastic Beanstalk. I am using Code Pipeline to run the build and to deploy to Beanstalk, but then I need to start (npm start) the node server. How can I run the start command on Beanstalk after the code is deployed? Please note I am not using Code Deploy, the pipeline is deploying directly to Banstalk. Or do I need to use it (Code Deploy)?
1
answers
0
votes
18
views
asked 5 days ago
Hi, I am using Jenkins to deploy, by using an SSH connection. I started to use SSM with the AzureAD credentials (SSO solution), how can I deploy? as Jenkins doesn't have an AAD account so it can't access the instances for deployment. Any idea?
1
answers
0
votes
10
views
asked 8 days ago
I am creating a cloudformation nestedDeployment(CodeBuild Project and CodeDeploy Application) with a Blue/Green Deployment, for an ECS (Fargate Managed) Deployment. The Deployment fails in the creation of the CodeDeployment Group with this error: "The list of target group pairs must have exactly one pair (Service: AmazonCodeDeploy; Status Code: 400; Error Code: InvalidTargetGroupPairException; Request ID: xxxxxx)" My nested Deployment has an alb and the ouputs are seen in this deployment as importvalues, the output values are - ECSTargetGroup1Name, ECSTargetGroup1Name (With the export from the alb as - Value: !GetAtt ECSTargetGroup1.TargetGroupName and Value: !GetAtt ECSTargetGroup2.TargetGroupName). Same applies for the ECS ClusterName with its output-export in it's yaml file. My two cents in understanding this error is suggesting i may have declared wrongly the target groups in the TargetGroupPairInfoList. Any help with this will be appreciated. An excerpt of my code is this, ![Enter image description here](/media/postImages/original/IMqYX3TzrbQs-bNW4OgSVyyg) ![Enter image description here](/media/postImages/original/IMgBOinYoCQ6egrEum1CfpiA) ![Enter image description here](/media/postImages/original/IMG1xm421-RyKKGfakpoHSyQ) ![Enter image description here](/media/postImages/original/IMzQJ4saP0SPuY49HTSS2vhg) Resources:
1
answers
0
votes
20
views
profile picture
asked 8 days ago
I want to automate the deployment of the spring boot application from GitHub to AWS elastic beanstalk (ebs). I tried both the AWS code pipeline and code star. But I keep facing permission and policy requirement errors. Not sure what the required permissions are. I will really appreciate any guidance on how to do this, with examples if possible. The background to this question is that I am trying to move my application from Heroku to AWS. I use Guthub as my repository. Thanks!
1
answers
0
votes
31
views
asked 9 days ago
Hello, if I create an ec2 instance with an instance IAM role then codedeploy-agent connects perfectly but if I create ec2 instance without that IAM role first then I modify IAM and give that role to ec2 but codedeploy-agent cannot connect to the server is it happening to you guys or just me?
Accepted AnswerAWS CodeDeploy
1
answers
0
votes
8
views
asked 9 days ago
Hello, Do we always require appspec.yaml file in our repository to use AWS codedeploy?
Accepted AnswerAWS CodeDeploy
2
answers
0
votes
23
views
asked 9 days ago
Good day. Most blockchains are offering CLIs which can be installed using Rust/Cargo. In our current DevOps flow, we are having to build and deploy our smart contracts manually via the command. I've tried to setup a Lambda, with a Blockchain CLI installed so I can build and deploy our contracts, automatically, and at a small scale. However, I'm having a hard time getting it to work. Is it actually possible todo this using Lambda? Or would another AWS product be better suited for this type of work. Thank you greatly. EDIT: So for more context, I"m trying todo some stuff with the Solana CLI. It's installed via a rust package see (https://docs.solana.com/cli/install-solana-cli-tools) I've went ahead and setup a Lambda based on a container image with Solana CLI installed. But when it's time to run /root/cargo/bin/solana I get Permission Denied. I can get around this by moving /root/cargo/bin/solana to the /tmp folder, but this prevents the Lambda from being used by more than one person at once (because /tmp is wiped at the start of each function invocation. There must be another way todo this, but I can't see it. Maybe I can ensure only one person runs Lambda at once, but not sure how. Lambda layers looked promising but they have a limit of 250MB and I'm not sure I can fit everything in there, but I'm going to try. What am I missing? It feels basic to be able to call a CLI from inside a Lambda, but maybe I should be using a different AWS service.
0
answers
0
votes
25
views
asked 10 days ago
I have a CodePipeline setup with the following workflow. 1. Step 1: Source stage: Integrated with GitHub 2. Step 2: Deploy stage: Integrated with EC2 The pipeline is triggered by GitHub source code changes (e.g code marge, push, etc). Once this action happens CodePipeline kicks off the stage executions, i.e grabs the code from GitHub branch and then moves to deploy (there's no build stage). This works perfectly when a **single developer**is working on the branch; My problem now is that if **multiple developers push changes** to the branch, the deploy stage fails if it had not finished executing the first action. How do I deal with this scenario?
0
answers
1
votes
24
views
profile picture
asked 14 days ago