Manish Kumawat
Last Updated on: 17 July 2024
Aws Amplify is a set of tools and services that enables applications to be built and deployed for scale.
Install and configure the Amplify CLI.
$> amplify add api
$> ? please select from one of the below mentioned services:
GraphQl
>REST (Select REST as the service type)
$> √ Would you like to add a new path to an existing REST API: (y/N) · no
$> ? Provide a friendly name for your resource to be used as a label for this category in the project: lambdafunction
$> √ Provide a path (e.g., /book/{isbn}): · /book/admin
$> √ Choose a Lambda source : Create a new Lambda function
$> ? Provide the AWS Lambda function name: lambdafunction
$>? Choose the runtime that you want to use: NodeJS
$> ? Choose the function template that you want to use: (Use arrow keys)
❯ Hello world function
Available advanced settings:
❯ $> ? Do you want to configure advanced settings? (y/N) Yes
❯ $> ? Do you want to access other resources in this project from your Lambda function? (y/N) Yes
(if you select yes )
❯ $> ? Select the categories you want this function to have access to
You can access the following resource attributes as environment variables from your lambda function
❯ $> ? Do you want to invoke this function on a recurring schedule? No
❯ $> ? Do you want to enable Lambda layer for this function ?No
❯ $> ? Do you want to configure environment variable for this function?No
❯$> ? Do you want to configure secret value this function can access?No
❯$> ?Do you want to edit the local lambda function now ? No
Successfully added resource lambdafunction locally.
(if you select No )
❯ $>? Do you want to invoke this function on a recurring schedule? No
❯ $> ? Do you want to enable Lambda layers for this function? No
❯ $> ? Do you want to configure environment variables for this function? Yes
❯ $> ? Enter the environment variable name: clientId
❯ $> ? Enter the environment variable value: test
❯ $> ? Select what you want to do with environment variables: I'm done
You can access the following resource attributes as environment variables from your Lambda function
❯ $> ? Do you want to configure secret values this function can access? No
❯ $> ? Do you want to edit the local lambda function now? No
Successfully added resource lambdafunction locally.
After your resources have been created update your backend with the push command:
❯ $> amplify push
Manish Kumawat is the co-founder at Fulminous Software. He is an expert at writing about technical stuff in the IT world. Imagine making the most complicated tech things easy to understand - that's what he do. But that's not all. He has developed and honed the company’s vision, corporate structure & initiatives, and its goals, and brought the company into the current era of success.
Discuss your Custom Application Requirements on info@fulminoussoftware.com or call us on + 1 803 310 5187.
15 Days Risk-Free Trial