Error calling SSM to get parameters Name or service not known

0

My dotnet web application lambda was working great, I have the distributed Redis cache working with data protection enabled with services.AddDataProtection(). PersistKesToAWSSystemsManager ("/AWCWebManager/DataProtection"). Everything worked fine for a more than 10 days of testing and development, however after a seemingly incremental and unrelated change to the app after publishing to AWS Lambda now the Web client on access to the application times out with:

{"message": "Endpoint request timed out"}

In the Event Logs I see:

021-05-27 01:15:08: info: Amazon.AspNetCore.DataProtection.SSM.SSMXmlRepository[0]
2021-05-27 01:15:08: Using SSM Parameter Store to persist DataProtection keys with parameter name prefix /AWCWebManager/DataProtection/
2021-05-27 01:15:08: [Information] Amazon.AspNetCore.DataProtection.SSM.SSMXmlRepository: Using SSM Parameter Store to persist DataProtection keys with parameter name prefix /AWCWebManager/DataProtection/
2021-05-27 01:15:42: fail: Amazon.AspNetCore.DataProtection.SSM.SSMXmlRepository[0]
2021-05-27 01:15:42: Error calling SSM to get parameters starting with /AWCWebManager/DataProtection/: Name or service not known
2021-05-27 01:15:42: [Error] Amazon.AspNetCore.DataProtection.SSM.SSMXmlRepository: Error calling SSM to get parameters starting with /AWCWebManager/DataProtection/: Name or service not known
2021-05-27 01:15:42: fail: Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider[48]
2021-05-27 01:15:42: An error occurred while reading the key ring.

Checking IAM the application role has full access to SSM.
The AWS Systems Manager Parameter Store has a few rows with proper prefix and different /key suffix.
Anyone have suggestions as to what could cause the data session protection with SSM to glitch like this?
Thanks,
Mike

mwfox
已提問 3 年前檢視次數 389 次
1 個回答
0

The problem stemmed from adding a second website project to the visual studio solution. The second website did not have any permissions or used SSM. I noticed the wrong appsetting.json in the S2 bucket, by removing the second web project and redeploying everything is back to working. It would be great if the Visual Studio publish Lambda function realized it did not know how to handle the situation and offered a warning instead of populating the bucket with broken configuraitons.

mwfox
已回答 3 年前

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

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

回答問題指南