Skip to content

(codedeploy): Invalid yum package name causing command failures. #13654

@diegotry

Description

@diegotry

The userdata script includes the following command:

yum install -y awscli

The problem is that awscli works for apt-get, but it doesn't work for yum. The correct package name is aws-cli.

The above command returns a code different than 0, which causes the script to fail due to a recent change: see #12764

Previously, the error was ignored and now it is causing failures (which is the right behavior in my opinion, as the package doesn't exist).

Reproduction Steps

sh-4.2$ sudo yum install -y awscli
sh-4.2$ echo $?
130
sh-4.2$ sudo yum install -y aws-cli
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
Package aws-cli-1.18.107-1.55.amzn1.noarch already installed and latest version
Nothing to do
sh-4.2$ echo $?
0

What did you expect to happen?

I expect the command to succeed.

What actually happened?

The failure caused my deployments to fail.

Environment

  • CDK CLI Version : latest
  • Framework Version:
  • Node.js Version: 12
  • OS : Amazon Linux
  • Language (Version): Typescript

Other

I will submit a PR soon.


This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-codedeployRelated to AWS CodeDeploybugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions