Hey guys, I’m having tough problems with associati...
# aws
Hey guys, I’m having tough problems with associating a lambda with a VPC. Either an existing one, or a new one. Doesn’t matter what I do, Pulumi shows me an error that says:
Copy code
Computed attributes cannot be set, but a value was set for "vpc_config.0.vpc_id".. Examine values at 'Function.VpcConfig.VpcId'
My configuration is very simple (doesn’t work even if I hardcode string IDS for everything):
Copy code
vpcConfig: {
    vpcId: vpc.id,
    subnetIds: vpc.publicSubnetIds,
    securityGroupIds: ['sg-a123123123'],
the error message isn't super clear, but you only need to set one of
or `subnetIds`: there's a full example here: https://github.com/jaxxstorm/pulumi-examples/blob/main/typescript/aws/lambda-vpc/index.ts#L62