Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup is not uploading static files #192

Open
AramZS opened this issue Jan 2, 2021 · 4 comments
Open

Setup is not uploading static files #192

AramZS opened this issue Jan 2, 2021 · 4 comments

Comments

@AramZS
Copy link

AramZS commented Jan 2, 2021

Set up was as follows

In aws/script.ts

    const deployment = new SPADeploy(this, 'spaDeployment').createSiteWithCloudfront({
      indexDoc: 'index.html',
      websiteFolder: '../static',
      certificateARN: certificate.certificateArn,
      cfAliases: [domain, `*.${domain}`]

    })

File structure:

project/
|
|--aws/script.ts
|--static/index.html

I would expect the bucket with name domain to have a file at domain/index.html at the end of the deployment. But it does not have that file.

@nideveloper
Copy link
Owner

I'll take a look today, what version of CDK are you using?

I know 1.81.0 broke the s3 upload construct so 1.82 was just released which hopefully fixes some issues

@nideveloper
Copy link
Owner

Also thinking out loud wondering if it is cloudfront configuration related because https://github.com/cdk-patterns/serverless/blob/master/the-media-live-stream/typescript/lib/the-media-live-stream-website.ts#L29 uses the basic deployment with a static file. Either way I will dig in today

@nideveloper
Copy link
Owner

I just deployed one of my domains with the above configuration and a static index.html file, it worked as expected for me.

@nideveloper
Copy link
Owner

snippet

Looking at your code again actually my cdk stack is inside cdk/lib/cdk-stack.ts whereas yours is just under aws so you mightn't need the ../ in your reference to the static folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants