Another complete rework
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import { defineFunction } from '@aws-amplify/backend';
|
||||
|
||||
export const goApiHandler = defineFunction({
|
||||
name: 'go-api-handler',
|
||||
entry: './functions/go/api-handler',
|
||||
runtime: 'provided.al2023',
|
||||
architecture: 'arm64',
|
||||
timeout: 30,
|
||||
memoryMB: 512,
|
||||
});
|
||||
|
||||
export const goDataProcessor = defineFunction({
|
||||
name: 'go-data-processor',
|
||||
entry: './functions/go/data-processor',
|
||||
runtime: 'provided.al2023',
|
||||
architecture: 'arm64',
|
||||
timeout: 60,
|
||||
memoryMB: 1024,
|
||||
});
|
||||
|
||||
export const goFunctions = {
|
||||
goApiHandler,
|
||||
goDataProcessor,
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import { defineFunction } from '@aws-amplify/backend'
|
||||
|
||||
export const goFunction = defineFunction({
|
||||
name: 'go-functions',
|
||||
entry: '../../../functions/go-functions/main.go', // ← Points to your Go file
|
||||
runtime: 'provided.al2023' // ← Custom runtime for Go
|
||||
})
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import { defineFunction } from '@aws-amplify/backend';
|
||||
|
||||
export const pythonImageProcessing = defineFunction({
|
||||
name: 'python-image-processing',
|
||||
entry: './functions/python/image-processing',
|
||||
runtime: 'python3.11',
|
||||
timeout: 300,
|
||||
memoryMB: 3008,
|
||||
});
|
||||
|
||||
export const pythonDataAnalytics = defineFunction({
|
||||
name: 'python-data-analytics',
|
||||
entry: './functions/python/data-analytics',
|
||||
runtime: 'python3.11',
|
||||
timeout: 900,
|
||||
memoryMB: 2048,
|
||||
});
|
||||
|
||||
export const pythonFunctions = {
|
||||
pythonImageProcessing,
|
||||
pythonDataAnalytics,
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
import { defineFunction } from '@aws-amplify/backend'
|
||||
|
||||
export const pythonFunction = defineFunction({
|
||||
name: 'python-function',
|
||||
entry: '../../../functions/python-function/handler.py', // ← Points to external folder
|
||||
runtime: 'python3.12'
|
||||
})
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { defineFunction } from '@aws-amplify/backend';
|
||||
|
||||
export const rustImageProcessor = defineFunction({
|
||||
name: 'rust-image-processor',
|
||||
entry: './functions/rust/image-processor',
|
||||
runtime: 'provided.al2023',
|
||||
architecture: 'arm64',
|
||||
timeout: 300,
|
||||
memoryMB: 2048,
|
||||
});
|
||||
|
||||
export const rustFunctions = {
|
||||
rustImageProcessor
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
import { defineFunction } from '@aws-amplify/backend'
|
||||
|
||||
export const rustFunction = defineFunction({
|
||||
name: 'rust-function',
|
||||
entry: '../../../functions/rust-function/src/main.rs', // ← Points to external folder
|
||||
runtime: 'provided.al2'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user