Reputation: 1669
I'm trying to just deploy a simple VPC with AWS CDK.
However when I run this with cdk deploy
I get the following errors:
The stack named SharedVPCStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Resource handler returned message: "Could not unzip uploaded file. Please check your file, then try to upload again.
The following resource(s) failed to create: [FastVpcPublicSubnet2DefaultRouteC2BAE598, CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E, FastVpcPublicSubnet1DefaultRouteEF5405FB]. Rollback requested by user.
It seems to be trying to deploy a lambda function called CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E
and failing to do that because it can't unzip some file.
Here is my stack code that I want to deploy.
from constructs import Construct
from aws_cdk import (
Stack,
aws_ec2 as ec2
)
class SharedVpcStack(Stack):
def __init__(self, scope: Construct, construct_id: str, stage, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
self.vpc = ec2.Vpc(self, "FastVpc",
vpc_name="my-vpc"
)
I don't know how to resolve this error. I am not trying to deploy a lambda function but it seems to come with the VPC resource in CDK (so it's not a file I wrote that it can't unzip). Does anyone know how I can resolve this error or why I am seeing it? I am using aws-cdk-lib
version 2.80.0
Upvotes: 1
Views: 416
Reputation: 1669
I was able to resolve this issue by deleting cdk.out
in my local and then redeploying.
Upvotes: 1