By using AWS re:Post, you agree to the Terms of Use
Questions in Front-End Web & Mobile
Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Unknown reason for API Gateway WebSocket LimitExceededException

We have several API Gateway WebSocket APIs, all regional. As their usage has gone up, the most used one has started getting LimitExceededException when we send data from Lambda, through the socket, to the connected browsers. We are using the javascript sdk's [postToConnection](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ApiGatewayManagementApi.html#postToConnection-property) function. The usual behavior is we will not get this error at all, then we will get several hundred spread out over 2-4 minutes. The only documentation we've been able to find that may be related to this limit is the [account level quota](https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html#apigateway-account-level-limits-table) of 10,000 per second (and we're not sure if that's the actual limit we should be looking at). If that is the limit, the problem then is that we are nowhere near it. For a single deployed API we're hitting a maximum of 3000 messages sent through the socket **per minute** with an overall account total of about 5000 per minute. So nowhere near the 10,000 per second. The only thing we think may be causing it is we have a "large" number messages going through the socket relative to the number of connected clients. For the api that's maxing at about 3000 messages per minute, we usually have 2-8 connected clients. Our only guess is there may be a lower limit to number of messages per second we can send to a specific socket connection, however we cannot find any docs on this. Thanks for any help anyone can provide
1
answers
0
votes
29
views
asked 2 days ago

5 Question about dedicated IP Address vs Shared IP address in Amazon SES

HI, I have 5 question about Dedicated IP with Amazon SES: 1. Why exactly they recommend 2 dedicated IP? What happens if I start only with 1 IP? Can you give me some examples of the differences? 2. I understand that by default the warm-up is automatically, right? So, if I send to my list of 40,000 emails, 3 newsletters per week (120,000 emails per week), on each send of 40,000 the system automatically will send 1,000 emails from my new dedicate IP, and 39,000 from the shared IPs? That right? And it will increase the proportion on each send gradually.... but my main point here is... I don't have to do anything right?, I can continue with my normal sending, whole list, 3 times per week, and the system in the background will do the work to warm up gradually automatically? So, after this, we can continue with normal sending tactics. 3. For my sending: 3 times per week, 40k email, and maybe upgrading to 5 times per week gradually, is the best to have Dedicate IP vs not having? 4. My only problem that made me change shared IP to Dedicated Ip, it's that in Microsoft (Hotmail and Outlook), 100% of the email go to SPAM, and I don't know why... because same email sending from Active Campaing work perfect... This change to dedicate IP, will solve this? Or there is another way to solve this huge problem without change to dedicated IP? 5. If for any reaseon, the dedicated IP doesn't result well to my business, I can back to shared IP like now, and that change from Dedicated IP to Shared IP again, doesn't affect the deliverabily on any bad way? Looking forward your replies, Thanks in advance, Best regards, Sebastian
0
answers
0
votes
3
views
asked 11 days ago

NextJS app fails during Amplify CI/CD deployment

I have a NextJS app that uses SSR. Therefore manual deployment is not an option. I have setup Amplify hosting for the app. Deployment (initiated by GitHub push) fails due: ``` Must use import to load ES Module: /codebuild/output/.../src/aws-exports.js require() of ES modules is not supported. require() of /codebuild/output/src531993483/src/myidtoken/src/aws-exports.js from /snapshot/repo/build/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename aws-exports.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /codebuild/output/src531993483/src/myidtoken/package.json. 2022-05-10T13:24:35.567Z [INFO]: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /codebuild/output/src531993483/src/myidtoken/src/aws-exports.js require() of ES modules is not supported. require() of /codebuild/output/src531993483/src/myidtoken/src/aws-exports.js from /snapshot/repo/build/node_modules/amplify-frontend-javascript/lib/frontend-config-creator.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename aws-exports.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /codebuild/output/src531993483/src/myidtoken/package.json. ``` I do not have aws-exports.js committed to GitHub. So aws-exports.js is generated during the build/deploy. Therefore I cannot rename it to `.csj`. I have tried though creating `my-aws-exports.js` and include that from my code. However, the error is still the same. This also sounds to me that the error is in generated code. Repository is not unfortunately public so I cannot share it. I'm using - react 17 - next 12 - aws-amplify 4.3.21 - aws-sdk 2.1131.0 `package.json` states ` "type": "module",`.
1
answers
0
votes
10
views
asked 11 days ago

Device Farm Video is not showing application interaction

Hi, I am running my test on device farm. From the test specification log, it shows that my test has passed. However from the video recording, it is always stuck on the default mobile homescreen. How do i get the video recording to capture the test interaction instead of just the homescreen. thanks! ``` [TestNG] INVOKING CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @BeforeTest Tests.LoginTest.setUpPage() [TestNG] PASSED CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @BeforeTest Tests.LoginTest.setUpPage() finished in 118 ms [Invoker 1508395126] Keeping method TestBase.navigateTo()[pri:0, instance:Tests.LoginTest@15975490] for class [TestClass name=class Tests.LoginTest] [Invoker 1508395126] Invoking @BeforeClass TestBase.navigateTo()[pri:0, instance:Tests.LoginTest@15975490] [TestNG] INVOKING CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @BeforeClass Tests.AbstractBaseTests.TestBase.navigateTo() [TestNG] PASSED CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @BeforeClass Tests.AbstractBaseTests.TestBase.navigateTo() finished in 2846 ms [Invoker 1508395126] Keeping method LoginTest.logOut()[pri:0, instance:Tests.LoginTest@15975490] for class [TestClass name=class Tests.LoginTest] [TestNG] INVOKING: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - Tests.LoginTest.loginFail() [Invoker 1508395126] Invoking Tests.LoginTest.loginFail [TestNG] PASSED: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - Tests.LoginTest.loginFail() finished in 7446 ms [Invoker 1508395126] Keeping method LoginTest.logOut()[pri:0, instance:Tests.LoginTest@15975490] for class [TestClass name=class Tests.LoginTest] [Invoker 1508395126] Invoking @AfterMethod LoginTest.logOut()[pri:0, instance:Tests.LoginTest@15975490] [TestNG] INVOKING CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @AfterMethod Tests.LoginTest.logOut() [TestNG] PASSED CONFIGURATION: "Command line test eca2ebbd-c83a-4609-84f0-bb52a16b1afc" - @AfterMethod Tests.LoginTest.logOut() finished in 827 ms [Invoker 1508395126] Keeping method LoginTest.logOut()[pri:0, instance:Tests.LoginTest@15975490] for class [TestClass name=class Tests.LoginTest] ```
0
answers
0
votes
2
views
asked 12 days ago
0
answers
0
votes
7
views
asked 14 days ago

I'd like to request to S3 as a cognito certification qualification.

I'd like to request to S3 as a cognito certification qualification. S3 is using sdk Cognito is using amplify. Use an angular typescript. I would like to replace the secret key with the cognito authentication information when creating S3. I want to access s3 with the user I received from Auth.signIn, but the credentials are missing. I need your help. ``` public signIn(user: IUser): Promise<any> { return Auth.signIn(user.email, user.password).then((user) => { AWS.config.region = 'ap-northeast-2'; AWS.config.credentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId: 'ap-northeast-2:aaaaaaaa-bbbb-dddd-eeee-ffffffff', }); const userSession = Auth.userSession(user); const idToken = userSession['__zone_symbol__value']['idToken']['jwtToken']; AWS.config.region = 'ap-northeast-2'; AWS.config.credentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId: 'ap-northeast-2:aaaaaaaa-bbbb-dddd-eeee-ffffffff', RoleArn: 'arn:aws:iam::111111111111:role/Cognito_role', Logins: { CognitoIdentityPool: 'ap-northeast-2:aaaaaaaa-bbbb-dddd-eeee-ffffffff', idToken: idToken, }, })); const s3 = new AWS.S3({ apiVersion: '2012-10-17', region: 'ap-northeast-2', params: { Bucket: 'Bucketname', }, }); s3.config.credentials.sessionToken = user.signInUserSession['accessToken']['jwtToken']; s3.listObjects(function (err, data) { if (err) { return alert( 'There was an error: ' + err.message ); } else { console.log('***********s3List***********', data); } }); } ``` bucket policy ``` { "Version": "2012-10-17", "Id": "Policy", "Statement": [ { "Sid": "AllowIPmix", "Effect": "Allow", "Principal": "*", "Action": "*", "Resource": "arn:aws:s3:::s3name/*", } ] } ``` cognito Role Policies - AmazonS3FullAccess ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:*", ], "Resource": "*" } ] } ```
0
answers
0
votes
5
views
asked 16 days ago

Webdriver testcases are failing while setting connection

Trying to deploy a basic webdriver.io + nodejs test on devicefarm but always for ios device test cases are getting stuck at Testcase is failing: job arn: arn:aws:devicefarm:us-west-2:612756076442:job:02bd6c95-640d-43b3-82eb-6f618777ac73/1a6364f3-7528-44b1-afa1-d6c2dc51d881/00000 ``` 2022-05-04T22:40:58.353Z ERROR @wdio/runner: Error: Failed to create session. [0-0] Unable to connect to "http://localhost:4723/", make sure browser driver is running on that address. [0-0] If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver. [0-0] at startWebDriverSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriver/build/utils.js:72:15) [0-0] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [0-0] at async Function.newSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriver/build/index.js:46:45) [0-0] at async remote (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/webdriverio/build/index.js:77:22) [0-0] at async Runner._startSession (/private/tmp/scratchY4h2F6.scratch/test-packagex5aknf/node_modules/integration/node_modules/@wdio/runner/build/index.js:223:56) ``` and for android testcases is asking for node version greater than 12 (after adding nvm install 18.1.0 in yaml)
0
answers
0
votes
1
views
asked 17 days ago
1
answers
0
votes
2
views
asked 19 days ago

Storing/representing a hierarchical tree used for navigation within an Amplify web app and AppSync GraphQL API layer.

Hi, **TL;DR: Can anyone give a recommend approach to storing customisable n-level hierarchy trees for grouping and navigating results via a frontend Amplify-powered web app (using DynamoDB or any other database solution that can be mapped to AppSync ideally)?** **Some background** I'm building an multi-tenant IoT analytics solution that takes data from some sensors out in the field, uploads to AWS, processes this data and stores in a DynamoDB table (i.e. a very "standard" setup). I'm planning on adding a web frontend (built using Amplify and an AppSync GraphQL layer) that will allow users to navigate a **customisable, n-level** hierarchy tree of assets, in order to view the sensor data we've collected. Examples of valid hierarchies include: Country -> Site -> Building -> Floor -> Room -> Sensor (6-level) or Site -> Building -> Room -> Sensor (4-level) etc. The important thing here, is that this hierarchy tree can differ per customer, and needs to be customisable on a tenant-by-tenant basis, but we don't need to do any complex analysis or navigation of relationships between hierarchy levels (so, to me, something like Amazon Neptune or another graph database feels a bit overkill, but perhaps I’m wrong). My first thought was to try and build a hierarchical relationship inside of a DynamoDB table, possibly making use of a GSI to provide this, but in all of the examples I’ve seen online, the focus is very much on quick retrieval, but not so quick updating of hierarchy trees – now, whilst it’s unlikely that these tree structures would be updated on a regular basis, it is something we need to be able to support, so the idea of possibly updating ‘000s of rows in DynamoDB every time we want to make a change to the hierarchy tree for a given control area doesn’t seem quite right to me. Hence, my question above. I'm ideally looking for guidance on how to structure a DDB table to best support BOTH optimal retrieval of, and updates to, hierarchy trees in our application, but if DDB isn't the right answer here, then suggestions of alternatives would also be greatly appreciated. Many thanks in advance.
1
answers
0
votes
5
views
asked 20 days ago
  • 1
  • 90 / page