跳至內容

Parameter store error in ECS

0

We want to call parameter store values through our code dotnet application.

We are seeing the below error in our ECS container logs. ParameterStoreHelper : Something went wrong ; The service returned an error with Error Code ParameterNotFound and HTTP Body: { "__type": "ParameterNotFound" }

We are using the below code for the functionality.

Dictionary<string, string> values = new();
AmazonSimpleSystemsManagementClient client = new AmazonSimpleSystemsManagementClient(Amazon.RegionEndpoint.USWest2);

var bucketName = client.GetParameterAsync(new GetParameterRequest { Name = "testbucketname", WithDecryption = true }).Result;
values.Add("TestBucketName", bucketName.Parameter.Value);

Could any one help us how we can resolve this issue and call parameter store values in our application

Thanks in advance, Anil Kumar V.

4 個答案
0
已接受的答案

Looks like the app can't find a parameter...? Are you sure parameter is in this region you are calling? Do you app have an permission to access PS? "testbucketname" is the name of the parameter in parameter store right?

已回答 3 年前
0

Hello Luke, thank you for your reply, we have created parameter in the right region. our app has access to parameter store and "testbucketname" is the name of the parameter in parameter store. Please let us know in case if we have missed anything related to configuration.

已回答 3 年前
0

Does your task definition include a proper IAM role definition with permission for ssm:GetParameters for your parameter store?

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。