Comments (6)
Hi @BrettBock,
Good morning.
Thanks for reporting the issue. In your case, the error seems to be thrown at AppConfigProcessor.ParseConfig() where somehow, the content type from AppConfigClient is being returned as application/json; charset=utf-8
, instead of expected application/json
.
I tried to reproduce the issue by creating configuration profile of type Freeform configuration profile
with JSON data type and was unable to reproduce the issue.
In order to reproduce the issue end-to-end, could you please share the following:
- AppConfig settings for:
- Application
- Configuration profile
- Environment
- Sample code solution (sample web app)
Thanks,
Ashish
from aws-dotnet-extensions-configuration.
While creating some sample code, I believe I discovered an issue. The configuration we had in AWS used AppConfig's Freeform Configuration with Amazon S3 Object. By switching to AWS AppConfig hosted configuration with JSON content, the code is now working.
Are there known issues with using S3 and AppConfig? Should a separate issue be created for working with an Amazon S3 Object?
Thank you for your help, and working this project.
from aws-dotnet-extensions-configuration.
While creating some sample code, I believe I discovered an issue. The configuration we had in AWS used AppConfig's Freeform Configuration with Amazon S3 Object. By switching to AWS AppConfig hosted configuration with JSON content, the code is now working.
Are there known issues with using S3 and AppConfig? Should a separate issue be created for working with an Amazon S3 Object?
Thank you for your help, and working this project.
@BrettBock Somehow I'm unable to reproduce the issue. Below are the steps I followed:
- Created a new bucket with versioning enabled (AppConfig with S3 object source requires S3 bucket with versioning enabled).
- Created below
test-app-config.json
:
{
"name": "test",
"type": "document",
"test": "value"
}
- In AppConfig AWS console, created a new freeform configuration profile with S3 object as source.
- Deployed the configuration
- In the ASP.NET application, used code
builder.Configuration.AddAppConfig("<<application-id>>", "<<environment-id>>", "<<config-profile-id>>", TimeSpan.FromSeconds(30));
RESULT: I was able to retrieve the app configuration. the content type as reported at AppConfigProcessor.ParseConfig() is application/json
- Checked the system-defined
Content-Type
metadata for JSON file uploaded in S3 bucket. It is listed asapplication/json
.
Could you please:
- Check the content type of the file at your end?
- How is that JSON file in your case uploaded? Is it by some automated process which sets the
Content-Type
metadata during upload?
While it would not be a good idea to manually change the Content-Type
metadata for S3 object, the simple fix could be to compare only the 1st part before ;
in the content type at at AppConfigProcessor.ParseConfig() since the content-type could have extra information.
Thanks,
Ashish
from aws-dotnet-extensions-configuration.
I would agree that using just the first part of the content-type
would be a good fix, since as far as I know the parser is not dependent on the encoding.
On my end:
- By changing the S3 Metadata for Content-Type to only application/json, we are able to use the S3 file.
- We have been using Visual Studio Code with the AWS toolkit to create and edit the S3 files.
- Using VSCode to save the file the first time adds the additional encoding.
- Changing the S3 Metadata appears to stick, so that future edits can be done.
Again, thank you for your help, and working this project.
from aws-dotnet-extensions-configuration.
This has been fixed in Amazon.Extensions.Configuration.SystemsManager version 5.0.2.
from aws-dotnet-extensions-configuration.
⚠️ COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
from aws-dotnet-extensions-configuration.
Related Issues (20)
- AWS Parameter Store - Loading and Processing Sequence of Operations HOT 5
- Configuring a Dictionary HOT 3
- AppConfigProcessor to expose LastConfigVersion as part of the GetDataAsync HOT 5
- ssm:GetParametersByPath permission is required HOT 2
- Unable to load params from AWS Param Store HOT 7
- "AddSystemsManager" method doesn't work with DI and .Net 6 HOT 6
- Missing documentation for loading Secret Manager secrets as SSM parameters HOT 3
- AddSystemsManager Takes 1+ Minutes to Complete HOT 3
- JsonParameterProcessor::ProcessParameters fails when different objects share property names HOT 4
- Loading AppConfig feature flags into strong-type options HOT 7
- Support for the AWS Lambda Extension HOT 4
- AddSystemsManager with SecretsManager path resolves parameters with ':' prefix HOT 4
- Missing dependency AWSSDK.SecurityToken ? HOT 5
- Duplicate SSM parameter with different Case cause the whole SSM parameter fail to load HOT 10
- 5.1.1 breaks existing application using StringList HOT 6
- amazon.extensions.configuration.systemsmanager is missing NuGet package README file
- AddAppConfig default encapsulation HOT 1
- Config reload not occuring HOT 11
- Is there a dev mode that works with local config? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-dotnet-extensions-configuration.