Does anyone have component created to replace ec2-user in EC2ImageBuilder

0

I'm trying to replace the default user coming from AMI's(ec2-user/ubuntu) to org specific user.

Sripada
질문됨 7달 전32회 조회
1개 답변
0

Hello. You need to create a custom component that runs during the build phase of your image pipeline. Like so:

name: CreateOrgUser
description: "Create a new organization-specific user"
schemaVersion: 1.0

phases:
  - name: build
    steps:
      - name: CreateUser
        action: ExecuteBash
        inputs:
          commands:
            - "sudo adduser --disabled-password --gecos '' orguser"
            - "sudo usermod -aG sudo orguser"
            - "echo 'orguser ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/orguser"

profile picture
전문가
답변함 22일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠