Comments (5)
Thanks @jonlorusso. I am going to add artifacts
section to the cfpack.config.js
file where you will be able to define files that need to be uploaded before deploy. It will look like this:
module.exports = {
entry: "...",
output: "...",
verbose: true,
silent: false,
stack: {
name: "...",
region: "...",
params: {
...
},
artifacts: [
{
bucket: 'my-bucket',
files: {
'api/schema.graphql': 'local/schema/schema.graphql',
'lambdas/first-function.zip': {
include: ['*.js', '*.json'],
exclude: ['package-lock.json', 'tests/**/*'],
path: 'local/files/**/*',
compression: 'zip', // zip | tar.gz | none
},
},
},
],
},
};
Then you will need to update your snippet to be:
AppSyncSchema:
Type: "AWS::AppSync::GraphQLSchema"
Properties:
DefinitionS3Location: s3://my-bucket/api/schema.graphql
ApiId: !GetAtt [ AppSyncAPI, ApiId ]
Then when you run cfpack deploy
command, it will prepare artifacts and upload it to s3 bucket first, then will trigger CloudFormation stack update. Does it make sense to you?
from cfpack.
Hi @jonlorusso
could you please show me your template? cfpack
uses AWS Node.js API, so I am sure that it is possible to upload something to a s3 bucket. Just want to see your template as an example of a use case.
from cfpack.
So here's a snippet:
AppSyncSchema:
Type: "AWS::AppSync::GraphQLSchema"
Properties:
DefinitionS3Location: schema.graphql
ApiId: !GetAtt [ AppSyncAPI, ApiId ]
When I run the aws cloudformation package
command, the schema.graphql
file is uploaded to S3 and the template is modified:
Properties:
ApiId:
Fn::GetAtt:
- AppSyncAPI
- ApiId
DefinitionS3Location: s3://mystackname/db7c9d50e4e8e71d3653438745db5fd8
from cfpack.
Hi @jonlorusso
the new version has been just published. It contains functionality that allows to upload artifacts before updating CloudFormation stack. Please, let me know if it help.
https://github.com/eugene-manuilov/cfpack#artifacts-1
from cfpack.
Closing this task now. Feel free to open a new one if you have anything else.
from cfpack.
Related Issues (10)
- Support ignore empty changesets when deploying HOT 2
- YAMLException with !Sub HOT 1
- false-positive JSON size error from AWS HOT 3
- Supporting the Package command? HOT 1
- Deploy doesn't update Lambdas when using artifacts HOT 2
- Artifacts command uploads with doubled up path and backslashes for Windows 10 HOT 2
- Use Previous Value for parameters?
- Add ability to upload template to S3 HOT 1
- can i get a working example of a project for appsync resolvers and lamba functions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfpack.