The SOAR App for AWS S3 fails to connect when using the "Use attached role when running Phantom in EC2" option under Asset Settings. The connectivity test returns the error message "Failed to get EC2 role credentials". The SOAR instance is hosted on an AWS EC2 instance with an attached IAM role that has the necessary trust policy allowing sts:AssumeRole. The EC2 Instance Metadata Service version 2 (IMDSv2) is enabled and required. The AWS S3 asset configuration uses the attached role instead of static AWS access keys. Despite this, the app cannot retrieve temporary credentials from the EC2 metadata service, causing the connectivity test to fail.
To confirm the issue, run the following commands on the SOAR EC2 instance (both active and standby if applicable) to verify IMDSv2 token retrieval and IAM role identification:
The second command should return the IAM role name attached to the EC2 instance.
Verify that the IAM role has the AmazonS3FullAccess policy attached and the trust relationship allows the EC2 service to assume the role.
Check if HTTP_PROXY and HTTPS_PROXY environment variables are configured in the SOAR environment settings, as proxy settings can interfere with access to the EC2 metadata service.
PS
The IP address is a link-local endpoint used by cloud providers (such as AWS, Azure, and GCP) to expose the Instance Metadata Service (IMDS), allowing virtual machines to retrieve their own configuration and credentials.
The root cause was identified as the EC2 metadata endpoint being routed through the proxy, causing the app to fail retrieving the IAM role credentials. To resolve this, add a NO_PROXY environment variable at the AWS S3 asset configuration level to exclude the EC2 metadata service endpoint from proxy processing.
Steps:
NO_PROXY variable with a value including the EC2 metadata IP address x.x.x.x, localhost entries, and any existing NO_PROXY entries, for example:x.x.x.x,localhost,localhost.localdomainAfter this change, the connectivity test should pass, confirming that the app can successfully retrieve EC2 role credentials. If the error changes to an S3 permission error such as AccessDenied, it indicates that the credentials are now retrieved correctly and further S3 bucket policy validation is needed.
Keep the NO_PROXY entries in place if any proxy settings remain configured in your environment, and retain existing entries when updating this variable.
For assistance with cross-account S3 bucket configuration or further setup, consider engaging the On Demand Services (ODS) team.
| Revision | Publish Date | Comments |
|---|---|---|
1.0 |
01-Oct-2026
|
Initial Release |