by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Demian Sims
    @dsound-zz
    Anyone here?
    Ok a new problem:
    on jets deploy I'm getting this error:
    02:08:20PM CREATE_FAILED AWS::CloudFormation::Stack ApiGateway Embedded stack arn:aws:cloudformation:us-east-1:943364261381:stack/tml-dashboard-api-dev-ApiGateway-MO8P3JOQ78TE/071f8930-9b8e-11ea-a746-0e3038696552 was not successfully created: The following resource(s) failed to create: [RestApi]. 02:08:20PM CREATE_FAILED AWS::IAM::Role IamRole Resource creation cancelled
    Demian Sims
    @dsound-zz
    And got that one too! LOL
    Had to have the correct ARN in ~/.aws/config set for the IAM role
    Harry Metcalfe
    @harry-m
    Hello! I have a question. I'm playing with Jets and keen to use it for a project we're starting, but we have third party binary dependencies. I'm not sure if Jets/Lamda can support that. Basically: we need to exec() terminal commands and parse their output. I couldn't see anything in the docs about how we might package everything up and get it deployed. Is this doable? Can anyone point me the right way?
    Harry Metcalfe
    @harry-m
    Demian
    @demian_sims_twitter
    Really need help creating my postgres db on rds db
    keeps timing out
    I've configured everything on my AWS account.
    and using an .env file
    Demian
    @demian_sims_twitter
    Anyone around?
    nuheluxulu
    @nuheluxulu
    testing
    nuheluxulu
    @nuheluxulu
    ANyone created a DB in AWS yet? Can’t get my rubyonjets to connect to it
    Shakeeb Ahmad
    @shkbahmad
    Created a RDS Postgres instance - connected fine with it
    With the default closed to public and open to connect from anywhere
    DATABASE_URL=postgres://uname:pass@hostname:5432/dbname?pool=5 in .env.development.remote
    @nuheluxulu
    Shakeeb Ahmad
    @shkbahmad
    Does any one know of any online code examples for a complete solution using Jets with Cognito though? Having trouble figuring that out.
    hamza-sondermarketing
    @hamza-sondermarketing
    @demian_sims_twitter You need to update the inbound and outbound rules for the database in AWS. The reason for getting timeout is that the application is not allowed to connect to DB.
    nuheluxulu
    @nuheluxulu
    @shkbahmad no special vpc stuff? how do yu do a db create?
    1gn0r4nd
    @1gn0r4nd_twitter
    @shkbahmad i can help with cognito. Are you on something else except fitter though?
    nuheluxulu
    @nuheluxulu
    @shkbahmad My VPC is setup on my lambda, I have a securitygroup that permits me to acces my postgres RDS on 5432/TCP. How do I you run the jets db:create and jets db:migrate?
    nuheluxulu
    @nuheluxulu
    @hamza-sondermarketing I still get timeouts, but I think its reaching my DB now. Not sure how toverify though
    nuheluxulu
    @nuheluxulu
    maybe my permissions aren’t correct. These are my policies: https://rubyonjets.com/docs/extras/minimal-deploy-iam/
    Shakeeb Ahmad
    @shkbahmad
    @nuheluxulu I used the default aws vpc. Created a new security group with the default options, Created a db on RDS and then gave the url string to my jets app. After that when ever I run a migration for example from my local with JETS ENV REMOTE set to TRUE it runs just fine on RDS.
    @1gn0r4nd_twitter what wrong with gitter? I just want to understand how to get the currently authorized user after the cognito authorizer? I have to decode the JWT right? How do I get hold of that JWT?
    nuheluxulu
    @nuheluxulu
    @shkbahmad what are you coding with for cognito? JS?
    @shkbahmad also I had to create a VPC endpoint to allow cloud formation to access the database.
    @shkbahmad with js I use amplify to connect to cognito: https://docs.amplify.aws/lib/auth/emailpassword/q/platform/js#sign-in
    Tad Thorley
    @phaedryx_gitlab
    I'm looking through the docs now. Can anyone point me to an example of login/logout and tracking a user between requests?
    Tad Thorley
    @phaedryx_gitlab
    Any direction on this issue jets new demo -> cannot load such file -- zeitwerk
    Gardner Bickford
    @gardner
    @nuheluxulu amplify adds too many kb to the bundle size. If you just want auth, you can use https://github.com/aws-amplify/amplify-js/tree/master/packages/amazon-cognito-identity-js
    What is the best way to convince Afterburner mode to use a VPC?
    Gardner Bickford
    @gardner
    Answer: Using Megamode allows a rails app to be configured to use a VPC :tada:
    Antoine MACIA
    @antoinemacia

    Hi everybody,

    Has anyone ran into this error when connected to an RDS DB -> FATAL: sorry, too many clients already using jets?
    It seems like the DB connections were exhausted, but they all have seemed to hang and would not be decommisioned
    Reading the docs, it seems tweaking the connection pool like in a rails app would have no effect, but could be wrong

    Any idea on the best way to overcome such in serverless, and this is something addressable through the configuration?

    Thanks!

    PIP
    @pinpudding
    Hello everybody, we are running to an issue using Afterburner. For some reason only a subset of our gems gets loaded in production. jets console works fine (loading ±100 gems) but on AWS only the following gems get loaded: ["rake-13.0.1", "concurrent-ruby-1.1.6", "i18n-1.8.3", "minitest-5.14.1", "thread_safe-0.3.6", "tzinfo-1.2.7", "zeitwerk-2.3.1", "activesupport-6.0.3.2", "builder-3.2.4", "erubi-1.9.0", "mini_portile2-2.4.0", "nokogiri-1.10.9", "rails-dom-testing-2.0.3", "crass-1.0.6", "loofah-2.6.0", "rails-html-sanitizer-1.3.0", "actionview-6.0.3.2", "rack-2.2.3", "rack-test-1.1.0", "actionpack-6.0.3.2", "globalid-0.4.2", "activejob-6.0.3.2", "mini_mime-1.0.2", "mail-2.7.1", "actionmailer-6.0.3.2", "activemodel-6.0.3.2", "activerecord-6.0.3.2", "aws-eventstream-1.1.0", "aws-partitions-1.337.0", "aws-sigv4-1.2.1", "jmespath-1.4.0", "aws-sdk-core-3.103.0", "aws_config-0.1.0", "memoist-0.16.2", "rainbow-3.0.0", "thor-1.0.1", "aws-mfa-secure-0.4.2", "aws-sdk-apigateway-1.47.0", "aws-sdk-cloudformation-1.40.0", "aws-sdk-cloudwatchlogs-1.33.0", "aws-sdk-dynamodb-1.50.0", "aws-sdk-kinesis-1.25.0", "aws-sdk-kms-1.35.0", "aws-sdk-lambda-1.45.0", "aws-sdk-s3-1.72.0", "aws-sdk-sns-1.26.0", "aws-sdk-sqs-1.29.0", "aws-sdk-ssm-1.83.0", "bundler-2.1.4", "cfn_camelizer-0.4.9", "cfnresponse-0.4.0", "dotenv-2.7.5", "gems-1.2.0", "hashie-4.1.0", "jets-gems-0.2.2", "jets-html-sanitizer-1.0.4", "rexml-3.2.4", "kramdown-2.3.0", "mimemagic-0.3.5", "method_source-1.0.0", "railties-6.0.3.2", "recursive-open-struct-1.1.2", "shotgun-0.9.2", "text-table-1.2.4", "jets-2.3.16"] .
    How do I get all gems to load properly?
    Gustavo
    @gugaiz

    Hi, I am starting with Jets and I started my first test app as jets new cron --mode job --database=postgresql I wrote some code on app/jobs/application_job.rb and then I did jets deploy and it only deployed the S3 resource and the IAM role but nothing else. If I check the cloudformation it created only those two resources. Here you can see the output

    $ AWS_REGION=us-east-2 jets deploy
    Deploying to Lambda cron-with-jet-dev environment...
    Building CloudFormation templates.
    Generated CloudFormation templates at /tmp/jets/cron_with_jet/templates
    Deploying CloudFormation stack with jets app!
    Waiting for stack to complete
    08:34:26PM CREATE_IN_PROGRESS AWS::CloudFormation::Stack cron-with-jet-dev User Initiated
    08:34:29PM CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket 
    08:34:30PM CREATE_IN_PROGRESS AWS::S3::Bucket S3Bucket Resource creation Initiated
    08:34:51PM CREATE_COMPLETE AWS::S3::Bucket S3Bucket 
    08:34:52PM CREATE_COMPLETE AWS::CloudFormation::Stack cron-with-jet-dev 
    Stack success status: CREATE_COMPLETE
    Time took for stack deployment: 31s.
    => Compling assets in current project directory
    => Copying current project directory to temporary build area: /tmp/jets/cron_with_jet/stage/code
    => Reconfiguring webpacker development settings for AWS Lambda.
    du: no se puede acceder a '/tmp/jets/cron_with_jet/stage/opt': No existe el archivo o el directorio
    => Generating shims in the handlers folder.
    => Creating zip file for /tmp/jets/cron_with_jet/stage/code
    => cd /tmp/jets/cron_with_jet/stage/code && zip --symlinks -rq code.zip .
    Zip file created at: /tmp/jets/cron_with_jet/stage/zips/code-779e0771.zip (38 KB)
    Building CloudFormation templates.
    Generated CloudFormation templates at /tmp/jets/cron_with_jet/templates
    Uploading CloudFormation templates to S3.
    Uploading code zip files to S3.
    Uploading /tmp/jets/cron_with_jet/stage/zips/code-779e0771.zip (38 KB) to S3
    Uploaded to s3://cron-with-jet-dev-s3bucket-1vtkk3ai7yl1e/jets/code/code-779e0771.zip
    Time to upload code to s3: 2s
    Checking for modified public assets and uploading to S3.
    Time for public assets to s3: 0s
    Deploying CloudFormation stack with jets app!
    Waiting for stack to complete
    08:35:11PM UPDATE_IN_PROGRESS AWS::CloudFormation::Stack cron-with-jet-dev User Initiated
    08:35:14PM CREATE_IN_PROGRESS AWS::IAM::Role IamRole 
    08:35:14PM CREATE_IN_PROGRESS AWS::IAM::Role IamRole Resource creation Initiated
    08:35:29PM CREATE_COMPLETE AWS::IAM::Role IamRole 
    08:35:31PM UPDATE_COMPLETE_CLEANUP_IN_PROGRESS AWS::CloudFormation::Stack cron-with-jet-dev 
    08:35:31PM UPDATE_COMPLETE AWS::CloudFormation::Stack cron-with-jet-dev 
    Stack success status: UPDATE_COMPLETE
    Time took for stack deployment: 21s.

    Any ideas why it didn't create the other resources?

    Gustavo
    @gugaiz
    Is this channel active? does not seems it is... is there any other place to ask?
    nuheluxulu
    @nuheluxulu
    How do you upgrade your Gemfile.lock?
    I keep getting errors like: You have already activated aws-sdk-core 3.103.0, but your Gemfile requires aws-sdk-core 3.99.2. Prepending bundle exec to your command may solve this.
    and then I manually search in the lock file for the gemfile
    @gugaiz I;ve never only done a job
    Going to try and add a job to my api soon
    Paul Dailly
    @pauldailly

    Hi folks. I've run into an interesting issue around shared SQS + DLQs. If I declare an SQS queue as a shared resource and try to reference a DLQ, which is also a shared resource, such as:

    class StripeWebhooksQueue < Jets::Stack
      include Jets::AwsServices
    
      depends_on :stripe_webhooks_dead_letter_queue
    
      sqs_queue(:stripe_webhooks, message_retention_period: 1209600, 
        redrive_policy: {
          dead_letter_target_arn: ref(:stripe_webhooks_dlq),
          max_receive_count: 10
        }
      )
    end

    It seems the DLQ is never bound to the SQS queue. However, if the SQS queue is declared in a specific job instead, such as:

    depends_on :stripe_webhooks_dead_letter_queue
      sqs_event(:generate_queue, 
        queue_properties: {
          message_retention_period: 1209600, 
          redrive_policy: {
            dead_letter_target_arn: ref(:stripe_webhooks_dlq),
            max_receive_count: 10
          }
        }
      )

    The DLQ ref is resolved and the DLQ is bound to the SQS queue. Has anyone encountered this before or is there something I'm doing wrong in my setup?

    PIP
    @pinpudding
    hello dear community. we are stuck on a production project and could really use help. we are trying to deploy our job and keep failing with this message 'The following resource(s) failed to create: [PopulateEventSourceMapping, PopulatePermission].' . has anyone seen this/
    Stella Rouzi
    @differentreality
    Hi all! I'm having some issues testing my rubyonjets application. I can't get the controller test to pass params to the call it's making. I've already tried a few alternatives to this:
    post '/custom_action', myvar: 'test_value'