Saltar al contenido

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 Respuestas
0
Respuesta aceptada

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?

respondido hace 3 años
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.

respondido hace 3 años
0

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

respondido hace 3 años
0

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.