Create an IAM user
Use an IAM user if your agent authenticates with access keys. If you already run the agent with an ECS task role or EKS web identity, use that role and skip to key creation.- Go to AWS’s Identity and Access Management (IAM) in the AWS console.
- On the left, under “Access management”, click “Users”.
- Click the orange button “Add users”.
- Pick a friendly and informative username, like
hyperlane-validator-${chain_name}orhyperlane-relayer-${chain_name}. This username will be referenced in future steps, so if you choose a different username be sure to use your correct username in the future. - Click “Next”, you do not need to assign the user any permissions.
- Click “Create user”.
- Click into the user that you just created
- Click the “Security Credentials” tab
- Scroll down to “Access Keys” and click “Create Access Key”
- Select “Application running outside AWS” and click “Next”
- Click “Next”, no need to add a description tag
- Click “Create access key”
- Copy the “Access key ID” and “Secret access key” to a safe place. Pass them to your agent as
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEY.
Create a KMS key
This key will be used by your agent for signing.- Go to AWS’s Key Management Service (KMS) in the AWS console.
- Ensure you are in the region you want to create the key in. This can be confirmed by viewing the region at the top right of the console, or by finding the name in the URL’s subdomain (e.g.
us-west-2.console.aws.amazon.commeans you’re operating in the regionus-west-2). - On the left, click “Customer managed keys”.
- Click “Create key”.
- Select the “Asymmetric” key type.
- Select the “Sign and verify” key usage.
- Select the
ECC_SECG_P256K1key spec. - Click “Next”.
- Set the Alias to something friendly and informative, like
hyperlane-validator-signer-${chain_name}orhyperlane-relayer-signer-${chain_name} - While not necessary, feel free to write a description and add any tags that you think will be useful.
- Click “Next”.
- A key administrator is not required, but if you want, you can select one.
- Click “Next”.
- Give the agent IAM user or role permission to use the key.
- Click “Next”.
- In the Review page, scroll to the “Key policy”. The generated key policy is acceptable, but you can make the access even less permissive if you wish by:
- Removing the
kms:DescribeKeyandkms:Verifyactions from the statement whose “Sid” is “Allow use of the key” - Removing the entire statement whose “Sid” is “Allow attachment of persistent resources”.
- Removing the
- Click “Finish”
Configure the agent
For a Validator, setvalidator.type to aws, validator.region to the key’s region, and validator.id to the key ID or an alias prefixed with alias/, such as alias/hyperlane-validator-signer-ethereum. See Validator checkpoint signer configuration and Amazon S3 checkpoint storage. For a Relayer, see Relayer signer configuration.
Find the EVM address
With the agent’s AWS credentials available in your shell, set the key alias and region for Foundry’scast.