Skip to content

Commit

Permalink
install yq bin as per cpu arch (#104)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <sngri@amazon.com>
  • Loading branch information
rishabh6788 committed Feb 9, 2024
1 parent bfa15e4 commit c23b512
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/infra/infra-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,9 @@ export class InfraStack extends Stack {

const cfnInitConfig: InitElement[] = [
InitPackage.yum('amazon-cloudwatch-agent'),
InitCommand.shellCommand('sudo wget -nv https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_amd64 '
+ '-O /usr/bin/yq && sudo chmod +x /usr/bin/yq'),
InitCommand.shellCommand('arc=$(arch); if [ "$arc" == "aarch64" ]; then dist="arm64"; else dist="amd64"; fi; '
+ 'sudo wget -nv https://github.com/mikefarah/yq/releases/download/v4.40.5/yq_linux_$dist '
+ '-O /usr/bin/yq && sudo chmod 755 /usr/bin/yq'),
CloudwatchAgent.asInitFile('/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json',
{
agent: {
Expand Down

0 comments on commit c23b512

Please sign in to comment.