This message was deleted.
# general
s
This message was deleted.
i
do you have a typo there for
runtime
?
i had a quick look at the sdk source code, I think you need to write:
runtime: lambda.enums.Runtime.Python3d8
are you using typescript in your pulumi program? this would have picked up such an error before deploying
no scratch that, I think the way you have it is right. next time you run
pulumi up
try adding the
--refresh
flag
fyi, runtime in Pulumi.yaml is not used for deploying resources - it's only used for running your deploy program locally -- so it should not be affecting this
h
I can try the enum, I also did ‘python3.8’ as a string. Yes, I am using Typescript in the project, and it seems correct to me. I will try with --refresh
I had set it to the correct python3.8 runtime manually. After trying pulumi up with --refresh, it incorrectly set it back to node 14 again, despite the runtime in the lambda being python3.8
i
It will keep doing that every time it detects the runtime has been changed from what it wants to set
can you do
pulumi stack export > state.json
then look through that file to find the
onDocumentsIndexingEvent...
resource then have a look at the inputs there, what is it saying?
h
“runtime”: “nodejs14.x”,
Copy code
"inputs": {
                    "__defaults": [
                        "memorySize",
                        "name",
                        "packageType",
                        "publish",
                        "reservedConcurrentExecutions",
                        "skipDestroy"
                    ],
                    "code": {
                        "4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
                        "assets": {
                            ".": {
                                "4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
                                "hash": "76557255a1b978ea5f4df5c201cb6a1bd1aa6b7b2f218bb232debd1b137425b7",
                                "path": "./jobs/python/mb_indexer_gpt/"
                            }
                        },
                        "hash": "76557255a1b978ea5f4df5c201cb6a1bd1aa6b7b2f218bb232debd1b137425b7"
                    },
                    "environment": {
                        "__defaults": [],
                        "variables": {
                            "OPENAI_API_KEY": "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",
                            "__defaults": []
                        }
                    },
                    "handler": "mb_indexer.lambda_handler",
                    "layers": [
                        "arn:aws:lambda:us-west-2:617706700270:layer:python_layer:7"
                    ],
                    "memorySize": 128,
                    "name": "onDocumentsIndexingEvent-ai-smart_onboarding-3075219",
                    "packageType": "Zip",
                    "publish": false,
                    "reservedConcurrentExecutions": -1,
                    "role": "arn:aws:iam::617706700270:role/pythonLambdaRole-ai-smart_onboarding-4552f77",
                    "runtime": "nodejs14.x",
                    "skipDestroy": false,
                    "timeout": 200
                }
i
That’s no good, what if you try changing the runtime to some static string that makes no sense - just to ensure that an error occurs
h
I tried it with a random static string and the pulumi up --refresh command. It resulted in the exact same thing as when I did the string
'python3.8'
or
lambda.Runtime.Python3d8