I’m fairly new to working with AWS and as well Pu...
# aws
w
I’m fairly new to working with AWS and as well Pulumi. Currently trying to create a stack and when running
pulumi up
I get the following errors. Any other errors i was receiving previously were fairly easy to figure out but this sorta just started happening today and was not occuring yesterday and has me scratching my head. Feels like theres a possible permission issue / not hitting AWS at all? Any help would be much appreciated.
Copy code
aws-native:lambda:Function (ads-test-plugin-version-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: acf5e848-7707-4f3c-b8e3-e229d791ec10, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-core-cms-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 11843833-346b-4514-a8a0-23e97f9b615c, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-host-floors-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 71641273-1da1-4641-9be6-5d588d41d8f2, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-site-ads-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 049f7e82-b7bf-4500-894c-c8bb3806904b, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-site-css-origin-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: fd6c1a3a-e49f-41ad-9734-be6c712e2d7d, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-site-viewer-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 6cfa949b-b296-49a9-9e8f-7bea09a13909, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:iam:Role (ads-test-site-origin-request-lambda-role):
    error: operation UPDATE failed with "AccessDenied": User: arn:aws:iam::634658137083:user/dev-cli is not authorized to perform: iam:UpdateAssumeRolePolicy on resource: role ads-test-site-origin-request-lambda-role-ad97022 (Service: Iam, Status Code: 403, Request ID: 7d0d9e7f-d1f9-47fe-8af4-6933f900c77f, Extended Request ID: null)
 
  pulumi:pulumi:Stack (ad-code-infrastructure-test):
    error: update failed
 
  aws-native:lambda:Function (ads-test-plugin-insertion-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 5290468a-a418-47ff-a032-e59fb58164d8, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-core-esp-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: d52a1bcc-1da6-4d6a-ab7a-e5a2174a411c, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:lambda:Function (ads-test-core-origin-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 3ba1f5fb-f49b-4cd3-90b0-58553f4b41b9, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
 
  aws-native:apigateway:Resource (APIResource):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: 546656f4-6bfd-4c82-bb42-486a8f6bcadf, UnsupportedActionException: Resource type AWS::ApiGateway::Resource does not support UPDATE action
 
  aws-native:lambda:Function (ads-test-marmalade-request):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: ba7a2a00-f918-4a18-a2b9-56788556b2da, api error ValidationException: [REPLACE Operation] noSuchPath in source, path provided : //Code
b
Hi Ryan, can you share the code you have? It looks like you're trying to point to a non existent code path
w
Heres an example of one of the functions
Copy code
const adsMarmaladeRequestLambdaRole = new awsnative.iam.Role(
  `ads-${env}-marmalade-request-lambda-role`,
  {
    assumeRolePolicyDocument: assumeRolePolicyForLambda,
  },
);

const adsMarmaladeRequestLambdaParams = {
  publish: true,
  path: '/',
  name: `ads-${env}-marmalade-request`,
  role: adsMarmaladeRequestLambdaRole.arn,
  code: {
    s3Bucket: 'ads-delivery-sandbox-adthrive',
    s3Key: `${commit}/ads-marmalade-request.zip`,
  },
  memorySize: 128,
  runtime: 'nodejs12.x',
  handler: 'index.handler',
  timeout: 3,
  tracingConfig: {
    mode: FunctionTracingConfigMode.PassThrough,
  },
};

const adsMarmaladeRequestLambda = new awsnative.lambda.Function(
  `ads-${env}-marmalade-request`,
  adsMarmaladeRequestLambdaParams,
);
This was previously working with awsClassic. I’m only recently getting this error since attempting to switch to awsNative
I only recently tried adding path and name but made no difference either way