amplify-backend icon indicating copy to clipboard operation
amplify-backend copied to clipboard

Question about availability of Amplify Gen2 for gen1 user and comparison to AWS CDK

Open biller-aivy opened this issue 1 year ago • 9 comments

Environment information

Hello,

I am currently using Amplify Gen1 and eagerly awaiting the Gen2 option for Gen1 users. Is there a date or any details available?

What are the advantages of Amplify gen2 compared to AWS CDK? I could also directly learn CDK and thus move away from the CLI. Why was an extra framework necessary? What makes Amplify better for me in the future?

Thanks in advance for the information!


### Description

Update sheet / comparison with cdk in the docs 

biller-aivy avatar Jun 10 '24 20:06 biller-aivy

a short answer would be helpful here. Thanks :)

biller-aivy avatar Jul 11 '24 07:07 biller-aivy

So i guess there is no Timeline dir the rls? And its Not possible to simple answer the question?

biller-aivy avatar Aug 28 '24 20:08 biller-aivy

Hey @biller-aivy :wave: apologies for the delay here! We are actively investigating a migration path for Gen 1 customers 🙂 Gen 2 provides similar abstractions as Gen 1, however is closer to CDK and focused on code first. Gen 2 is built atop CDK and creates resources using underlying L3 constructs, which are instantiated in amplify/backend.ts when you set those to defineBackend()

josefaidt avatar Aug 28 '24 20:08 josefaidt

Given its been almost 4 months since the last comment, a fresh update would be helpful here. I was in no rush to migrate but am now hitting limitations of gen1 and find myself with the need for gen2's async function handlers.

charlieforward9 avatar Dec 05 '24 21:12 charlieforward9

Hey @charlieforward9 we are actively working towards a smooth migration path, however in the meantime to adopt async invocation types in Gen 1 you can specify an invocationType on the @function directive in your schema https://github.com/aws-amplify/amplify-category-api/blob/main/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts#L33C3-L33C26

josefaidt avatar Dec 07 '24 18:12 josefaidt

@josefaidt could you please be more specific here? I see that invocationType can be a string, but I'm not clear on what the string should be.

Is it EventInvocationResponse? What are the other options?

charlieforward9 avatar Feb 25 '25 00:02 charlieforward9

Hey @charlieforward9 apologies, the string would be "Event" https://github.com/aws-amplify/amplify-category-api/blob/b8771c1f782b19f653f310f0a29528dae08035dc/packages/amplify-graphql-function-transformer/src/graphql-function-transformer.ts#L272-L288

#  Valid
type Mutation {
  doStuff(msg: String): String
    @function(name: "foo", invocationType: Event)
    @function(name: "bar") # defaults to RequestResponse
}

#  Valid
type Mutation {
  doStuff(msg: String): EventInvocationResponse
    @function(name: "bar")
    @function(name: "foo", invocationType: Event)
}

josefaidt avatar Feb 25 '25 17:02 josefaidt

@josefaidt any updates on when the migration tool will be ready for gen 1 customers?

DevTGhosh avatar Oct 15 '25 10:10 DevTGhosh