Giter Club home page Giter Club logo

cfpack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cfpack's Issues

YAMLException with !Sub

I seem to get an error trying to process my CloudFormation to do with the Sub command.

├─ Error processing /home/iw651/src/prototypes/esg-app-cms/cloudformation/cf/s3.yml template: YAMLException: unknown tag !<!Sub> at line 18, column 7:
│ PublicAccessBlockConfiguration:

The YAML I'm trying to process is like:

---
AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"

Parameters:
  EnvType:
    Type: String
    Default: "dev"

Resources:
  StrapiCMSAssetBucket:
    Type: "AWS::S3::Bucket"
    DeletionPolicy: Retain
    Properties:
      BucketName: !Sub
        - "my-test-strapi-assets-${EnvType}"
        - EnvType: !Ref EnvType

Deploy doesn't update Lambdas when using artifacts

So I've been trying to deploy some Lambdas with this, using the artifacts approach and I've discovered that while the first deploy works, updates to the stack don't work properly.

After doing some searching, I believe the S3Key needs to be rotated in the CloudFormation, but this would also be the case for the cfpack.config.js. Is there a way to introduce variables in to trigger some sort of automatic rotation?

Use Previous Value for parameters?

It doesn't appear that you can run a deployment without always updating parameters' values. I have a stack that has Lambda functions updating parameters from events (forcing a redeployment) and want the values that Lambda has updated to be retained when I deploy.

If I have an empty value for 'ParameterValue' in the cfpack.config file, I get an error that "Need to specify either usePreviousValue as true or a value for the parameter" - it would be super useful if there was an option in the config we could use to set this flag to true.

Artifacts command uploads with doubled up path and backslashes for Windows 10

Hi there,

I've been having an issue with the artifacts command for a while so decided to debug it now and found that the code uses \ instead of / due to path.join? I only had a brief look but from the docs I figured I'm doing it correctly, but it does not seem to work.

I tried using the zip compression but I download the artifact and it gives me a error saying it's invalid.

Maybe I'm doing something wrong?

Config:
image

Eg:
image

I also changed this to not join location and file as it then doubles up the path, as you can see in the screenshot above:
image

Thanks

Add ability to upload template to S3

I'm running into an issue as my template has apparently exceeded the limit for submitting it via the command line. I'm getting the following error when trying cpack build and cpack deploy:

Member must have length less than or equal to 51200

It would be fantastic to be able to upload the template file to S3 and then use that in the cloudformation deployment process.

Support uploading of local artifacts

It is possible to upload local artifacts to s3 prior to a deploy using the aws cli package command.

Currently when I use cfpack on a template that makes use of this mechanism I get the following error(s):

[19:59:18] cfpacktest CREATE_IN_PROGRESS Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document. Number of errors found: 5. Resource with id [CognitoCustomMessageLambda] is invalid. 'CodeUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter. Resource with id [CreateProfileLambda] is invalid. 'CodeUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter. Resource with id [FetchQueryResultSingleAuthenticatedLambda] is invalid. 'CodeUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter. Resource with id [SendTemplatedEmailLambda] is invalid. 'CodeUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter. Resource with id [SystemInformationLambda] is invalid. 'CodeUri' is not a valid S3 Uri of the form "s3://bucket/key" with optional versionId query parameter.

cfpack would need to somehow invoke the package command (or equivalent) during its build stage.

Edit: Looking into the source code of the aws-cli program, package is just a python script that uploads local artifacts to s3 and then modifies the input template. The only options appear to be invoking this command from cfpack or reimplementing it within cfpack. 😢

false-positive JSON size error from AWS

Hi!

When validating templates as part of the 'build' task, the built template JSON gets prettified, increasing its size considerably. I noticed that for some of my larger templates it may grow by a factor of 2. The obvious fix would be to remove the two extra parameters from the call to JSON.stringify(), but that would leave us with pretty ugly error messages should validation fail for reasons other than size. Perhaps conditionally run it without these options for larger templates?

Thanks!

-- Arjan

see:

cloudformation.validateTemplate({ TemplateBody: JSON.stringify(this.output.template, '', 4) }, (err) => {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.