• /
  • EnglishEspañolFrançais日本語한국어Português
  • Se connecterDémarrer

Set up AWS IAM user

Use this method for testing environments or when IAM roles aren't supported. Access keys are long-lived credentials that require manual rotation.

Use cases

  • Testing and development environments
  • AWS configurations that don't support cross-account role assumption
  • Simplified authentication workflows

Prudence

Access keys are long-lived credentials. Rotate them regularly (every 90 days) and limit permissions to only what your workflows need.

Prerequisites

Before creating an IAM user, ensure you have:

Set up the IAM user

Create the IAM user

  1. Sign in to the AWS IAM Console
  2. Navigate to Users > Create user and enter a username: workflow-automation-user (or your preferred name)
  3. Click Next
  4. On the Set permissions page, choose Attach policies directly
  5. Search for and select policies based on your workflows:
    • For SQS: Select AmazonSQSFullAccess
    • For EC2: Select AmazonEC2ReadOnlyAccess
    • Or create a custom policy with limited permissions (recommended)
  6. Click Next, then Create user

Generate access keys

  1. In the users list, select your newly created user

  2. Click the Security credentials tab

  3. In the Access keys section, choose Create access key

  4. Select Application running outside AWS and click Next

  5. (Optional) Add a description tag: New Relic workflow automation

  6. Choose Create access key

  7. Copy both credentials immediately:

    • Access key ID (starts with AKIA...)
    • Secret access key (shown only once)

    Important

    AWS displays the secret access key only once during creation. If you don't save it, you'll need to generate a new key pair.

Store credentials securely

Never hardcode AWS credentials in workflows. Store them in New Relic's secrets manager instead.

  1. Open the NerdGraph GraphiQL explorer
  2. Run this mutation to store your Access Key ID (replace the placeholder values):
mutation {
secretsManagementCreateSecret(
scope: {type: ACCOUNT id: "YOUR_NR_ACCOUNT_ID"}
namespace: "aws"
key: "awsAccessKeyId"
description: "AWS Access Key ID for workflow automation"
value: "YOUR_AWS_ACCESS_KEY_ID"
) {
key
}
}
  1. Run another mutation for your Secret Access Key:
mutation {
secretsManagementCreateSecret(
scope: {type: ACCOUNT id: "YOUR_NR_ACCOUNT_ID"}
namespace: "aws"
key: "awsSecretAccessKey"
description: "AWS Secret Access Key for workflow automation"
value: "YOUR_AWS_SECRET_ACCESS_KEY"
) {
key
}
}

Reference these secrets in workflows using the syntax: ${{ :secrets:awsAccessKeyId }}

Conseil

Use the namespace field to organize secrets by environment (aws-prod, aws-staging) or team name.

AWS credentials overview

Compare authentication methods and choose the right one

AWS policy examples

Complete IAM policies for EC2, SQS, DynamoDB, and more

AWS actions

Browse EC2, Lambda, S3, SQS, and other AWS actions

Workflow best practices

Security best practices for credentials and secrets

Droits d'auteur © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.