Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

268 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generated with Goldstack

Starter Template for scheduled Python Job on AWS Lambda

A starter template to implement a background job that is written in Python and deployed to run on AWS Lambda.

This project has been automatically generated using the template:

Python AWS Lambda (Background Job)

Feel free to fork this repository and modify it for your needs, or use the Goldstack project builder to generate a boilerplate specifically generated for your project.

Getting Started

Thank you for using this boilerplate. For any questions or feedback, please be welcome to raise an issue on GitHub 🤗 .

1. Fork and clone the repository

Fork this repository and then clone the fork into your local machine.

For more information, see GitHub documentation - Fork a repo

2. Install required local dependencies

A few dependencies need to be available in your development system. Please verify they are present or install them.

  • Node v20+
  • Yarn v1.22.5+
  • Docker v20+
  • Terraform CLI
  • AWS CLI v2

Open a terminal and run the following commands:

node -v
yarn -v
docker --version

This should produce the following output:

Confirming versions in the console

If you need to install or update any of the dependencies, please see the following guides:

3. Initialise project and install NPM Dependencies

Run yarn in your project directory to install and download all dependencies.

The installation process should take around 3-10 minutes depending on the dependencies that need to be downloaded.

Installing project dependencies

You can confirm everything was installed correctly by running yarn -v. This should show a yarn version of 3.0.0+.

Confirming Yarn Version after install

4. Build modules

Make sure that the project compiles correctly by running yarn build your project directory:

Building your project

Note that this command also ensures that all TypeScript project references are configured correctly.

5. Configure VSCode

In order to setup VSCode, open the project in VSCode.

VSCode may prompt you to ask if you trust the authors of the workspace. Respond with Yes.

VSCode Prompt trust authors

You may also be asked if you want to install recommended extensions for this workspace. We recommend to do so since the template will be optimised to work with the suggested extensions.

VSCode Prompt install extensions

If you want to install the necessary extensions manually, here are links to the extensions required:

6. Initialise TypeScript

Locate a .ts or .tsx file in the workspace and open it. When asked whether to use the workspace TypeScript version, click Allow.

VSCode Locate TypeScript

In the status bar on the bottom right-hand corner of the VSCode editor you should now see TypeScript.

TypeScript status icon in VSCode

7. Customise Configuration

In order to use this template for your own project, there are a few things to update.

Then you need to update the file packages/lambda-python-job-1/goldstack.json:

Here change the following:

  • Delete the property tfStateKey

Find more information about the required values in Lambda Python Job / Configure.

8. Contribute to Goldstack

Have questions or ideas or want to contribute to the project? Please head over to github.com/goldstack/goldstack.

About

Boilerplate template to deploy a Python Job to AWS Lambda with Terraform and AWS CLI

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages