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 Answers
0
Accepted Answer

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?

profile picture
answered a year ago
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.

answered a year ago
0

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

profile picture
answered a year ago
0
profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions