AppSync

How to set up custom domain names for AppSync

I previously wrote about five reasons you should consider AppSync over API Gateway. One thing that API Gateway supports but you can’t do with AppSync out-of-the-box yet is custom domain names. Your shiny new AppSync API is available at XYZ.appsync-api.us-east-1.amazonaws.com/graphql, but you really want people to use your own domain instead because dev.example.com/graphql is much …

How to set up custom domain names for AppSync Read More »

AppSync: how to inject table names into DynamoDB batch & transact operations

When working with CloudFormation, AWS recommends not to give explicit names to resources and let CloudFormation name them for you. This has several advantages: It’s harder for attackers to guess resource names such as S3 buckets or DynamoDB tables. You can deploy the same stack multiple times to the same account. This is useful when …

AppSync: how to inject table names into DynamoDB batch & transact operations Read More »

AppSync: how to error on DynamoDB conditional check failures

TL;DR To make an AppSync DynamoDB resolver throw exceptions on conditional check errors, we need to check $context.error in the response mapping template ourselves. Like this: #if ( $ctx.error ) #if ( $ctx.error.type.equals(“DynamoDB:ConditionalCheckFailedException”) ) $util.error(“your error message”) #else $util.error($ctx.error.message, $ctx.error.type) #end #end $utils.toJson($context.result) And now, the longer version. The problem AppSync lets us perform DynamoDB …

AppSync: how to error on DynamoDB conditional check failures Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close