IST time in AWS appsync pipeline resolver function
I have a pipeline resolver which should automatically fetch the current IST date time from $util.time in aws appsync,
$util.time.nowISO8601() returns the UTC time, It works perfectly but then i should setup time conversion on my app frontend
I get an error when trying $util.time.nowFormatted("yyyy-MM-dd HH:mm:ssZ", "Asia/Kolkatta") "message": "Cannot return null for non-nullable type: 'AWSDateTime' within parent
I believe the root cause is a typo in ZoneId. According to utility documentation formats is based on DateTimeFormatter which uses TZDB IDs for TimeZones. According to this it should be either
Asia/Kolkata. You can find a helpful list of time zones here
Thanks for the answer, but I get following error.
can't serialize value (/createpayInfo/date) : Unable to serialize
2022-03-28 12:34:59+0530as a valid DateTime Object.
Changing the type from AWSDateTime to String fixed the issue. Seems other time zone value is not accepted when value is inserted in dynamodb.
Appsync HTTP resolver supported content typesasked 2 years ago
IST time in AWS appsync pipeline resolver functionAccepted Answerasked 3 months ago
Strict transport security header on appsync responsesasked 2 months ago
Using Appsync with Redshift?asked 4 months ago
How do I compose a BULK request to OpenSearch via AppSync resolver mapping templates?asked 2 months ago
Clarification on AppSync pricing when using pipelinesasked 3 years ago
AppSync resolver size limitsAccepted Answerasked 3 years ago
How do we use build-in velocity tools inside resolvers?asked 3 years ago
Appsync + Identity Pools + Resolver Contextasked 2 months ago
Access "aud" claim in resolver mapping for AWS AppSyncAccepted Answerasked 2 months ago