Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature Request: Add support for AWS IAM roles (ECS Task Role / EC2 Instance Profile) for SQS authentication

オープン
#463 コメント 4 件 リアクション 8 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
aws, go
領域
backend, cloud

調査の方向性

まず internal/config/mqconfig_aws.go と、issue に引用されている IsConfigured() メソッドから始め、次に構成検証が 'message queue configuration is required' を送出する箇所と、SQS クライアントが構築される箇所(AWS SDK のデフォルト認証チェーンに依存していることを確認するために)を追跡する。AWSSQSConfig をカバーする構成検証テストを見つけ、IAM ロール環境のケースを追加する。完了の条件は、AWS_CONTAINER_CREDENTIALS_* または AWS_EXECUTION_ENV が存在する場合に Region のみ設定されていれば IsConfigured() が true を返し、明示的なキーも引き続き機能し、既存の構成テストがすべて通過することである。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Feature Request: Add support for AWS IAM roles (ECS Task Role / EC2 Instance Profile) for SQS authentication

Description

Currently, Outpost requires explicit AWS credentials (AWS_SQS_ACCESS_KEY_ID and AWS_SQS_SECRET_ACCESS_KEY) for SQS authentication. This prevents the use of AWS IAM roles, which is the recommended security practice for applications running on AWS infrastructure like ECS, EC2, or Lambda.

Current Behavior

When running Outpost on ECS Fargate without explicit credentials, the service fails with:

config validation error: message queue configuration is required

Looking at the source code in internal/config/mqconfig_aws.go, the IsConfigured() method requires non-empty credentials:

func (c *AWSSQSConfig) IsConfigured() bool {
    return c.AccessKeyID != "" && c.SecretAccessKey != "" && c.Region != ""
}

Expected Behavior

Outpost should support AWS IAM roles by:

  1. Detecting when running in an AWS environment with IAM roles available
  2. Using the AWS SDK's default credential provider chain
  3. Only requiring the region when IAM roles are available

Use Case

Many organizations follow AWS security best practices by:

  • Using IAM roles instead of long-lived access keys
  • Running containerized workloads on ECS with task roles
  • Deploying on EC2 instances with instance profiles
  • Following the principle of least privilege

Currently, we have to create IAM users with access keys specifically for Outpost, which:

  • Goes against security best practices
  • Requires additional secret management
  • Increases the attack surface
  • Makes credential rotation more complex

Proposed Solution

Modify the IsConfigured() method to support IAM roles:

func (c *AWSSQSConfig) IsConfigured() bool {
    // Check if running with IAM role credentials
    if hasIAMRoleCredentials() {
        return c.Region != ""
    }
    // Fall back to explicit credentials
    return c.AccessKeyID != "" && c.SecretAccessKey != "" && c.Region != ""
}

func hasIAMRoleCredentials() bool {
    // ECS Task Role
    if os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI") != "" {
        return true
    }
    // EC2 Instance Profile
    if os.Getenv("AWS_CONTAINER_CREDENTIALS_FULL_URI") != "" {
        return true
    }
    // Lambda or other AWS services
    if os.Getenv("AWS_EXECUTION_ENV") != "" {
        return true
    }
    return false
}

The AWS SDK for Go already handles credential resolution automatically through its default credential provider chain, so the SQS client initialization should work without explicit credentials when IAM roles are available.

Environment

  • Outpost version: v0.4.1
  • Deployment platform: AWS ECS Fargate
  • AWS SDK: Already included in Outpost

Additional Context

This feature would align Outpost with AWS best practices and make it easier to deploy in production environments. Many similar tools (e.g., Fluent Bit, Prometheus, etc.) support IAM roles out of the box.

Workarounds

Current workarounds include:

  1. Creating IAM users with access keys (security anti-pattern)
  2. Using a sidecar container to provide credentials
  3. Forking Outpost to add IAM role support

None of these are ideal for production use.

References

主要言語
Go
スター
1.1k
フォーク
70
平均マージ
1日 18時間
マージ済み PR(30日)
56

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hookdeck/outpost のほかの issue

hookdeck/outpost の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。