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日前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ