awsmobile-cli icon indicating copy to clipboard operation
awsmobile-cli copied to clipboard

Set the awsRegion attribute of appsync/dataSources with parameter or argument.

Open komushi opened this issue 7 years ago • 1 comments

There is a mandatory attribute 'awsRegion' in the file of 'awsmobilejs/backend/appsync/dataSources.json'. By invoking 'awsmobile init' the appsync backend including the dataSources will be created. I would like the region attribute being specified with the value from 'awsmobile configure'.

Wondering whether this could be achieved by configuration like below.

{
    "dataSources": [
        {
            "name": "MyTable",
            "description": null,
            "type": "AMAZON_DYNAMODB",
            "serviceRoleArn": "{managed-by-awsmobile-cli}",
            "dynamodbConfig": {
                "tableName": "MyTable-{suffix}",
                "awsRegion": "{configured_region}",
                "useCallerCredentials": false
            }
        }
    ],
....

komushi avatar Jun 02 '18 00:06 komushi

Thanks for the feedback, I will mark this as a feature request.

UnleashedMind avatar Jun 04 '18 17:06 UnleashedMind