eugene-manuilov / cfpack Goto Github PK
View Code? Open in Web Editor NEWA CLI tool that helps to build CloudFormation template using multiple smaller templates.
License: MIT License
A CLI tool that helps to build CloudFormation template using multiple smaller templates.
License: MIT License
I'm wondering what the easiest way would be to support the package command (unless I've missed it?), so I can use cfpack
for uploading zip files of Lambdas? Just wondering if you have any suggestions... Thanks :)
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-cli-package.html
can i get a working example of a project for appsync resolvers and lamba functions?
i like your project, but still need an example to see how it works with graphql resolvers and lamba functions
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
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?
When deploying the stack in CI/CD process, it would be helpful to not fail when there is nothing to do. AWS CLI has an argument --no-fail-on-empty-changeset
to do that. I couldn't find any other UpdateStack argument to mimic that behaviour.
I guess that it have to be handled on the callback.
Thanks!
PS: great work!
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.
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?
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:
Thanks
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.
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. 😢
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:
Line 133 in d1da970
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.