

# now you can run commands over ssh, copy files, etc. The steps you would take in your CI pipeline (after your instance and IAM role and SSH keys are setup) might look like this: ssh_to_ec2:Īpt update & apt install -y -no-install-recommends curl ssh Your instance can be in a private subnet with no internet access and this will still work as long as you have setup the system and IAM permissions correctly.

See setting up session manager and working with session manager.īasically the way this works is that instead of talking to the EC2 instance directly, you talk to the AWS systems manager service, which tunnels your connection to the ssm agent on the EC2 instance for you (after authenticating/authorizing your access). You'll need to configure your EC2 instance with Systems Manager and install client libraries for session manager. Use AWS Systems Manager (SSM session manager) to access systems.

GitLab uploads artifacts to AWS CodePipeline then AWS CodePipelines updates your EC2 instance on your behalf from inside AWS.
