Skip to content

Add AWS CLI v2 to Node.js AMI for cloud operations - #2

Merged
anevis merged 2 commits into
mainfrom
copilot/fix-7bbb4dfa-0933-47b9-bfab-5ba76dc8087f
Sep 26, 2025
Merged

anevis merged 2 commits into
mainfrom
copilot/fix-7bbb4dfa-0933-47b9-bfab-5ba76dc8087f

Conversation

Copilot AI commented Sep 26, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds AWS CLI v2 installation to the Node.js AMI to enable cloud operations and AWS service integration directly from instances launched with this AMI.

What's Changed

The AMI now includes AWS CLI v2 alongside the existing Node.js development stack, providing users with immediate access to AWS services without requiring manual installation after instance launch.

Technical Changes

  • Installation Script: Added AWS CLI v2 installation to scripts/install-nodejs.sh using the official AWS installer
  • Dependencies: Added unzip package requirement for AWS CLI installation
  • Verification: Included version verification step to ensure successful installation
  • Documentation: Updated README.md to reflect AWS CLI inclusion in features and software components

Installation Process

The AWS CLI v2 is installed using the recommended method:

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip  
sudo ./aws/install

This ensures users get the latest stable version with proper system-wide installation and cleanup of temporary files.

Benefits

  • Cloud-Native Development: Node.js applications can now interact with AWS services (S3, DynamoDB, SQS, etc.) without additional setup
  • DevOps Integration: Enables deployment scripts and CI/CD workflows that require AWS CLI
  • Zero Configuration: Users can start using AWS services immediately after instance launch
  • Maintained Compatibility: All existing Node.js functionality remains unchanged

Validation

  • Packer configuration validates successfully
  • Build scripts remain functional
  • Installation script syntax verified
  • Documentation updated to match actual capabilities

This change makes the AMI more valuable for cloud-native Node.js applications while maintaining the existing development-focused feature set.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • checkpoint-api.hashicorp.com
    • Triggering command: /usr/local/bin/packer init aws-ami-nodejs.pkr.hcl (dns block)
    • Triggering command: /usr/local/bin/packer validate aws-ami-nodejs.pkr.hcl (dns block)
    • Triggering command: /usr/local/bin/packer execute --protobuf packer-provisioner-shell (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Update the ami with AWS CLI


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: anevis <44937660+anevis@users.noreply.github.com>
Copilot AI changed the title [WIP] Update the ami with AWS CLI Add AWS CLI v2 to Node.js AMI for cloud operations Sep 26, 2025
Copilot AI requested a review from anevis September 26, 2025 13:14
@anevis
anevis marked this pull request as ready for review September 26, 2025 13:29
@anevis
anevis merged commit f871c13 into main Sep 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants