-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing of internal constraint on AmplifyOutputsData in Swift implementation. #3960
Comments
AmplifyOutputsData is marked internal because it is not considered stable. We may at times, change the internal structure, variable names, etc within AmplifyOutputsData. If we were to make this public, any changes would require a major release. Android has a way to pass a json string, instead of a file, so this may be something that Swift can look into adding as well. You could store the json string however you would like. However, I would like to assure you that no data within the amplify_outputs.json file is considered private. There should be no need to encrypt these values. I'll go ahead and mark this as a feature request. |
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
There are major release of AWS Amplify Gen 2, and at this point the configuration shouldn't be something that could change in the next major release. We are potentially already have an issue even with this internal approach because some changes to configuration may have a significant undesirable side-effects. Here is a scenario. Presume that AWS Amplify Gen 2 developers changed the Application developers would be required to download a revised the Additionally, in my scenario the application is deployed in many time, thus introducing complexities during deployment of the application that is prone to errors since each instance will require changing the My advice for the AWS Amplify Gen 2 developers, use one the many paradigms that allow supporting different configuration revisions across releases. Eventually, the AWS Amplify Gen 2 developers will declare that earlier revisions are deprecated where application developers are required to downloading the appropriate
What I've done is to construct extract the properties from a secure source and placed those into a JSON representation into a
I'll encourage you to discuss amongst your peers about the merits preventing individuals from accessing such information in the first place. I've had to deal with domain where skilled bad actors with sufficient details such as endpoints & AWS S3 bucket details were enough for them to cause mischief.
Thanks, I do appreciate that as well other persons (if not now, sometime in the future). ;-) |
@sbelbin I did not mean to indicate that amplify_outputs.json is not under a public contract. That contract is set. How we choose to parse that json and convert it into structs/classes that we use internally within Amplify is what is subject to change. Since it is not public, any changes made within would not be breaking. |
Is your feature request related to a problem? Please describe.
At times a Swift application needs to do the following for itself:
Configure AWS Amplify Gen 2 Swift application using
AmplifyOutputsData.init
since these settings are stored in a secure & encrypted manner and other than in JSON file (i.e.amplify_outputs.json
) or JSON representation.Fetching these configuration settings so that the application's behavior can be adapted based on those settings or present them to the application's users.
Describe the solution you'd like
The removal of the
@_spi(InternalAmplifyConfiguration)
on thestruct AmplifyOutputsData
as well as various sub-structures and functions.Doing this will make this accessible to Swift developers using AWS Amplify Gen 2.
Describe alternatives you've considered
What I've done is to copied the code of
struct AmplifyOutputsData
as well as various sub-structures and functions within my application code to avoid naming collision withAmplify
module. But, where the@_spi(...)
directive is commented out.I've tried to workaround by using a different import directive the application such as
@_spi(InternalAmplifyConfiguration) import Amplify
, but Swift fails to compile stating that theAmplifyOutputsData
is internal.Is the feature request related to any of the existing Amplify categories?
No response
Additional context
The first point of being able to use
AmplifyOutputsData.init
is practical for those such as myself when developing an applications used the medical domain, since our best practices is store configuration in a secure manner such as iOS Keychain.In that context being able to initialize a
AmplifyOutputsData
object with the appropriate settings without having to compose into an intermediary JSON representation is practical.Thanks for your consideration.
The text was updated successfully, but these errors were encountered: