An error occurred (InvalidParameterException) when calling the UpdateManagedLoginBranding operation: Media type not supported for value: text/plain #9102
Unanswered
CraigAtCatalyst
asked this question in
Q&A
Replies: 1 comment
-
I have the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When trying to add assets to aws cognito-idp update-managed-login-branding or aws cognito-idp create-managed-login-branding, I can't seem to find the proper way to upload the asset.
https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/update-managed-login-branding.html says the file type should be "blob" and I've tried taking the asset output (byte string) from a "describe-managed-login-branding" request and additionally tried adding a file path as shown here: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-types.html#parameter-type-blob and seem to always get the error: An error occurred (InvalidParameterException) when calling the UpdateManagedLoginBranding operation: Media type not supported for value: text/plain
If I don't include assets in the command, everything works fine.
I've tried:
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets "$(< ./assets.json)"
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets '[{"Category": "FORM_LOGO", "ColorMode": "DARK", "Extension": "PNG", "Bytes": "file://logo.png"}]'
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets '[{"Category": "FORM_LOGO", "ColorMode": "DARK", "Extension": "PNG", "Bytes": "fileb://logo.png"}]'
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets '[{"Category": "FORM_LOGO", "ColorMode": "DARK", "Extension": "PNG", "Bytes": "./logo.png"}]'
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets '[{"Category": "FORM_LOGO", "ColorMode": "DARK", "Extension": "PNG", "Bytes": "$(cat ./logo.png | base64)"}]'
aws cognito-idp update-managed-login-branding --user-pool-id "USERPOOL" --managed-login-branding-id "BRANDING" --settings "$(< ./settings.json)" --assets '[{"Category": "FORM_LOGO", "ColorMode": "DARK", "Extension": "PNG", "Bytes": null}]' - which returned Invalid type for parameter Assets[0].Bytes, value: None, type: <class 'NoneType'>, valid types: <class 'bytes'>, <class 'bytearray'>, file-like object
Beta Was this translation helpful? Give feedback.
All reactions