How did you install the Amplify CLI?
npm install --no-save @aws-amplify/cli-internal-gen2-migration-experimental-alpha
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
0.4.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
When running npx amplify gen2-migration generate on an app that has API Key as an additional auth method for API, the generated code looks like this:
export const data = defineData({
...,
authorizationModes: {
defaultAuthorizationMode: "iam"
},
schema
});
Notice there is no configuration for the API key expiry time.
Expected behavior
The generated code should look like this:
export const data = defineData({
...,
authorizationModes: {
defaultAuthorizationMode: "iam",
apiKeyAuthorizationMode: { expiresInDays: 7 }
},
schema
});
Reproduction steps
Follow the gen2-migration guide of product-catalog app.
Workaround right now is to manually add this code in backend.ts.
Project Identifier
No response
Log output
Details
# Put your logs below this line
Additional information
No response
Before submitting, please confirm: