rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

Lambda Functions & Api Gateway Not Created #354

Closed curreta closed 5 years ago

curreta commented 5 years ago

Checklist

My Environment

Software Version
Operating System Windows 10 (using WSL Ubuntu)
Jets 2.1.1
Ruby ruby 2.5.3p105

Behaviour

I'm attempting to deploy the basic CRUD Posts app. The log below shows what seems to be a successful deploy, but no lambda functions or api gateway show in aws console. I'm logged into aws-cli using an Administrator IAM. My routes file same as example crud app.

See deploy log below:

Deploy Log ``` $ jets deploy Deploying to Lambda prettypoem-dev environment... Building CloudFormation templates. Deploying CloudFormation stack with jets app! 11:34:21AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack prettypoem-dev User Initiated 11:34:23AM CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket 11:34:24AM CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket Resource creation Initiated 11:34:44AM CREATE_COMPLETE AWS::S3::Bucket S3Bucket 11:34:46AM CREATE_COMPLETE AWS::CloudFormation::Stack prettypoem-dev Stack success status: CREATE_COMPLETE Time took for stack deployment: 26s. The /tmp/jets/prettypoem/cache folder exists. Incrementally re-building the jets using the cache. To clear the cache: rm -rf /tmp/jets/prettypoem/cache => Compling assets in current project directory => yarn install yarn install v1.17.3 warning package.json: No license field warning No license field [1/4] Resolving packages... success Already up-to-date. Done in 0.42s. => JETS_ENV=development bin/webpack Hash: 7f2dad7029f7667c3401 Version: webpack 4.39.2 Time: 2391ms Built at: 2019-08-23 11:32:15 Asset Size Chunks Chunk Names css/theme-b032cfb3.css 252 bytes theme [emitted] theme css/theme-b032cfb3.css.map 564 bytes theme [emitted] theme js/application-1ed0ad6855b65204cf66.js 7.3 KiB application [emitted] application js/application-1ed0ad6855b65204cf66.js.map 7.04 KiB application [emitted] application js/theme-8d93dc0cc7011472ae21.js 3.93 KiB theme [emitted] theme js/theme-8d93dc0cc7011472ae21.js.map 3.61 KiB theme [emitted] theme manifest.json 901 bytes [emitted] Entrypoint application = js/application-1ed0ad6855b65204cf66.js js/application-1ed0ad6855b65204cf66.js.map Entrypoint theme = css/theme-b032cfb3.css js/theme-8d93dc0cc7011472ae21.js css/theme-b032cfb3.css.map js/theme-8d93dc0cc7011472ae21.js.map [./app/javascript/packs/application.js] 550 bytes {application} [built] [./app/javascript/packs/theme.scss] 39 bytes {theme} [built] [./app/javascript/src/jets/crud.js] 2.24 KiB {application} [built] + 1 hidden module Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--7-1!node_modules/postcss-loader/src/index.js??ref--7-2!node_modules/sass-loader/dist/cjs.js??ref--7-3!app/javascript/packs/theme.scss: Entrypoint mini-css-extract-plugin = * [./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/dist/cjs.js?!./app/javascript/packs/theme.scss] ./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./app/javascript/packs/theme.scss 985 bytes {mini-css-extract-plugin} [built] + 1 hidden module => Copying current project directory to temporary build area: /tmp/jets/prettypoem/stage/code => Reconfiguring webpacker development settings for AWS Lambda. => Bundling: running bundle install in cache area: /tmp/jets/prettypoem/cache. => cd /tmp/jets/prettypoem/cache && env BUNDLE_IGNORE_CONFIG=1 bundle install --path /tmp/jets/prettypoem/cache/vendor/gems --without development test Using rake 12.3.3 Using concurrent-ruby 1.1.5 Using i18n 1.6.0 Using minitest 5.11.3 Using thread_safe 0.3.6 Using tzinfo 1.2.5 Using zeitwerk 2.1.9 Using activesupport 6.0.0 Using builder 3.2.3 Using erubi 1.8.0 Using mini_portile2 2.4.0 Using nokogiri 1.10.4 Using rails-dom-testing 2.0.3 Using crass 1.0.4 Using loofah 2.2.3 Using rails-html-sanitizer 1.2.0 Using actionview 6.0.0 Using rack 2.0.7 Using rack-test 1.1.0 Using actionpack 6.0.0 Using globalid 0.4.2 Using activejob 6.0.0 Using mini_mime 1.0.2 Using mail 2.7.1 Using actionmailer 6.0.0 Using activemodel 6.0.0 Using activerecord 6.0.0 Using aws-eventstream 1.0.3 Using aws-partitions 1.205.0 Using aws-sigv4 1.1.0 Using jmespath 1.4.0 Using aws-sdk-core 3.64.0 Using aws-sdk-apigateway 1.34.0 Using aws-sdk-cloudformation 1.25.0 Using aws-sdk-cloudwatchlogs 1.25.0 Using aws-sdk-dynamodb 1.34.0 Using aws-sdk-kinesis 1.19.0 Using aws-sdk-kms 1.24.0 Using aws-sdk-lambda 1.29.0 Using aws-sdk-s3 1.46.0 Using aws-sdk-sns 1.19.0 Using aws-sdk-sqs 1.21.0 Using aws-sdk-ssm 1.54.0 Using bundler 2.0.2 Using cfnresponse 0.4.0 Using dotenv 2.7.5 Using dynomite 1.2.2 Using json 2.2.0 Using gems 1.1.1 Using hashie 3.6.0 Using jets-gems 0.1.0 Using jets-html-sanitizer 1.0.4 Using kramdown 2.1.0 Using memoist 0.16.0 Using mimemagic 0.3.3 Using method_source 0.9.2 Using thor 0.20.3 Using railties 6.0.0 Using rainbow 3.0.0 Using recursive-open-struct 1.1.0 Using shotgun 0.9.2 Using text-table 1.2.4 Using jets 2.1.1 Using pg 1.1.4 Using rack-proxy 0.6.5 Using webpacker 3.2.0 from https://github.com/tongueroo/webpacker.git (at jets@1a012c9) Bundle complete! 11 Gemfile dependencies, 66 gems now installed. Gems in the groups development and test were not installed. Bundled gems are installed into `./vendor/gems` Bundle install success. Tidying project: removing ignored files to reduce package size. => rsync -a --links /tmp/jets/prettypoem/stage/code/vendor/gems/ruby/2.5.0/ /tmp/jets/prettypoem/stage/opt/ruby/gems/2.5.0/ => Replacing compiled gems with AWS Lambda Linux compiled versions: /tmp/jets/prettypoem/stage/opt Checking projects gems for binary Lambda gems... => Generating shims in the handlers folder. => Creating zip file for /tmp/jets/prettypoem/stage/opt => cd /tmp/jets/prettypoem/stage/opt && zip --symlinks -rq opt.zip . Zip file created at: /tmp/jets/prettypoem/stage/zips/opt-5ed35093.zip (22.8 MB) => Creating zip file for /tmp/jets/prettypoem/stage/code => cd /tmp/jets/prettypoem/stage/code && zip --symlinks -rq code.zip . Zip file created at: /tmp/jets/prettypoem/stage/zips/code-40c3d833.zip (150 KB) Building CloudFormation templates. Uploading CloudFormation templates to S3. Uploading code zip files to S3. Uploading /tmp/jets/prettypoem/stage/zips/code-40c3d833.zip (150 KB) to S3 Uploaded to s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/code/code-40c3d833.zip Time to upload code to s3: 0s Uploading /tmp/jets/prettypoem/stage/zips/opt-5ed35093.zip (22.8 MB) to S3 Uploaded to s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/code/opt-5ed35093.zip Time to upload code to s3: 1s Checking for modified public assets and uploading to S3. Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/favicon.ico Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/404.html Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/500.html Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/422.html Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/index.html Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/css/theme-b032cfb3.css.map Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/css/theme-b032cfb3.css Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/js/theme-8d93dc0cc7011472ae21.js.map Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/js/application-1ed0ad6855b65204cf66.js Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/js/application-1ed0ad6855b65204cf66.js.map Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/js/theme-8d93dc0cc7011472ae21.js Uploading s3://prettypoem-dev-s3bucket-XXXXXXXXXX/jets/public/packs/manifest.json Time for public assets to s3: 0s Deploying CloudFormation stack with jets app! 11:36:07AM UPDATE_IN_PROGRESS AWS::CloudFormation::Stack prettypoem-dev User Initiated 11:36:13AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack ApiGateway 11:36:13AM CREATE_IN_PROGRESS AWS::Lambda::LayerVersion GemLayer 11:36:13AM CREATE_IN_PROGRESS AWS::IAM::Role IamRole 11:36:13AM CREATE_IN_PROGRESS AWS::IAM::Role IamRole Resource creation Initiated 11:36:14AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack ApiGateway Resource creation Initiated 11:36:28AM CREATE_IN_PROGRESS AWS::Lambda::LayerVersion GemLayer Resource creation Initiated 11:36:29AM CREATE_COMPLETE AWS::Lambda::LayerVersion GemLayer 11:36:32AM CREATE_COMPLETE AWS::IAM::Role IamRole 11:36:35AM CREATE_COMPLETE AWS::CloudFormation::Stack ApiGateway 11:36:36AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack JetsPreheatJob 11:36:37AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack JetsPreheatJob Resource creation Initiated 11:36:38AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack JetsPublicController 11:36:38AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack PostsController 11:36:39AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack PostsController Resource creation Initiated 11:36:39AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack JetsPublicController Resource creation Initiated 11:37:13AM CREATE_COMPLETE AWS::CloudFormation::Stack PostsController 11:37:13AM CREATE_COMPLETE AWS::CloudFormation::Stack JetsPublicController 11:37:16AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack ApiDeployment20190823113324 11:37:17AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack ApiDeployment20190823113324 Resource creation Initiated 11:37:27AM CREATE_COMPLETE AWS::CloudFormation::Stack ApiDeployment20190823113324 11:38:31AM CREATE_COMPLETE AWS::CloudFormation::Stack JetsPreheatJob 11:38:32AM UPDATE_COMPLETE_CLEANUP_IN_PROGRESS AWS::CloudFormation::Stack prettypoem-dev 11:38:33AM UPDATE_COMPLETE AWS::CloudFormation::Stack prettypoem-dev Stack success status: UPDATE_COMPLETE Time took for stack deployment: 2m 30s. Prewarming application. API Gateway Endpoint: https://i4li58c181.execute-api.us-west-2.amazonaws.com/dev/ ```
curreta commented 5 years ago

Closing this issue: Turns out I was looking at the wrong region in AWS Console (didn't know that was a thing)

tongueroo commented 5 years ago

For posterity:

And TLDR for folks:

aws lambda list-functions