- 最新
- 投票最多
- 评论最多
Hi,
To better understand your issue, could you please
-
How did your code get the necessary permission? if you use AWS SDK could you please provide the code block.
-
As it was working before, could you please verify your EC2 instance is healthy and has correct IAM attached, if possible, could you please try to relaunch a new instance and deploy the code to see if it works on new instance.
Thanks
Dear Jady, Thankyou for your response, below is peace of code i am using I am not using ec2 instance, even not created, using dotnet core application on laptop and accessing Textract sdk var builder = new ConfigurationBuilder() .SetBasePath(Environment.CurrentDirectory) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddEnvironmentVariables() .Build(); var awsOptions = builder.GetAWSOptions(); Console.WriteLine(awsOptions.Profile + ":" + awsOptions.ProfilesLocation + ": " + awsOptions.Region.DisplayName);
IAmazonTextract textract =awsOptions.CreateServiceClient<IAmazonTextract>();
var request = new StartDocumentTextDetectionRequest();
request.DocumentLocation = new DocumentLocation
{ S3Object = new S3Object
{ Bucket = "testautomatelab",
Name = "test-files/employmentapp.png" }
};
var response = textract.StartDocumentTextDetectionAsync(request);
}
Receiving response Id = 263, Status = Faulted, Method = "{null}", Result = "{Not yet computed}"
Response Inner exception One or more errors occurred. (Unable to get IAM security credentials from EC2 Instance Metadata Service
相关内容
- AWS 官方已更新 1 年前