Question: AWS Greengrass errors setting jvmOptions

"I'm having memory issues with a greengrass core device. Every two days he starts having memory heap space problems.The device has these characteristics (4GB RAM and Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux):Arquitectura:                        x86_64modo(s) de operación de las CPUs:    32-bit, 64-bitOrden de los bytes:                  Little EndianTamaños de las direcciones:          39 bits physical, 48 bits virtualCPU(s):                              2Lista de la(s) CPU(s) en línea:      0,1Hilo(s) de procesamiento por núcleo: 1Núcleo(s) por «socket»:              2«Socket(s)»                          1Modo(s) NUMA:                        1ID de fabricante:                    GenuineIntelFamilia de CPU:                      6Modelo:                              92Nombre del modelo:                   Intel(R) Celeron(R) CPU N3350 @ 1.10GHzRevisión:                            9CPU MHz:                             1591.854CPU MHz máx.:                        2400,0000CPU MHz mín.:                        800,0000BogoMIPS:                            2188.80Virtualización:                      VT-xCaché L1d:                           48 KiBCaché L1i:                           64 KiBCaché L2:                            2 MiBCPU(s) del nodo NUMA 0:              0,1It has the following components installed:eu.bluece.SubscribeParsePublishIoT1.0.1 (custom component)aws.greengrass.Cli2.9.1aws.greengrass.Cloudwatch3.1.0aws.greengrass.DeviceDefender3.1.1aws.greengrass.LogManager2.3.0aws.greengrass.Nucleus2.9.1aws.greengrass.SystemsManagerAgent1.0.0aws.greengrass.clientdevices.Auth2.3.1aws.greengrass.clientdevices.IPDetector2.1.5aws.greengrass.clientdevices.mqtt.Bridge2.2.4aws.greengrass.clientdevices.mqtt.Moquette2.3.0Looking for information about, I found this recomendation:  https://docs.amazonaws.cn/en_us/greengrass/v2/developerguide/configure-greengrass-core-v2.html#jvm-tuning but I'm having problems to apply them.In my nucleus config I'm trying the following configuration:{"jvmOptions": "-Xmx32m -XX:+UseSerialGC -Xint","logging": {"level": "INFO","format": "TEXT"}}When the deployment restarts I find the following errors:2023-01-16T23:50:30.243Z [ERROR] (main) com.aws.greengrass.lifecyclemanager.Kernel: Cannot load service. {}com.aws.greengrass.lifecyclemanager.exceptions.ServiceLoadException: Unable to load aws.greengrass.clientdevices.Auth as a plugin        at com.aws.greengrass.lifecyclemanager.Kernel.locateExternalPlugin(Kernel.java:568)        at com.aws.greengrass.lifecyclemanager.Kernel.locateGreengrassService(Kernel.java:440)        at com.aws.greengrass.lifecyclemanager.Kernel.lambda$locateIgnoreError$3(Kernel.java:390)        at com.aws.greengrass.dependency.Context$Value.computeObjectIfEmpty(Context.java:562)        at com.aws.greengrass.lifecyclemanager.Kernel.locateIgnoreError(Kernel.java:388)        at com.aws.greengrass.lifecyclemanager.Kernel.locateGreengrassService(Kernel.java:417)        at com.aws.greengrass.lifecyclemanager.Kernel.lambda$locateIgnoreError$3(Kernel.java:390)        at com.aws.greengrass.dependency.Context$Value.computeObjectIfEmpty(Context.java:562)        at com.aws.greengrass.lifecyclemanager.Kernel.locateIgnoreError(Kernel.java:388)        at com.aws.greengrass.lifecyclemanager.Kernel.locateGreengrassService(Kernel.java:417)        at com.aws.greengrass.lifecyclemanager.Kernel.lambda$locateIgnoreError$3(Kernel.java:390)        at com.aws.greengrass.dependency.Context$Value.computeObjectIfEmpty(Context.java:562)        at com.aws.greengrass.lifecyclemanager.Kernel.locateIgnoreError(Kernel.java:388)        at com.aws.greengrass.lifecyclemanager.KernelLifecycle.launch(KernelLifecycle.java:167)        at com.aws.greengrass.lifecyclemanager.Kernel.launch(Kernel.java:244)        at com.aws.greengrass.easysetup.GreengrassSetup.performSetup(GreengrassSetup.java:349)        at com.aws.greengrass.easysetup.GreengrassSetup.main(GreengrassSetup.java:274)Caused by: java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space        at io.github.lukehutch.fastclasspathscanner.FastClasspathScanner.scan(FastClasspathScanner.java:1596)        at com.aws.greengrass.dependency.EZPlugins.lambda$loadPlugin$1(EZPlugins.java:124)        at java.base/java.security.AccessController.doPrivileged(Native Method)        at com.aws.greengrass.dependency.EZPlugins.loadPlugin(EZPlugins.java:116)        at com.aws.greengrass.lifecyclemanager.Kernel.locateExternalPlugin(Kernel.java:553)        ... 16 moreCaused by: java.lang.OutOfMemoryError: Java heap space        at java.base/java.util.Arrays.copyOf(Arrays.java:3745)        at io.github.lukehutch.fastclasspathscanner.scanner.ClassfileBinaryParser.readMore(ClassfileBinaryParser.java:110)        at io.github.lukehutch.fastclasspathscanner.scanner.ClassfileBinaryParser.skip(ClassfileBinaryParser.java:203)        at io.github.lukehutch.fastclasspathscanner.scanner.ClassfileBinaryParser.readClassInfoFromClassfileHeader(ClassfileBinaryParser.java:858)        at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathElement.parseClassfiles(ClasspathElement.java:272)        at io.github.lukehutch.fastclasspathscanner.scanner.Scanner$6.processWorkUnit(Scanner.java:417)        at io.github.lukehutch.fastclasspathscanner.scanner.Scanner$6.processWorkUnit(Scanner.java:411)        at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkLoop(WorkQueue.java:187)        at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:108)        at io.github.lukehutch.fastclasspathscanner.utils.WorkQueue.runWorkQueue(WorkQueue.java:122)        at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:410)        at io.github.lukehutch.fastclasspathscanner.scanner.Scanner.call(Scanner.java:55)        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)        at java.base/java.lang.Thread.run(Thread.java:829)2023-01-16T23:50:41.340Z [ERROR] (main) com.aws.greengrass.lifecyclemanager.Kernel: Cannot load service. {}com.aws.greengrass.lifecyclemanager.exceptions.ServiceLoadException: Unable to load aws.greengrass.clientdevices.mqtt.Moquette as a plugin2023-01-16T23:50:51.478Z [ERROR] (main) com.aws.greengrass.lifecyclemanager.Kernel: Cannot load service. {}com.aws.greengrass.lifecyclemanager.exceptions.ServiceLoadException: Unable to load aws.greengrass.Cli as a pluginAll of them don't load by Java heap space. Also this exception:2023-01-16T23:51:25.839Z [ERROR] (pool-2-thread-28) com.aws.greengrass.deployment.DeploymentService: deployment-errored. {deploymentId=e2b6289d-023c-46c3-9c6e-a800de0e0294, serviceName=DeploymentService, currentState=RUNNING}com.aws.greengrass.deployment.exceptions.ServiceUpdateException: Service aws.greengrass.clientdevices.Auth in broken state after deploymentIf I restart greengrass.service it seems to start without exceptions. But If I make a new revision of deployment fails again. The same thing happens on another device with 8 gigabytes of memory if I configure it in the kernel jvmoptions.¿Is there any way to set up jvmoptions cleaner? without exceptions?FollowComment"

Answer: "0You have configured Greengrass to allow it to use only 32MB of heap space. This is not enough space for Greengrass to operate, particularly when you're adding more plugins which will use additional heap space.You must increase this value to avoid the Java out of memory error. I would suggest a bare minimum of 64MB, though higher would be safer if you're going to use many plugins.If you have enough memory on the device, which seems to be the case with 4GB or 8GB, then do not set these JVM options, they are not needed and will cause Greengrass to run slower.CommentShareEXPERTMichaelDombrowski-AWSanswered 5 months agocespar 5 months agoYou are right, I've tested with 512m, 1024m and all of them made greengrass slower.What I don't understand is why the memory fills up periodically, 4gb is above the minimum requirements and I'm deploying many components and not very heavy.Share0Thanks for your quick response.I think I remember that with 64mb it also gave me those exceptions. I just put 128mb and it seems to work fine.Regarding your last sentence, I agree that 4gb should be enough, but every 2/3 days I run out of memory. At the level of the operating system, can the management of memory by the jvm be improved?With command free -h I have this output, I don't undesrstand the difference between free and aviable memory:$ free -h            total     used   free      shared  buff/cache   availableMem:   3,7Gi   1,3Gi   839Mi  10Mi       1,6Gi       2,1GiSwap:  976Mi  1,0Mi  975MiWhat usually happens is that the free memory tends to 0 and the problems beginRegards.CommentSharecesparanswered 5 months ago0I still have memory problems.As I said in the first post, I'm testing on two devices, in the 4 GB I have problems at 10/12 hours, in the 8 GB it lasts a few days.I have tried to change the parameters of the jvm but the system becomes very slow. Can you help me adjust the java parameters? I have debian 11 installed.Below I leave the error output when the problems start:2023-01-22T13:01:48.699Z [ERROR] (MQTT Con: mqtt-bridge-bc6y1qg0dg1) com.aws.greengrass.lifecyclemanager.KernelExceptionHandler: uncaught-exception. {thread=Thread[MQTT Con: mqtt-bridge-bc6y1qg0dg1,5,main]}java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached        at java.base/java.lang.Thread.start0(Native Method)        at java.base/java.lang.Thread.start(Thread.java:798)        at org.eclipse.paho.client.mqttv3.internal.CommsSender.start(CommsSender.java:72)        at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:728)        at java.base/java.lang.Thread.run(Thread.java:829)Regards,César.CommentSharecesparanswered 4 months ago"


Question: Glue Crawler using JDBC mysql Connection unable to configure serverTimezone.

"Hi,I have a Crawler that runs Daily and uses Connection that connects to my RDS with Aurora MySQL Engine.Since last week (31 Mar 2022 UTC) I suddenly started receiving this Error Log and the crawler keep on failing.Error crawling database serendipt: SQLException: SQLState: 01S00 Error Code: 0 Message: The server time zone value 'ASIA/MANILA' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.The last time the crawler succeed was (30 Mar 2022 UTC).I tried adding some mysql parameters to fix the timezone, such as serverTimezone=UTC&useLegacyDatetimeCode=true&useJDBCCompliantTimezoneShift=true or serverTimezone=Asia%2FManila. But the same Error Logs appears. None of the changes seems to reflect in the Crawler, but when trying in "Test Connection" it succeeds.FollowComment"

Answer: "0After searching for a while, this is the only place I've seen this issue mentioned. I have the same issue except the MySQL timezone is "CDT". Adding "?serverTimezone=CST6CDT" to the connection string, allows the connection test to pass. However it appears a Crawler using the connection drops that connections string argument.CommentSharerePost-User-5762800answered a year agoAWS-User-4623000 a year agoMy workaround in it, is I just ends up directly connecting to my JDBC connection inside the Job, and just connected the JDBC connection to the Job.Note: I just checked today, Test Connection in Connection does not work anymore but still able to connect inside the Job.Share0I am too struggling with same issue. Has anyone found resolution on this?CommentSharerePost-User-9456211answered a month ago"


Question: How to query a structured field type string in Athena

"I have a field with this structure:Field Name: rulegrouplistDDL: array<struct<rulegroupid:string,terminatingrule:structruleid:string,action:string,rulematchdetails:string,nonterminatingmatchingrules:array<string>,excludedrules:string>>When I query with:WITH dataset AS (SELECT *FROM "Table_Name"CROSS JOIN UNNEST(rulegrouplist) AS t(t))SELECT t.excludedrulesFROM "table_name"WHERE date = '2023/03/10'AND t.excludedrules IS NOT NULLLimit 1I get this result:excludedrules**[{"rulematchdetails":"null","exclusiontype":"EXCLUDED_AS_COUNT","ruleid":"HostingProviderIPList"}]**I need to run a query where I can inpect one of the element in this field, in this case, excludedrules, which in the DDL is a field type string.I wonder if there's an easier way other than apply string functions, as I did here:WITH dataset AS (SELECT *FROM "Table_Name"CROSS JOIN UNNEST(rulegrouplist) AS t(t))SELECT trim(translate(translate(split_part(t.excludedrules,'ruleid',2),'":', ''),'}]','')) as ruleFROM datasetWHERE t.excludedrules IS NOT NULLAND date = '2023/03/10'Limit 1I get this result:HostingProviderIPListFollowComment"

Answer: "1It would have been fairly easy using unnest() but as the data is of type string it is not possible. You have to parse the data as array first because casting won’t be a solution here, Hence from here the question arises that "Is your underlying data also stores the field value for excludedrules as string?"If it is not than you can change the schema of this field into appropriate array struct. in DDL of your table or else you can run crawler on the underlying source data.CommentShareSUPPORT ENGINEERShubhanswered 3 months agoMauroJ 3 months agothank you for your reply Shubh.I just have one question: isn't this string value returning something very similar to a JSON structure?For that matter, doesn't a json_string supposed to work? Or even a CAST into a JSON and then json_extract?I've tried, but it returns a NULL value.Share"


Question: Trying to Migrate from MongoDB Atlas to DocumentDB

"Hello,I am currently trying to migrate from a MongoDB Atlas cluster to Document DB. I am having issues with a DMS Source Endpoint connection. I am getting an error regarding connecting to the cluster using the Test Connection:Test Endpoint failed: Application-Status: 1020912, Application-Message: Failed to create new client connection Failed to connect to database., Application-Detailed-Message: Error verifying connection: 'No suitable servers found (serverSelectionTryOnce set): [Server closed connection. calling ismaster on 'next-shard-00-01.xxxxxx.mongodb.net:27017']'When I try to use mongosh or Mongo Compass I am able to connect with no issues.I changed some network settings in the Network Access section of Atlas to allow connections from everywhere. But still, it won't connect.Has anyone else had a successful migration from MongoDB Atlas to DocumentDB?The MongoDB version I'm using is 5.0.14 (API Version 1)DocumentDB is using Elastic Cluster setup.ThanksFollowCommentrePost-User-8955297 3 months agoHey so I am currently migrating my data from MongoDB to DocumentDB and want to use further use Documentdb as my permanent database. Now I first dumped the files and restored it on my documentDB cluster. I can also access the Documentdb cluster from mongoshell and I can see my database in Documentdb. Now my issue is that I am not able to use the database when I add the URI to my React application. It just doesn't work I tried several ways, but it still didn't work. What can be the issue? I even followed the documentation.Share"

Answer: "1Accepted AnswerDamn it...I figured it out.MongoDB Atlas requires TLS connection. I needed to set SSL Mode to require in order for the connection to succeedCommentSharerePost-User-8855675answered 4 months ago1Hello @rePost-User-8855675Thanks for posting in re:Post.Verify that configured your security group and endpoint correctly and follow the steps in the below link to check it has been configured correctly.https://aws.amazon.com/getting-started/hands-on/move-to-managed/migrate-mongodb-to-documentdb/Try using offline method and follow the below steps.[Migrate from MongoDB to Amazon DocumentDB using the offline method]If the Answer is helpful, please click  Accept Answer & UPVOTE, this can be beneficial to other community members.CommentSharelearn2skillsanswered 4 months agorePost-User-8855675 4 months agoThank you for assisting me learn2skillsI read that document already and everything works except for the Source port, which is the MongoDB Atlas.Also, this is a live Production DomgoDB and I cannot turn off the DB, which is why I figured using the DMS would be much better since its a live migration.Share0Hi @Hello @rePost-User-8855675,I see you figured out the reason for the connection issue. (set SSL Mode to require)Please feel free to add additional questions here if you'd like and I'll be happy to look internally as well to assist.CommentShareSUPPORT ENGINEERsuveshan_panswered 4 months ago"


Question: What's kind of the average launch time for a SageMaker Studio notebook?

Assuming you don't add any custom lifecycle configuration scripts?FollowComment

Answer: "0Accepted AnswerHi Yann,Typically you should be using the fast launch instance types, which is designed to launch under 2 minutes. Generally it is 5-10 times faster than instance based notebooks.Here is to documentation which states so: https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks.html.Hope it helps!CommentSharejunkaianswered 4 months ago"


Question: Unable to generate solution for Visual Studio 2017

Visual Studio 2017 cannot be found after installation on a clean computer. Command .\lmbr_waf.bat msvs -p game and result - Skipping platform 'win_x64_vs2017' because it is not installed properly for this version of visual studio.REMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADREMOVEDUPLOADAnd as a resultREMOVEDUPLOADtext version:)G:\1.19.0.0\1.19.0.0\dev>.\lmbr_waf.bat msvs -p game[WAF] Engine Root: G:\1.19.0.0\1.19.0.0\dev\[WAF] Executing 'msvs' in 'g:\1.19.0.0\1.19.0.0\dev\BinTemp'[INFO] Regenerating 3rd Party settings file...[WARN] Missing JDK path from Setup Assistant detected. Target platforms that require java will be disabled. Please re-run Setup Assistant with "Compile For Android" enabled and run the configure command again.[WARN] Skipping platform 'win_x64_vs2017' because it is not installed properly for this version of visual studio Unable to generate solution for 'Visual Studio 2017'. Make sure it is installed and enabled in Setup Assistant. Skipping visual studio solution generation[WAF] 'msvs' finished successfully (4.481s) G:\1.19.0.0\1.19.0.0\dev>And why do I need JDK if I don't work with Android?Or what did I do wrong?P.S. And the build of the project was successfulREMOVEDUPLOADFollow

Answer: "0So. After a small investigation, the following results. After downloading and installing the old version 1.18 - everything is installed without errors. When you build a project in version 1.19, you do not automatically create a solution for VS2017.Run command in terminal: .\lmbr_waf.bat msvs -p game1.18 - is success1.19 - is error: Skipping platform 'win_x64_vs2017' because it is not installed properly for this version of visual studio Unable to generate solution for 'Visual Studio 2017'. Make sure it is installed and enabled in Setup Assistant. Skipping visual studio solution generationSharerePost-User-3867532answered 4 years ago0Even if I did something wrong, it's likely to go unanswered. I guess I shouldn't be doing anything at all.https://techraptor.net/content/amazon-game-studios-struggling-due-to-lumberyard-engineSo I accepted this answer as the only true one.SharerePost-User-3867532answered 4 years ago0Thank you.Now lmbr_waf configure revived to generate the vs2017 solution file.SharerePost-User-3469496answered 4 years ago0I have the same issue as yours after I update to the vs2017 version 15.9.14.I re-installed vs2017 and Lumberyard but still get the following warning.REMOVEDUPLOADSo, I decided to go back to vs2015 until they resolve this issue.My vswhere output.C:\Program Files (x86)\Microsoft Visual Studio\Installer>"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"Visual Studio Locator version 2.5.2+gebb9f26a3d [query version 1.18.21.37008]Copyright (C) Microsoft Corporation. All rights reserved.instanceId: 125cbc17installDate: 2/5/2019 10:59:30 AMinstallationName: VisualStudio/15.9.14+28307.770installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\CommunityinstallationVersion: 15.9.28307.770productId: Microsoft.VisualStudio.Product.CommunityproductPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exeisPrerelease: 0displayName: Visual Studio Community 2017description: Free, fully-featured IDE for students, open-source and individual developerschannelId: VisualStudio.15.ReleasechannelUri: https://aka.ms/vs/15/release/channelenginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.ServicereleaseNotes: https://go.microsoft.com/fwlink/?LinkId=660692#15.9.14thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660708updateDate: 2019-07-13T00:08:19.298205Zcatalog_buildBranch: d15.9catalog_buildVersion: 15.9.28307.770catalog_id: VisualStudio/15.9.14+28307.770catalog_localBuild: build-labcatalog_manifestName: VisualStudiocatalog_manifestType: installercatalog_productDisplayVersion: 15.9.14catalog_productLine: Dev15catalog_productLineVersion: 2017catalog_productMilestone: RTWcatalog_productMilestoneIsPreRelease: Falsecatalog_productName: Visual Studiocatalog_productPatchVersion: 14catalog_productPreReleaseMilestoneSuffix: 1.0catalog_productRelease: RTWcatalog_productSemanticVersion: 15.9.14+28307.770catalog_requiredEngineVersion: 1.18.1049.33485properties_campaignId: 1979421144.1544487226properties_channelManifestId: VisualStudio.15.Release/15.9.14+28307.770properties_nickname:properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exeSharerePost-User-3469496answered 4 years ago0Hi @REDACTEDUSERSorry for the frustration this has caused, you are not alone and we are actively working to make this process easier (https://forums.awsgametech.com/t/cant-compile-with-visual-studio-2017-15-9/5985/1, https://forums.awsgametech.com/t/1-15-1-16-perfectly-clean-remove-and-newly-installed-but-there-was-a-build-error/5975/1, https://forums.awsgametech.com/t/visual-studio-2017-compile-problems/6794/1). The most likely reason is due to the Visual Studio version you have installed being newer than any version we tested with Lumberyard. @REDACTEDUSERTo resolve this issue we need to modify your build settings fileOpen a command prompt and navigate to your Lumberyard dev folderRun the command to generate a build settings file if you don't already have onelmbr_waf configureOpen dev/WAF/user_settings.options with your favorite text editorFind the following line which specifies the valid versions of visual studio 2017;win_vs2017_vswhere_args = -version [15.7.27703.2035,15.9.28307.665]Change it to this which allows all of 'em. NOTE: make sure to remove the semi colon at the beginning of the linewin_vs2017_vswhere_args = -version [15.7.27703.2035,16]Back in your command window runlmbr_waf configureAfter this, your version of Visual Studio should be properly detected.SharerePost-User-5841084answered 4 years ago"


Question: How do I use  a schema fields default value in a template?

if I have a schema that has thistype light{status: String = 'Off'}and a query like this...getLightStatus(status:String)and it is call like thisgetLightStatus()how can I use the default value of the status "Off" in the templates (VTL)?I have seen this$util.defaultIfNull()and$util.defaultIfNullOrEmpty()but it looks like I need to supply the default to these function instead of access the value in the schema...or am I missing something?FollowComment

Answer: "0The short answer is I can't. I removed the default values from the schema and added them to the request resolver using a util function.Like this:#if( $util.defaultIfNull(${context.arguments.events},0) == 1 )The defaultIfNull will test to see if the value events param has a value and if not set it to 0CommentSharecjokinenanswered 4 years ago0This behavior is not yet supported and, as of writing, resolver templates cannot access default values from the schema.CommentShareparismicanswered 4 years ago"


Question: My codepipeline deployment fails. Getting an error wrt application version

"The action failed because either the artifact or the Amazon S3 bucket could not be found. Name of artifact bucket: codepipeline-ap-south-1-521473578238. Verify that this bucket exists. If it exists, check the life cycle policy, then try releasing a change.FollowCommentalatech EXPERT2 months agoWhat is the actual problem? Does the bucket exists in the region where the pipeline is executing?SharerePost-User-2373263 2 months agoYes. I have pipeline and elastic beanstalk exists at the same location. When I am creating new EB and codepipeline, deployment succeeded. But, when am making any code change and deploy again, deployment failing with errorCommand failed on all instances.Incorrect application version found on all instances. Expected version "code-pipeline-1680195938616-91cdc2d16e2977551f716c500c1bac6336ccb285" (deployment 997).Share"


Question: S3 Upload CSV with GZIP Compression using InputStream

"Hi,I am currently working on a usecase where, I am creating csv input stream programmatically using JAVA Code and than I have to compress it to gzip and than upload it to s3 bucket. Which will further use by AWS Neptune for bulk data ingestion.I am able to create inputstream and upload a CSV file on s3 bucket without gzip, but didn't find any luck to add one more gzip compression step between uploading and inputstream creation.Please find the current snippet of the code which is working fine -/**     * This method will upload the input stream to s3 with csv format.     *     * @param fileName    file name     * @param inputStream input stream     */    public void uploadFile(String fileName, InputStream inputStream) {        try (S3Client s3Client = S3Client.builder().region(Region.AWS_GLOBAL).build()) {            PutObjectRequest requestObject = PutObjectRequest                    .builder()                    .bucket(bucketName)                    .key(java.time.LocalDate.now() + "/" + fileName)                    .build();            s3Client.putObject(requestObject, RequestBody.fromBytes(inputStream.readAllBytes()));        } catch (IOException e) {            throw new RuntimeException(e);        }    }FollowComment"


Question: Is it possible to track reads of SSM Parameter?

"I'm going to share parameter stored in SSM Parameter Store to all accounts in my AWS Organization. I would like track when then parameter was read (to gather statistics for parameter usage across my accounts)I noticed that EventBridge is only catching SSM Parameter Store changes like:  Update, Delete,  CreateIs there an option to track reads?FollowComment"

Answer: 2You can use AWS CloudTrail to capture API calls made to parameter store.https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-logging-auditing.htmlCommentShareJeremy_Sanswered a year ago


Question: How to keep a process running on my EC2 instance via cloud9

"I have a simple python script on my cloud9 environment that I want to be running constantly. When I run it usingnohup python3 script-name.py &in a cloud9 terminal, it starts a process that runs successfully in the background. However, shortly after exiting the terminal and my browser, the process is automatically killed. When I set up my EC2 instance, I chose the option for it to never hibernate or shut down. Shouldn't I be able to run a process indefinitely on it? I'm fairly new at this, so I would appreciate any answers or help.FollowComment"

Answer: "0Hello!Just a few questions to help us troubleshoot this problem.What kind of process do you run? Is it IO/CPU intensive?What type of instance do you use and what OS?If you do not close terminal and browser does process run with no interruption even after some time?Approximately after what period of time process stops?Thanks!CommentShareanester-awsanswered 4 years ago0The process uses about 1% of the CPU.I use a t2.micro instance which uses Amazon Linux.Yes, with the terminal and browser open, I have not experienced any interruptions in the process. I've had the browser open for up to 8 hours, and it works smoothly the whole time.I'm not sure exactly how long. My best guess is within a few hours at most.By the way, apparently I can only make one post per day, so if you ask more questions I will not be able to respond for another 24 hours.Edited by: ineedhelpbadly on Aug 14, 2019 8:15 AMCommentShareineedhelpbadlyanswered 4 years ago0Thanks for details!One more questions: when you close your IDE and then after some time returns to it, does your EC2 instance stops and starts again? Or is it running? You can see that instance was stopped if on loading screen for Cloud9 you will see that Cloud9 attempts to starts EC2 instance.CommentShareanester-awsanswered 4 years ago0The EC2 instance continues to run. I can also SSH into my instance at any time and it is always running. by SSH-ing directly into the instance and running the script withnohup python script-name.py &, I can now get the script to run for about 24 hours before it stops running.CommentShareineedhelpbadlyanswered 4 years ago0Hi, can you please explain what your script is doing or, if possible, add python script to this thread.Here are a few things I would recommend to help debug..1. launch to see stdout/stderr output - nohup python script-name.py > /tmp/nohup.out&2. If you don't have try/except/finally blocks around the code, add them to help debug and handle any unexpected exceptions (if an exception is causing it to die)3. Is it possible your script is running out of resources and dying? For example, maybe "Too many open files" because your script is not closing file handles? (ulimit -n shows 4,096 max files in cloud9 by default).4. Does your python script just run in a loop performing things every X minutes? If yes, maybe consider creating a scheduled cron job that just runs the script every X minutes.5. If your python script is running as a "server" accepting connections, can you run it as a daemon?6. Try launching your python script on a regular EC2 instance to see if you can reproduce the problem there.-randyCommentShareRandyTakeshitaanswered 4 years ago"


Question: How to automation AWS monitoring daily reports as per requirement?

how we are implement a solution automation daily requirement usage resources in AWS cloud.FollowComment

Answer: "1Accepted AnswerIn accordance with the tags and topics. I believe you want to know how to monitor AWS services costs and usage.  You can implement several best practices to monitor the cost.You can implement the below tools based on your use case.1)With AWS Budgets, you can configure a report to monitor the performance of your existing budgets on a daily, weekly, or monthly cadence and deliver that report to up to 50 email addresses. Document reference [1],[2]2)AWS Cost Anomaly Detection leverages advanced Machine Learning technologies to identify anomalous spend and root causes, so you can quickly take action. With three simple steps, you can create your own contextualized monitor and receive alerts when any anomalous spend is detected.Document reference [3],[4]3)Cloud Intelligence Dashboards - The dashboards provide hundreds of pre-built visuals, offer resource-level granularity, are fully customizable, and provide machine learning-driven insights . You can also configure the dashboard for reporting. Document reference [4][1]https://aws.amazon.com/aws-cost-management/aws-budgets/[2]https://docs.aws.amazon.com/cost-management/latest/userguide/reporting-cost-budget.html[3]https://aws.amazon.com/aws-cost-management/aws-cost-anomaly-detection/[4]https://www.wellarchitectedlabs.com/cost/200_labs/200_6_cost_anomaly_detection/1_cad_intro/[5]https://wellarchitectedlabs.com/cost/200_labs/200_cloud_intelligence/CommentShareAneesh_Vanswered a month ago"


Question: store a large key use in EB

Answer: 2Accepted AnswerAWS Secrets manager should help you with this. https://aws.amazon.com/secrets-manager/CommentShareRishianswered 6 months ago


Question: How could the server retrieve matchmaking data about specific players?

"Hello everyone, I am at a point where I can get players to connect to a game session that is created via FlexMatch. However, I am wondering how I can get the server to find out the assigned team from Flexmatch of a specific player when he/she connects to the server. I could modify my Lambda API to pass the team info in addition to the player session id back to the client and have the client pass the team info to the server when connecting, but I believe there is a security flaw in the sense that clients would then be able to pass whatever team info they want to the server. I have tried using the DescribePlayerSessions method in the GameLiftServerSDK, and then calling GetPlayerData on the Outcome object returned. The issue with this is that the player data string was empty. Is there a way to achieve what I am describing using built-in GameLift functions? Because I would prefer not to use another table in DynamoDb for this.FollowComment"

Answer: "0Accepted AnswerThe matchmaker data passed to your server contains the assigned teams: https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.html#match-server-dataYou get this data via OnCreateGameSession/OnUpdateGameSessionWhen players arrive you can then match to their team via the player id.Do you have a specific concerns or a workflow where you think this may not work for you? You can also get this data via DescribeGameSession.CommentSharerePost-User-5332620answered 3 years ago0Thank you Pip. At the moment I think the functions you listed out will work for me, I just did not know how to retrieve the matchmaker data until now.CommentSharerePost-User-5100160answered 3 years ago0[quote="chrisgong, post:1, topic:8192, full:true"]Hello everyone, I am at a point where I can get players to connect to a game session that is created via FlexMatch. However, I am wondering how I can get the server to find out the assigned team from Flexmatch of a specific player when he/she connects to the server. I could modify my Lambda API to pass the team info in addition to the player session id back to the client and have the client pass the team info to the server when connecting, but I believe there is a security flaw in the sense that clients would then be able to pass whatever team info they want to the server. I have tried using the DescribePlayerSessions method in the GameLiftServerSDK, and then calling GetPlayerData on the Outcome object returned. The issue with this is that the player data string was empty. Is there a way to achieve what I am describing using built-in GameLift functions? Because I would prefer not to use another table in DynamoDb for this.[/quote]@REDACTEDUSERLink> https://docs.aws.amazon.com/gamelift/latest/developerguide/match-server.htmlI hope it helps.CommentSharerePost-User-7328120answered 3 years ago"


Question: AWS CodeBuild: Is it possible to queue builds in a batch if it exceeds concurrent build limit?

"Using this build-matrix example from https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build.html will create 6 buildsbatch:  build-matrix:    static:      ignore-failure: false    dynamic:      buildspec:         - matrix1.yml        - matrix2.yml      env:        variables:          MY_VAR:            - VALUE1            - VALUE2            - VALUE3If I have a concurrent build limit set to 5 on the project, it will cause all of the builds to fail.I would expect if the batch configuration is set to allow more builds than the concurrent limit then it would queue the extra builds.Is it possible to do this with CodeBuild or would it make more sense to use something like Batch instead?FollowComment"

Answer: "0Hello,The answer to your question is yes, if you have a limit for 5 concurrent builds on account level, yet you want to run more builds, then it those builds would be getting queued in CodeBuild and will proceed when the concurrency build limit is satisfied again and comes under the 5 build threshold. However, if you set a hard build limit on project level, it will fail immediately. This project level limit termination is mentioned in the official documents also. I would suggest you to please refer the same.Thank you !CommentShareSUPPORT ENGINEERrePost-User-0470248answered a month ago"


Question: AWS Glue  & AWS Glue Connector for Elasticsearch)

"Hello,I am currently trying to set up the AWS Glue Connector for ElasticsearchI am having difficulty understanding the proper format for the output schema. There is no good documentation on setting up the output schema that I can find.Can anyone help me with understand what format the output schema should be in?Is the schema based on the full response from elasticsearch or just the data returned?Currently I have the schema set up as the entire response from elasticsearch when you hit the _search endpoint as shownHowever this is throwing long overflow errors as if the format is incorrect.Any help with this matter would be greatly appreciated.FollowComment"

Answer: "0Hi,I understand that you are using the AWS Glue Connector for Elasticsearch. After providing the input schema, you can view the resulting data schema for your data source by choosing the Output schema. The schema displayed on the Output schema tab is used by any child nodes that you add to the job graph. Here you can edit the schemas for a custom transform node. The output schema is going to validate the schema based on your data file.I could also see you have mentioned that you are facing long overflow errors as if the format is incorrect. I am not sure what exactly the error here is but if its about mismatch between schema then please ensure that the output schema is matching up with the expected data value [from the data file].If the issue still persist, then please open a support case with AWS providing the errors you are facing along with the Job Run Id and Region - https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-caseThank you.CommentShareSUPPORT ENGINEERSaiIndira_Chanswered 2 months ago"


Question: How do I tell which version of the "AWS Data Provider for SAP" I have installed?

How do I tell which version of the AWS Data Provider for SAP I have installed on my AWS EC2 instances?NOTE: This is a common question asked by AWS customers. The AWS team is posting it to provide an answer that can benefit everyone.FollowComment

Answer: "0Accepted AnswerPlease note the current version of the AWS Data Provider for SAP at the time of posting is Version 4.3. All customers are strongly recommended to upgrade to this version as previous versions are no longer receiving updates.To check the version of your AWS Data Provider for SAP installed on a Linux OS:For versions 3 and 4, use:grep "Agent has started with version" /var/log/aws-dataprovider/jsvcerr.logFor version 2 and prior, use:grep "Agent has started with version" /var/log/aws-agent/jsvcerr.logTo check the version of your AWS Data Provider for SAP on Windows OS:Go to Services (Local),Select AWS Data Provider for SAP,Open Properties, you can see the current version in the Description field.NOTE: This answer is provided by the SAP on AWS specialty team and is accurate at the time of publish. Please check comments as the answer may have changed/services evolved.CommentShareEnekoanswered a month ago"


Question: AWS Lambda timeout with external dependencies

"Hi,I am having issues with a Lambda function which has external dependencies.The function will be triggered by a API Gateway call. When the function is deployed without external dependencies it works fine. However, when i use external dependencies (eg: in the function, for testing purposes i check if the port of a RDS instance is listening) a timeout occurs.When i remove the reference to the library which i imported, but leave the import the function executes without a timeout. I have tried different things, but to no avail. I also created a layer in Lambda, which has the dependencies, but also when i reference a library which is contained in that layer, the timeout occurs again.Do you have any suggestions / help? Below my (very simple) source code.`import jsonimport socketimport boto3import pg8000import syssys.path.insert(0, '/vendor')from botocore.exceptions import ClientErrorimport pg8000.nativedef hello(event, context):secret_name = "dev/studieplanning_dev"region_name = "eu-north-1"# Create a Secrets Manager clientsession = boto3.session.Session()client = session.client(    service_name='secretsmanager',    region_name=region_name)try:    get_secret_value_response = client.get_secret_value(        SecretId=secret_name    )except ClientError as e:    # For a list of exceptions thrown, see    # https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html    raise e# Decrypts secret using the associated KMS key.secret = get_secret_value_response['SecretString']object = json.loads(secret)print(object['username'])print(object['host'])print(object['port'])dsn = "dbname=" + object['dbInstanceIdentifier'] + " user=" + object['username'] + " password=" + object['password'] + " host=" + object['host']try:    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)    result = sock.connect_ex((object['host'], object['port']))    if result == 0:        print        "Port is open"    else:        print        "Port is not open"    sock.close()body = {    "message": "Go Serverless v1.0! Your function executed successfully!",    "input": event}response = {    "statusCode": 200,    "body": json.dumps(body)}return response`FollowComment"

Answer: "0Is your Lambda attached to a VPC that can communicate with the RDS instance? Unless your RDS instance is exposed to the internet, which is not recommended, you will need to communicate through a VPC or use a different method to interact with the database.CommentShareJason Butzanswered a month ago0The issue with the Lambda function timing out is that you have not set a timeout on your socket, so when you are trying to do connect_ex that will block and wait in definitively in case it cannot connect to the instance (see answer from Jason for the reason why that could happen).Add sock.settimeout(timeout) before calling connect_ex with timeout set to an appropriate value which should anyway be less than the Lambda function timeout.CommentShareEXPERTMassimilianoAWSanswered a month ago"


Question: I terminated all instances and services but I'm still being charged $0.01 per day. Why is that the case?

I terminated all instances and services but I'm still being charged $0.01 per day. Why is that the case?FollowComment

Answer: "1Look for any snapshots for those machines or disconnected EBS volumesLook for any KMS Keys, Cloudwatch Log groups, Metrics.Your best to use cost explorer to pin point the cost and where that charge is coming fromCommentShareGary Mcleananswered 2 months ago"


Question: Additional verification required to request certificates for one or more domain names in this request.

"My AWS SSL certificate failed to renew with the message "Additional verification required to request certificates for one or more domain names in this request.".  The User Guide suggests the following: "ACM requires additional information to process this certificate request. This happens as a fraud-protection measure if your domain ranks within the Alexa top 1000 websites. To provide the required information, use the Support Center to contact AWS Support. If you don't have a support plan, post a new thread in the ACM Discussion Forum."Needless to say, all the required for the verification DNS records are there.  This certificate was first issued in 2019 and then successfully renewed itself yearly until now.  Unfortunately I don't have a support contract, so posting here looks like my only hope to resolve this.So here I am following the suggestions from the User Guide.   Any ideas what to do next?  Your help will be highly appreciated!FollowComment"

Answer: "0Hello,You can open ticket with basic support to perform additional verification(adding to allow list) the domain names in the certificate, they should be able to help.Use AWS_ACM_RENEWAL_FAILURE event in future to track these failures.Additionally if support is unable to help, obtain a certificate from a third party that can issue a certificate for your domain, and import the certificate into ACMCommentSharePravoanswered 7 months ago"


Question: AWS Parameters and Secrets Lambda Extension timing out on request

"Hi there,I am attempting to use the extension in the title following the guide mentioned here and I am unfortunately hitting an issue where the extension starts and awaits requests (I can see this in the logs from setting the debug flag) although when I send the request, it times-out. I have set the timeout of the lambda to the maximum potential value with the same effect.I have set my lambdas execution role in the following manner:The runtime of my function is arm64 using TypeScript. My code to request my secret is as follows:I have been trying different things all to no avail as the application still times out. Any help on what is going on here would be greatly appreciated.FollowComment"

Answer: "0Accepted AnswerSolved it!Turns out that as I had linked my Lambda to my VPC it actually prevents the function talking with Secrets Manager as those endpoints are all public https://repost.aws/questions/QU1WLg4Q2-TCqznkgmpPnW0g/getting-secret-from-lambda-times-out-when-attached-to-vpc-subnetThe solution for this was to create a VPC endpoint accepting requests from the security group which my lambda was in. After doing this, the extension works as expected.Hope this helps someone else who faces the same issue 💫CommentShareniftyanswered 3 months ago0Hi nifty,I wrote an article recently about this integration: https://medium.com/aws-in-plain-english/potential-costs-and-latency-improvements-with-aws-parameters-and-secrets-lambda-extensions-40b6af151b0Could you try with the the code in article to rule out whether the fetch method or some code is preventing you to perform the right call to the extension?Only difference I can spot is usage of encodeURIComponent method in my implementation.CommentShareEXPERTalatechanswered 3 months agonifty 3 months agoHi @alatechThanks for the reply and the link to your article. I added the layer again the style you described in your article and used the exact same code but sadly I have the same issue where it simply times out when requesting the secretSharealatech EXPERT3 months agoGlad it helped, wasnt aware the lambda was in a VPC, good!Share"


Question: Unable to choose 1920x1080 resolution in NICE DCV

"Environment:NICE DCV Client:2022.1.8248.0NICE DCV Server: 2022.1.13067instance type: g4dn.2xlargeOS: Windows server 2019 Datacenter,64bitgpu: Tesla T4gpu driver version: 516.59 cloud gaminggpu driver type: standart  (according to NVIDIA control panel))After modifying the entries in Windows Registry Editor as described in link we still are unable to  set "Display Resolution" to "1920*1080" from settings, it remains "1360x768".  We have tried also via command line:PS C:\Users\Administrator> dcv set-display-layout --session console 1920x1080+0+0PS C:\Users\Administrator> dcv describe-session consoleSession:        id: console        owner: Administrator        display layout: 1024x768+0+0PS C:\Users\Administrator>Can anyone name the cause or suggest a solution ?FollowComment"


Question: Error "The security token included in the request is invalid" invoking lambda function url

"Hi,This is the follow up of this question - https://repost.aws/questions/QUE8NpRj91RW-9p1MiOv9iYQ/calling-iam-auth-function-urls-from-lambdaI am trying to invoke the lambda with function url (lets name this as "funcUrlLambda" ) from another lambda (lets say this as "apiGwLambda").  I have given apiGwLambda role permission in funcUrlLambda.  In apiGwLambda, I am doing the signv4 with the access key and secret key from lambda env variables.For signV4, I am using the code from these linkshttps://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-examples-using-sdks.html#sig-v4-examples-using-sdk-javahttps://docs.aws.amazon.com/AmazonS3/latest/API/samples/AWSS3SigV4JavaSamples.zipBut I am getting this error {"message":"The security token included in the request is invalid."} from funcUrlLambda.  It would be super helpful if some one could provide help on this ?Code getting the access key and secret key in lambda        val accessKey = System.getenv("AWS_ACCESS_KEY_ID")        val secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")FollowComment"

Answer: "0Hi,I would suggest that you try the Lambda URL with No-Auth option first, just to pinpoint the issue: is it related to the execution role (permissions) of the apiGwLambda, or, is it purely related to access tokens provided.Could you provide the policy used by the execution role of apiGwLambda as well (assuming this is the lambda that will actually invoke funcUrlLambda)?CommentShareZadusPlaceanswered a year ago"


Question: Cloudwatch Fees from Metric Storage Issue

"I've just been doing very basic cloudwatch queries over the past several years using the web interface to monitor things like ram utilization of my server.I'm noticing cloudwatch costs and metric storage costs, which I think is related to cloudwatch, have been increasing and I would like to reduce them.In my research it seems I should be able to set metric retention using log groups.  However, I don't seem to have any log groups.  I created a temporary one and used it with insights, but obviously insights didn't find anything since that isn't really the log group I'm using.  Also I shouldn't be charged for cloudwatch metrics based on how few I'm using, but I am so I suspect something is running cloudwatch metrics, but I can't figure out what is doing that.I would be fine completely removing all my cloudwatch data and restarting fresh with cloudwatch, but I can't even figure out a way to do that.Thanks for any suggestions!  I've done a few hours of searching and just can't seem to figure out how this should work so I'd really appreciate any help you can provide.FollowComment"

Answer: "0Hi Enbar,When it comes to CloudWatch Metrics, you will be charged for two things:Custom metrics (Any metrics with a namespace other than AWS namespaces) that you are pushing to CloudWatch Service using either:#-- > CLI\API#-- > CloudWatch Agentbelow API call requests:#-- > GetMetricData#-- > GetInsightRuleReport#-- > GetMetricWidgetImage#-- > GetMetricStatistics#-- > ListMetrics#-- > PutMetricData#-- > GetDashboard#-- > ListDashboards#-- > PutDashboard#-- > DeleteDashboardsAs for metric retention, it is only a way where AWS CloudWatch service aggregate your metrics raw data points for long-term storage. CloudWatch retains metric data as follows:#. Data points with a period of less than 60 seconds are available for 3 hours. These data points are high-resolution custom metrics.#. Data points with a period of 60 seconds (1 minute) are available for 15 days#. Data points with a period of 300 seconds (5 minute) are available for 63 days#. Data points with a period of 3600 seconds (1 hour) are available for 455 days (15 months)Metrics cannot be deleted, but they automatically expire after 15 months if no new data is published to them in the last 2 weeks.Data points older than 15 months expire on a rolling basis; as new data points come in, data older than 15 months is dropped.I suggest to look at your CloudWatch custom metrics (Any metrics that is not in AWS namespaces) and try to analyze which application\Scrip\Code is publishing those metrics and how frequent.The AWS namespaces typically use the following naming convention: AWS/service. For example, Amazon EC2 uses the AWS/EC2 namespace.CommentShareShuaianswered 3 years ago0ShuaibA-AWS, thank for the reply.I think something is misconfigured with my could watch because I have tried all the basic stuff over the past several months and nothing seems to help.  But, it is possible I am missing something so hopefully you can help with this a little more.I've looked into the detailed cost and you are right that those fees are related to custom metrics.For example below are the important columns from my cost and usage spread sheet.AmazonCloudWatch -- CW:MetricMonitorUsage -- MetricStorage -- $0.30 per metric-month for the first 10,000 metrics -- Custom MetricsAt https://console.aws.amazon.com/cloudwatch I have tried the following things for over a 1 month period:Removed all custom dashboardsMade sure none of the Metrics were graphed under Metrics>Graphed metrics.Made sure I had no logs or eventsI do have 30 custom metrics under CWAgent.  I can't even remember how I got all those added years ago.  A few are useful like CPU utilization and ram utilization.  However, most I've never used other than in a few experiments a few years ago.  My understanding is they are supposed to be removed after 2 weeks of not being uses, but they have never been removed.  This combine with the charges I see makes me think something is using these metrics, but I don't know how to stop using them.  Is there some other way I can stop using them?I have also  https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html  to look directly at my amazon-cloudwatch-agent.json file and make sure the configuration makes sense.  In the past I even modified it to have no metrics in it when doing the steps I mentioned didn't help, but right now it has a few that match what my custom dashboard is.The documents for cloudwatch say that 50 metrics are free.  It isn't completely clear if that includes any custom metrics, but I think it does.  Even if it doesn't in the past I've tried to use no custom metrics and I was still getting charged for them.Do you have a suggestion on how to make sure I'm not using an custom metrics?Thanks again for your help!CommentShareEnbaranswered 3 years ago0Thanks for your reply.  It has helped refresh my memory that I setup a metricAgent on my instance several years ago.Is the best way to modify my metric agent to change the amazon-cloudwatch-agent.json file?  I have put my current file at the end of the document.  I can certainly increase the interval and remove a few things from this file.  I see 9 metrics with 30 second intervals.I'm a little confused how things are priced for this, but I am now guessing this is why I am getting charged.  I'd be fine paying the $0.30 for 10K metrics, but I'm not sure how those are counted.  If I made my metric just report back every hour instead of every 30 seconds then with my current number of metrics I would expect to stay under 10K metrics for the month so just $0.30.  Is that right, or am I counting this incorrectly?I did try modifying amazon-cloudwatch-agent.json in the past and it didn't seem to help, but I'm willing to try that again the experts here think that should help.{"metrics": {"append_dimensions": {"AutoScalingGroupName": "${aws:AutoScalingGroupName}","ImageId": "${aws:ImageId}","InstanceId": "${aws:InstanceId}","InstanceType": "${aws:InstanceType}"},"metrics_collected": {"cpu": {"measurement": ["cpu_usage_idle","cpu_usage_iowait","cpu_usage_user","cpu_usage_system"],"metrics_collection_interval": 30,"resources": [""],"totalcpu": false},"disk": {"measurement": ["used_percent","inodes_free"],"metrics_collection_interval": 30,"resources": [""]},"diskio": {"measurement": ["io_time"],"metrics_collection_interval": 30,"resources": ["*"]},"mem": {"measurement": ["mem_used_percent"],"metrics_collection_interval": 30},"swap": {"measurement": ["swap_used_percent"],"metrics_collection_interval": 30}}}}CommentShareEnbaranswered 3 years ago0Hello,As a CloudWatch user monitoring servers in the AWS console, I will guess you are monitoring EC2 instances.You are likely to incur charges in two areas monitoring EC2: Custom Metrics and Detail Monitoring metrics.Basic EC2 metrics are sent to CloudWatch on a 5-minute interval for free.If you are monitoring RAM on your server, then you likely have the EC2 CloudWatch Agent installed and running on your EC2 instances. CloudWatch Agent sends additional EC2 instance metrics to CloudWatch as Custom Metrics, for example mem_total and mem_free.Also, when you configure your EC2 instances, you can choose to enable Detail Monitoring to emit EC2 metrics at a faster 1-minute interval.Here are some resources to help you understand which metrics are available and their pricing:CloudWatch metrics for your instances: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/viewing_metrics_with_cloudwatch.htmlMetrics Collected by the CloudWatch Agent: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/metrics-collected-by-CloudWatch-agent.htmlEnable or disable Detailed Monitoring for your instances: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch-new.htmlCloudWatch Pricing Page: https://aws.amazon.com/cloudwatch/pricing/Best,KevinCommentShareKevin-AWSanswered 3 years ago0Hello,Custom Metrics are charged $0.30 per metric per month. They are pro-rated by the hour and you are only charged for a metric during an hour in which that metric receives a datapoint. As long as a Custom Metric receives a datapoint at-least once per hour, it will be $0.30 per month.CloudWatch Agent is a software service you installed on your EC2. While it is running, it will send Custom Metrics to CloudWatch and put them in CWAgent.If you no-longer wish to receive Custom Metrics from your EC2, your best course is to stop and/or uninstall the CloudWatch Agent running on your EC2.Instructions for stopping CloudWatch Agent are here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/troubleshooting-CloudWatch-Agent.html#CloudWatch-Agent-troubleshooting-stopping-restartingBest,KevinCommentShareKevin-AWSanswered 3 years ago0I am pretty convinced it was this cloudwatch agent and I have uninstalled that to verify it solves my issue.  Thanks for all the help!CommentShareEnbaranswered 3 years ago"


Question: Migrating multi-tenant application to Cognito ... how many user pools is too many?

"I have a multi-tenant application that we are wanting to migrate to Cognito.  The current system has unique usernames for each tenant but no unique requirement between tenants, with the login screen asking for the username and the tenant name.  The initial impression I get from looking through Cognito documentation is that we should use separate user pools per tenant.  However, we have over 11,000 tenants each containing a small handful of users.  This feels like we would be scaling in the wrong dimension, but because of the username collision I'm not sure there is a better solution.  I thought also about making the Cognito username a composite of the existing username and the tenant id, but I don't want that architecture decision to come back to haunt me down the road if we decided to expand and use the hosted UI or add federated/OTP login flows once we are in Cognito.  Would love to hear others' thoughts on the best way to handle this situation.FollowComment"

Answer: "1Hi,I think you summarized the options well. Because you might have username collision, you either have to use user-pool per tenant or prefix the username with tenant-id (if you want to use single user pool). User pools per account is a soft limit. Default limit is 1000, you should submit a support ticket to evaluate if the limit increase is possible and to how much. In your model, it is better to use multiple AWS accounts to scale out the number of tenants you can support, if you spread the user pools across multiple accounts, this gives you bigger room to grow and full isolation between tenants.Please review Amazon Cognito quotas to learn more about other limits.And I think you have already seen multi-tenancy best practices but adding it for reference.CommentShareEXPERTMahmoud Matoukanswered a year ago0You may want to look at this page around Cognito service quotas: https://docs.aws.amazon.com/cognito/latest/developerguide/limits.htmlCommentShareDidier_AWSanswered a year agojonb a year agoThanks for your comment - I did see that, which is partly why I feel like one user pool per tenant feels like it's scaling in the wrong dimension.  I know I can request a service limit increase but going from 1,000 to 25,000 or more just feels like there's something wrong with that.  Hence my question ... is that still a reasonable solution or should I handle this in another way?Share"


Question: "3rd Site-to-Site VPN added, stopped traffic on the other 2 S2S VPNs"

"I have a single VPC and sing VGW.I have two active S2S VPNs, each going to different subnets on the client side. They both connect to "subnet a" in AWS. This works fine.I tried to add a 3rd S2S VPN, that tunnels one IP address on a new client and one IP address in the same "subnet a" in AWS.As soon as this 3rd VPN comes up, the other 2 VPNs stop passing traffic.I suspect that this is a routing issue. Though I would have expected typical routing behavior to prevail: Where if the most specific route doesnt apply, it moves on to the next. I must be missing something simple here!Thanks in advance for any guidance.Edit: All three are static route based VPNSFollowCommentTushar_J EXPERTa month agoAre you using Policy based VPN or route based VPN?ShareRallyImprezive a month agoThanks for taking the time to review my question Tushar_J. All 3 are static route based.Share"

Answer: "0You shouldnt have overlapping static routes with multiple VPN tunnels terminating on same VGW.You will see weird behaviors like this and the AWS VPN tunnel selecting logic for Egressing out of VPC cannot be controlled in such scenariosThis might be expected with the overlapping static routes you have in place.Is there a reason why you have Overlapping network routes routed via Different Tunnels in the first place ?Maybe it will help if you can clearly specify the routes added via Each of the Three VPNs.VPN-A: Static route ?VPN-B: Static route ?VPN-C: Static route ?CommentShareSUPPORT ENGINEERSKKASHANanswered a month agoRallyImprezive a month agoSKKASHAN, thank you for taking the time to respond. Here are the routes. Please note that the local and remote network CIDR defined for the tunnel is the same as the static route.VPN AAWS Subnet: 172.31.30.0/24 with route to Remote Subnet 10.38.100.0/24VPNBAWS Subnet: 172.31.30.0/24 with route to Remote Subnet: 10.51.100.0/24VPNC (troublemaker)AWS Subnet: 172.31.30.110/32 with route to Remote Subnet: 10.200.10.41/32We have a subnet in AWS reserved for DataAnalytics, and those systems need to communicate with multiple remote sites to collect data. VPNA and VPNB go to our on-prem datacenters, and VPNC goes to a 3rd party remote site that we do not control. They only wanted to tunnel a single IP from their site for the sake of security.Any help is appreciated!Share"


Question: "Does kms:ViaService support FIPS endpoints, such as in GovCloud?"

"Hello, my question is just whether or not I could use the kms:ViaService condition key in a IAM policy with FIPS endpoints specified? I need to use FIPS endpoints for compliance reasons and I can't find any documentation that details this. The Kms:Via Service supported services table does not include FIPS endpoints (Services that support the kms:ViaService condition key - example elasticfilesystem.AWS_region.amazonaws.com). See here - https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-via-serviceAn example of the IAM policy would be - https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html"Resource": "*","Condition": {"StringEquals": {"kms:ViaService": "elasticfilesystem.us-east-2.amazonaws.com","kms:CallerAccount": "111122223333"But I would like to use -"Resource": "*","Condition": {"StringEquals": {"kms:ViaService": "elasticfilesystem-fips.us-gov-east-1.amazonaws.com","kms:CallerAccount": "111122223333"Should this work? I feel like it would because for compliance reasons a lot of GovCloud workloads are required to use FIPS endpoints and this seems like a gap otherwise.FollowComment"

Answer: "0Accepted Answer"So for the CloudFormation templates, I would not put the FIPS endpoint name in the template itself, but rely on the env variable to ensure the FIPS endpoint is used, correct?" - That is correct"Such as for my CloudFormation template example above I would leave it as it is, I wouldn't need to change it to fsx-fips.us-gov-west-1.amazonaws.com. Would changing the CF template to the FIPS endpoints even work?" - You'd leave as it is. setting the string value for the kms:viaService condition key to fsx***-fips***.us-gov-west-1.amazonaws.com, won't match the expected service name fsx.us-gov-west-1.amazonaws.com, and hence wouldn't have the expected outcome for this condition key usage i.e. Allowing or Denying KMS operations for a role/user, via the FSx service.CommentShareRajarshi_Danswered 2 months ago0Hi, as listed in table 'Services that support the kms:ViaService condition key' documentation, you've referenced, the value in the condition key is the service name e.g. s3.AWS_region.amazonaws.com or elasticfilesystem.AWS_region.amazonaws.com. Think of it as the service principal name but with the region included. Therefore, for the AWS GovCloud (US) West region, the value would be s3.us-gov-west-1.amazonaws.com, elasticfilesystem.us-gov-west-1.amazonaws.com.Once the KMS policy is setup with the kms:viaService condition key, the use of FIPS endpoints in the US Standard Commercial Regions US East/West and the GovCloud regions, can be achieved using the AWS CLI and AWS SDKs. In the case of the AWS CLI, you can either use the environment variable AWS_USE_FIPS_ENDPOINT set to True, or the value use_fips_endpoint = True in your ~/.aws/config file. Alternatively, you can also use the endpoint_url parameter to specify the endpoint. The AWS SDKs, also support the usage of the AWS_USE_FIPS_ENDPOINT flag and endpoint_url as a parameter programatically.For instance, copying a file onto an S3 bucket using the AWS CLI in GovCloud West region, specifying the KMS Key with the key policy set with the kms:viaService key, with the FIPS endpoint specified , would look like this:aws s3 cp <local file name> s3://<bucket-name>/<key-name> --sse aws:kms --sse-kms-key-id arn:aws-us-gov:kms:us-gov-west-1:<AWS Account ID>:key/<uuid> --endpoint-url https://s3-fips.us-gov-west-1.amazonaws.comThe condition key would be set as follows (more conditions can be added):            "Condition": {                "StringEquals": {                    "kms:ViaService": "s3.us-gov-west-1.amazonaws.com"                }            }CommentShareRajarshi_Danswered 2 months agorePost-User-0313018 2 months agoThanks for the reply and explanation!Am I reading this right, 1) FIPS endpoints would only work for kms:ViaService with the AWS CLI or SDK, 2) Using the FIPS endpoint value in the condition key would not work 3) I would still always use the 'regular' endpoint name in the condition key (because of the env variable setup)My concern is with 3rd party tools that would use an IAM role that grants them the kms permission used for creating Fsx via a CloudFormation template, but I suppose the env variable would cover this? See below for an example from an actual template -- Sid: Basic Access to KMS Key for FSx Filesystem Creation via CSP role  Effect: Allow  Principal:    AWS:      Ref: 'OpsRoleARN'  Action:  - kms:Decrypt  - kms:GenerateDataKey*  - kms:CreateGrant  - kms:DescribeKey  Resource: "*"  Condition:    StringEquals:      kms:ViaService:      - fsx.us-gov-west-1.amazonaws.comShare0The kms:viaService condition key doesn't determine endpoint usage. The AWS CLI and SDKs are used as part of a workload, for operations on AWS services, and can be configured to use the FIPS endpoints.The condition key value represents more the aws service principal name with the domain name. It indicates to KMS, which service is trying to perform a KMS operation on behalf of an aws principal e.g. role, user e.g. * OpsRoleARN*You'd use the AWS KMS ViaService name listed in the docs. It appears to have the same format as the general service endpoint.CloudFormation will setup the infrastructure. The IAM role with the condition key would still take effect for Fsx operations.Hope this helps.CommentShareRajarshi_Danswered 2 months agorePost-User-0313018 2 months agoThanks again!So for the CloudFormation templates, I would not put the FIPS endpoint name in the template itself, but rely on the env variable to ensure the FIPS endpoint is used, correct?Such as for my CloudFormation template example above I would leave it as it is, I wouldn't need to change it to fsx-fips.us-gov-west-1.amazonaws.com. Would changing the CF template to the FIPS endpoints even work?Share"


Question: Route53 Alias not resolving to cloud front distribution

"HiIn Route 53 I tried to link domain to cloudfront distribution, but it doesn't show my distribution , it says that it can only show distributionsfrom us-east-1:An alias to a CloudFront distribution and another record in the same hosted zone are global and available only in US East (N. Virginia).but cloudfront distribution doesn't have a region, it is global.I have no way to choose route 53 to be on on any other region like us-east-2.My default region is us-east-2.Also when in cloudfront when I try to add CNAME I get that I can only add certificate from us-east-1:Associate a certificate from AWS Certificate Manager. The certificate must be in the US East (N. Virginia) Region (us-east-1).but why only us-east-1?Can someone please help?Thank youFollowComment"

Answer: "1Cloud front is a global CDN but it is managed from the global region of us-east-1.In order to have a certificate assigned to cloudfront, then you will need to create one in acm also in the same region us-east-1You will only be able to select cloudfront Diageo’s in us-east-1The same applies to managing waf for cf. it’s in the global region.It’s similar for IAM. Its global region is the same.If this helps please be sure to accept the answer to help others and me.CommentShareGary Mcleananswered 3 months ago0Yes that is because CloudFront considers us-east-1 as global region. The ACM certificates must be created/imported from here and the same is distributed across all other AWS geographic regions. https://docs.aws.amazon.com/acm/latest/userguide/acm-regions.htmlCommentShareAritro Senanswered 3 months ago"


Question: Accessing Custom Environment Variables inside component's docker containers

"I have a manifest file which looks like :{      "Platform": {        "os": "all"      },      "Lifecycle": {        "Setenv": {          "ENDPOINT": "Test_endpoint"        },        "Run": "docker rm core -f && docker rm A -f && docker rm B -f && docker rm C -f && docker-compose -f {artifacts:path}/docker-compose.yml up -d"      },      "Artifacts": [        {          "URI": "docker:D"        },        {          "URI": "s3://bucket/docker-compose.yml"        },        {          "URI": "docker:C"        },        {          "URI": "docker:B"        },        {          "URI": "docker:A"        }      ]}and in docker compose fileservice:    image: "XXXXX.dkr.ecr.us-east-1.amazonaws.com/service-1.0:latest"    container_name: service    network_mode: host    environment:      AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT: ${AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT}      SVCUID: ${SVCUID}      AWS_CONTAINER_CREDENTIALS_FULL_URI: ${AWS_CONTAINER_CREDENTIALS_FULL_URI}      AWS_CONTAINER_AUTHORIZATION_TOKEN: ${AWS_CONTAINER_AUTHORIZATION_TOKEN}      AWS_REGION: ${AWS_REGION}      AWS_IOT_THING_NAME: ${AWS_IOT_THING_NAME}      ENDPOINT: ${ENDPOINT}    depends_on:      - core      - ledservice      - scannerservice    volumes:      - ${AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT}:${AWS_GG_NUCLEUS_DOMAIN_SOCKET_FILEPATH_FOR_COMPONENT}    command: --uri localhost:4400 --port 9100 --name stowBut i am unable to retrieve the value of ENDPOINT in my docker container using System.getEnv("ENDPOINT") or print all the environment variable using printenv on SSH. Value being returned is 'ENDPOINT=' i.e. empty.What am i doing wrong here? because i could not find much references where Setenv is being used or how to use it using docker.FollowCommentvaibhavmurkute a year agoCould you run this command to see what environment variables are set inside the container?docker inspect --format='{{.Config.Env}}' aws-iot-greengrassShare"

Answer: "0Hello Shivam,Was the suggestion from vaibhavmurkute useful? Please let us know.CommentShareSUPPORT ENGINEERMonica_Lluisanswered a year ago"


Question: DMS Controlling the number of source database connections used

"Is this possible?I have to stagger my ETL processes out because DMS opens up ~34(+7regular) connections on our Postgres source database to complete one transfer task.  The table count is 224 for this task/database (one example, there are many databases).  If I don't stagger them the total connection count goes way above 100 and then our source server essentially crashes.  It simply won't handle that many open connections at once.Is there any way to control the total connections AWS DMS uses per task job?ThanksEdited by: ted1111 on Sep 30, 2021 8:06 AMFollowComment"

Answer: "0Actually by adjusting a couple settings in the task JSON downward I was able to reduce the total resources required on the source database.See the MaxFullLoadSubTasks and CommitRate settings.For MaxFullLoadSubTasks it generally corresponds to the number of tables processing at once, although number connections is multiples per table in my case.  For CommitRate I lower this to 1000 to conserve all resources on our side, server and network, reduce overall stress.Edited by: ted1111 on Oct 1, 2021 3:21 AMEdited by: ted1111 on Oct 1, 2021 9:53 AMCommentShareAWS-User-4151168answered 2 years ago"


Question: S3上无法使用Chunked上传文件 ｜ Unable to use Chunked to upload files on S3

"我通过SDK生成一个加签的URL，然后使用Apache.HttpClient去上传数据，以Inputstream的方式，并且无法预估Content-Length。此时会报错NotImplemented<Message>A header you provided implies functionality that is not implemented</Message>Transfer-Encoding看了一些文章，是必须要指定Content-Length但是通过InputStream的方式是无法预估Content-Length大小的，这种情况如何成功上传呢？I generate a signed URL through the SDK, and then use Apache.HttpClient to upload data in the form of Inputstream, and the Content-Length cannot be estimated.At this time, an error will be reportedNotImplemented<Message>A header you provided implies functionality that is not implemented</Message>Transfer-EncodingAfter reading some articles, it is necessary to specify Content-LengthHowever, the Content-Length size cannot be estimated through the InputStream method. How to upload successfully in this case?FollowComment"


Question: Lambda deprecation of botocore.vendored.requests - how to resolve

"My Lambda function is providing the following warning in Cloudwatch:DeprecationWarning: You are using the post() function from 'botocore.vendored.requests'.  This is not a public API in botocore and will be removed in the future. Additionally, this version of requests is out of date.  We recommend you install the requests package, 'import requests' directly, and use the requests.post() function instead.Please note that I use the Lambda console for my function so I can't use the AWS CLI to pip import requests etc.Having looked up what to do about this (see here:   https://aws.amazon.com/blogs/compute/upcoming-changes-to-the-python-sdk-in-aws-lambda/) , there is an option to add a layer to my function using the Lambda console which contains version 1.12.221 of the AWS SDK, which includes the requests module in Botocore.I have followed the instructions and added the correct version of this SDK to my function based on my region and Python version.But having added this AWS SDK as a layer, if I try using the code "import requests" in my Python code, I get an error "Unable to import module 'lambda_function': No module named 'requests'"So please can anyone advise what Python import instruction I am meant to use, if I have added this AWS SDK layer as per the instructions in this AWS blog post?Many thanksFollowComment"

Answer: "0Hello, I think that you have to import all the botocore library from botocore.vendored import requestsI tested the lambda, while using the layer that is mentioned in the web page and without it, and I have different warnings, while testing today:With the layer of the web page (Link:https://aws.amazon.com/es/blogs/compute/upcoming-changes-to-the-python-sdk-in-aws-lambda/): /opt/python/botocore/vendored/requests/api.py:67: DeprecationWarning: You are using the post() function from 'botocore.vendored.requests'.  This is not a public API in botocore and will be removed in the future. Additionally, this version of requests is out of date.  We recommend you install the requests package, 'import requests' directly, and use the requests.post() function instead.Without the layer: /var/runtime/botocore/vendored/requests/api.py:64: DeprecationWarning: You are using the post() function from 'botocore.vendored.requests'.  This dependency was removed from Botocore and will be removed from Lambda after 2020/03/31. https://aws.amazon.com/blogs/developer/removing-the-vendored-version-of-requests-from-botocore/. Install the requests package, 'import requests' directly, and use the requests.post() function instead.What I think is that the warning is already in the version that the lambda layer has, for that is showing that warning in that way, and also notice that in the first warning the botocore library is extracted from the /opt/ folder, where according to this AWS page: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html, is the folder where layers are extracted for runtime execution.I hope this can help you with your problemRegardsJohnny ValenzuelaCommentShareJohnnyLVPanswered 3 years ago0Hi JohnnyMy apologies for having taken so long to respond to you kindly providing feedback to my question from way back in March 22. I thought I would have received an email alert that someone had posted a reply, so I hadn't gone back to check.So a belated thanks very much for the assistance.In the end I discovered I needed to download a specific Python 3.6 requests library (arn:aws:lambda:eu-west-1:215029992386:layer:Python36-Requests:1) adding as a layer to my Lambda function. This resolved my problem.Thanks againCliffCommentShareCliff Courtanswered 2 years ago"


Question: Honduras Phone Number

"Hello, I'm trying to setup Amazon Connect to integrate it with ZohoCRM, however I'm trying to get a Honduras Phone Number but it's not listed in the instance that I created on US East 1. Also it's listed as a supported country https://aws.amazon.com/connect/pricing/FollowComment"

Answer: "0Hello,Thank you for asking the question in relation to procuring Honduras Phone Number from Amazon Connect.Currently Amazon Connect does not provide an ability to obtain the number from mentioned country.However , you can still make outbound calls to the destination.I would recommend checking Telecom coverage PDF[1] which contains more information on number possibilities etc for specific country.References:[1] https://d1v2gagwb6hfe1.cloudfront.net/Amazon_Connect_Telecoms_Coverage.pdfCommentShareKarolis_Ganswered 2 months agoEXPERTAWS-samfredreviewed 2 months ago"


Question: Please install/whitelist Messages app "com.apple.MobileSMS" on these device

"Dear Amazon team,We cannot start standard Apple Messages app in our XCTest tests on these devices:iPhone XR, iOS 12iPhone 8 Plus, iOS 12.1Please whitelist/install Messages app on these devices so we can successfully run our tests. Use case we need for universal links testing is to open Messages app, paste a universal link in a new chat there then tap on the link to go back to the app - this isn't possible for two devices above since there isn't Messages app on them but it does work nicely on other devices.Failing runs:https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/dc2068f7-4b09-417c-9909-b77f559c9641/runs/106c8a2d-2f65-4406-a8ef-df95cb86ad1e/jobs/00000/suites/00001/tests/00000https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-west-2#/projects/dc2068f7-4b09-417c-9909-b77f559c9641/runs/b1bb6840-56f9-40d9-acc9-1ea5677ffb31/jobs/00003/suites/00006/tests/00002For failing devices we see in test log that test fails as soon as we try to start Messages app programmatically but we would expect that test execution continues normally. Log contains:t =   247.89s Open com.apple.MobileSMSt =   247.91s     Launch com.apple.MobileSMSt =   248.11s Tear Down...Thank you very much for the support.Kind Regards,DraganFollowComment"

Answer: "0Hi Dragan,Sorry for the inconvenience. For security considerations we're blocking Messages app. Would using browsers such as Safari, or other messaging apps such as WhatsApp help in your use cases?ThanksCommentShareAWS-User-5202920answered 4 years ago0Thank you for the answer. We are fine for now since we go with workaround in the app to avoid our tests failing.CommentSharemarjanovicanswered 4 years ago"


Question: Does Amazon Lex V2 have support for response cards using the UI?

"I'm trying to find a way of creating response cards (with button options) in Lex and integrating it with Amazon Connect. However, I wasn't able to find a solution using the UI in Lex V2. I believe Lex V1 had support for response cards via UI, however in Lex V2 the only way I was able to get those response cards to show up in Amazon Connect's test chat was by using a Lambda function. Is there a method of creating these response cards without using lambda?FollowComment"

Answer: "0Amazon Connect does not support Lex response card feature.  You have to use the feature in Connect call Interactive Messaging, this xml output can be created using Lambda.Here is the documentation for it:https://docs.aws.amazon.com/connect/latest/adminguide/interactive-messages.htmland here is an example bloghttps://aws.amazon.com/blogs/contact-center/easily-set-up-interactive-messages-for-your-amazon-connect-chatbot/this is different from Lex response card featureCommentShareClarenceChoianswered 5 months agoEXPERTAWS-samfredreviewed 2 months ago-1In Lex V2, cards can be added to any prompt or response. The ability is available under More response options or More prompt options settings. I am sharing some screenshot for how to add response care in slot elicitation prompts.Click on Advanced option under the slot setting to open the side panel with different configurations.In the side panel. Click on 'Slot prompts' to expand the section. In the expanded section click on 'More prompt options'In the new view. Click on the Add button on top right of  Slot prompts settings to open a drop down and select Add card groupThis should add a new card group to the message list. Configure the card group and saveCommentShareSaketanswered 5 months ago"


Question: Can I see EC2 Instance Monitoring Metrics in Cloudwatch by adding values in Parameter Store?

"By adding a specific value in Parameter Store in AWS System ManagerIs there any way to add the below EC2 basic monitoring metrics?CPUUtilzation, StatusCheckFailed,StatusCheckFailed_Instance, StatusCheckFailed_SystemNetworkIn, NetworkOut, NetworkPacketsIn, NetworkPacketsOutEBSReadBytes, EBSReadOps, EBSWriteBytes, EBSWriteOps{  "agent": {    "metrics_collection_interval": 60,    "region": "ap-northeast-2",    "run_as_user": "root"  },  "logs": {    "logs_collected": {      "files": {        "collect_list": [          {            "file_path": "/var/log/syslog",            "log_group_name": "DevSystemLogs",            "log_stream_name": "syslog"          },          {            "file_path": "/var/log/auth.log",            "log_group_name": "DevSystemLogs",            "log_stream_name": "authlog"          },          {            "file_path": "/var/log/cmdlog.log",            "log_group_name": "DevSystemLogs",            "log_stream_name": "cmdlog"          }        ]      }    }  },  "metrics": {    "namespace": "Dev/custom",    "append_dimensions": {      "ImageID": "${aws:ImageId}",      "InstanceId": "${aws:InstanceId}",      "InstanceType": "${aws:InstanceType}",      "AutoScalingGroupName": "${aws:AutoScalingGroupName}"    },    "metrics_collected": {          "cpu": {            "resources": [              "*"            ],            "measurement": [            ],            "totalcpu": true,            "metrics_collection_interval": 10,            "append_dimensions": {              "osw_test5": "osw_test5"            }          },      "disk": {        "measurement": [          "used_percent"        ],        "metrics_collection_interval": 60,        "resources": [          "*"        ]      },      "mem": {        "measurement": [          "mem_used_percent"        ],        "metrics_collection_interval": 60      }    }  }}I would like to see the above metrics when I clicked all metrics in Cloudwatch and clicked Custom NamespaceFollowComment"

Answer: "0Hopefully I understand your question, but you can store Cloudwatch Configuration in AWS Systems Manager (SSM) Parameter Store and use SSM to configure the CloudWatch Agent to push the metrics and logs you desire to CloudWatch. You will want to use the AmazonCloudWatch-ManageAgent run command document. Documentation and workshops below demonstrate that process. Hope this helps.https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Agent-on-EC2-Instance-fleet.html#start-CloudWatch-Agent-EC2-fleethttps://www.wellarchitectedlabs.com/security/200_labs/200_remote_configuration_installation_and_viewing_cloudwatch_logs/4_start_cw_agent/https://catalog.us-east-1.prod.workshops.aws/workshops/a8e9c6a6-0ba9-48a7-a90d-378a440ab8ba/en-US/300-ssm/330-state-manager/331-using-state-managerCommentShareaaron_lanswered 7 months ago"


Question: App Runner Execute command

"Hey there,Recently started using AWS App Runner.The initial experience has been great so far, but I'm unable to find any resources on what's the best way (if any) to execute a command inside our container.We run containerized Laravel, and pull the image from ECR. On the first set up, we need to run a specific command inside the container, that sets up some of our stuff, like Databases, and so on...Is there a way to execute commands in App Runner at the application's root?Thanks,FollowComment"

Answer: "1If you're building your App Runner service from a repository, you can specify a Dockerfile to build your container image. In this Dockerfile, you can use the RUN command to execute commands during the build process. This is a good place to run setup tasks that only need to be run once.If you need to run commands every time your container starts, you could use an entrypoint script in your Docker container. This is a script that is executed every time your container is started, and you can use it to run setup tasks. In the Dockerfile, you can set this script as the entrypoint using the ENTRYPOINT command.When you configure your service in App Runner, you have the option to specify a start command. This command is run every time a new instance of your service is started. Depending on your application, you might be able to use this to run setup tasks.CommentShareEXPERTsedat_salmananswered 19 days ago"


Question: Application/Website not reachable

"My ec2 instance is running properly and i can SSH into the server, but the site is not reachable. What can i do about this pls?FollowComment"

Answer: "0The first things I'd check are:Is the web server running okay? Can you connect to port 80/443 on the loopback address while SSH'd in?Security Groups, are you sure the right ports, protocols and IP ranges are in place?There are also some troubleshooting steps you can review here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.htmlCommentShareAlex_Kanswered 10 months agorePost-User-3930167 10 months agoI can SSH into the address, and status check 2/2 all seems fine. I had adjusted time zone to EST and reboot the ec2 instance and now the site is not reachable.SharerePost-User-3930167 10 months agoThank you very much!Share"


Question: How Can I FTP into my Lightsail instance?

"In advance, I appreciate you giving of your time to respond!I'm used to the traditional hosting scenario (like a dreamhost or something of the sort). With a new site I opted for AWS and went Lightsail as it is a simple Wordpress. The site was installed and set up and running. I needed to update the theme and tried from the Wordpress back end and it got screwed up. It's there but now I can't get in to modify.In a 'traditional' host, I'd be able to log in via FTP. I log into my lightsail console and can't find anything on FTP info or instructions. Searching help, there are some instructions but they make it challenging for a novice. Stuff like Amazon API Gateway - I have no idea!There an easy way to set up FTP so I can go in via Filezilla and replace the theme in the file structure?thanks again.FollowComment"

Answer: "0FTP is considered to be extraordinarily insecure.I would suggest you use ssh file transfer.  Take a look at FileZilla, which is a very flexible open source file transfer utility.davidCommentShareDavid Ganswered 2 years ago0Thank you David.Silly novice question. FileZilla is my preferred path. I'm not sure how to set up the dang thing. any idea how/where to determine the credentials to get in via FileZilla?CommentSharemsn021answered 2 years ago0Hello, and thank you for using Amazon Lightsail!We have a guide in the docs for this (thankfully, specific to FileZilla!). Read it here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-connecting-to-linux-unix-instance-using-sftpYou need to download your private key and use SFTP. The guide should be relatively straightforward. If you run into issues or need help, I'd be happy to assist!Thank you,MaxCommentShareMaxwellanswered 2 years ago0This WORKED! Thank you Maxwell. Before you, this was a few days of searching with no luck. This guide was perfect.CommentSharemsn021answered 2 years ago"


Question: Why does Rekognition detect both "Person" and "Human"?

Rekognition Video label detection detects both "Person" and "Human". What is the difference or relationship between the two?FollowComment

Answer: "0Accepted Answer"Human" and "Person" labels are synonyms within the Rekognition ontology, so that's why you'll see both. We provide synonyms / aliases to simplify the implementation for customers when they are doing simple keyword searches over their content.CommentShareAWS-User-5278841answered 3 years ago"


Question: WEBSITE DISPLAYING "IT WORKS"

"I was initially using the Let's Encrypt SSL on a WordPress lightsail instance and I decided to use the cloudfront SSL.I was instructed to disable https redirection for the website from server side and allow the distributionto pull content from http only, which I did.I tried to load the website now any the only thing that is showing up is "It works".How do I fix that?FollowComment"

Answer: "1Hello,Based on the details that you have shared with us, it looks like apache/nginx configuration on the instance is probably missing the virtual host configuration for port 80.Could you test out the below URLs and see what are you getting. Here, instance_ip is the IP address of your Lightsail instance.http://instance_iphttps://instance_ipIf HTTPS is working while HTTP is not, then kindly check vhost file for port 80 and configure it like port 443 vhost file. Below third party document can help you in this case:https://docs.bitnami.com/virtual-machine/infrastructure/lamp/configuration/configure-custom-application/Let me know the results of above URLs to further check on it.CommentShareSUPPORT ENGINEERAWS-User-9822082answered a year ago"


Question: Is using the linux sync command able to provide a consistent view of an EFS volume?

"EFS (and NFS) have "close to open consistency" so two clients may not have the same view of the same file system. If I issue a linux sync command from a connected EC2 or Fargate container will this cause the client to refresh it's view of the content of the filesystem? Will it cause other connected clients to also see a consistent view?Assuming the approach works, are there drawbacks to using sync especially when multiple clients are connected to the volume and may be reading and writing files at the time the command is issued?FollowComment"

Answer: "1Have you tried specifying noac as a mount option to force un-cached writes of file attributes, depending on your application this may be simpler to implement than forcing a sync.This will however likely impact performance.CommentShareWayne_Sanswered a year ago"


Question: "DMS load from Oracle NUMBER(38) to Aurora Postgres BIGINT fails although all values < 2,000,000,000"

"DMS load fails from Oracle NUMBER(38) source to Aurora Postgres BIGINT (INT8) target.  Passes premigration assessment.  All values being migrated are below 2,000,000,000 (~BIGINT limit).The load succeeds if the target datatype is changed to Postgres NUMERIC.  Inserting "102675852.0000000000" manually (using SQL) to the same column defined as BIGINT also works without error.The full error is "ERROR: 22P02: invalid input syntax for type bigint: "102675852.0000000000" ("LOCATION: scanint8, int8.c:127", "STATEMENT: COPY "(table name)"."(column name)" FROM STDIN WITH DELIMITER ',' CSV NULL 'attNULL' ESCAPE ''").Could work around by changing datatype after load, but the table is quite large so this takes much too long for our purposes.FollowComment"

Answer: "1By default DMS will map Oracle's NUMBER(38) to NUMERIC(38,0) on PostgreSQL compatible target (b), which should work without issues. If you pre-created the target table, mapping Oracle's NUMBER(38) to BIGINT, by default this should also work without issues but will fail on PostgreSQL if the value is larger than  9223372036854775807 as per PostgreSQL reference (a). See example below using DMS 3.4.6:Oracle SourceCREATE TABLE sports.test_tbl ( t_no       NUMBER(38)  NOT NULL, t_date     TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL, t_code     VARCHAR2(255) DEFAULT SYS_GUID() NOT NULL, CONSTRAINT test_tbl_t_no_pk PRIMARY KEY (t_no) );INSERT INTO sports.test_tbl(t_no, t_code) VALUES(102675852, SYS_GUID());SQL> SELECT * FROM test_tbl;         T_NO T_DATE                         T_CODE------------- ------------------------------ ---------------------------------------------    102675852 07-MAR-22 01.40.13.973615 PM   D9A5F51879C746DDE0530A101FACBE2APostgreSQL compatible targetCREATE TABLE test_tbl ( t_no       BIGINT NOT NULL, t_date     TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP NOT NULL, t_code     VARCHAR(255), CONSTRAINT test_tbl_t_no_pk PRIMARY KEY (t_no) );After Full LoadPostgreSQL compatible targetdemo=> SELECT * FROM test_tbl;   t_no    |           t_date           |              t_code-----------+----------------------------+---------------------------------- 102675852 | 2022-03-07 13:23:46.114686 | D9A5F51879BF46DDE0530A101FACBE2A(1 row)That said, it seems (I stand corrected) the behavior you are describing normally occurs when you have unbounded NUMBER type column on Oracle[]. By default DMS maps unbounded NUMBER type column to NUMERIC (38,10) on PostgreSQL compatible targets. I such cases we recommend setting below Extra Connection Attributes for the endpoints:For Oracle as a source EndpointnumberDataTypeScale=-2For PostgreSQL as a target EndpointtruncateTrailingZerosForPlainNumeric=trueReferences(a) https://www.postgresql.org/docs/9.1/datatype-numeric.html(b) https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.Oracle.html#CHAP_Source.Oracle.DataTypesCommentShareEli DOEanswered a year ago"


Question: AWS WorkDocs Drive Client Silently Fails Install

"I tried to install WorkDocs client on OS Win10.Installer gathered required information and failed silently.Any ideas?Details:I checked the prerequisite:1)check Microsoft .NET Framework:.NET Framework 4.8+ installed2)check Message Queuing:Message Queuing with Status RunningWindows Event Logs produces following messages:Product: AWSWorkDocsDriveClient -- Installation failed.Windows Installer installed the product. Product Name: AWSWorkDocsDriveClient. Product Version: 1.0.8772.0. Product Language: 1033. Manufacturer: Amazon Web Services, Inc. Installation success or error status: 1603.Warning: To reinstall windows is neither optimal nor acceptable.FollowComment"


Question: 📣 Introducing Awesome-GameLift

"Hi there,I've made a curated list of awesome GameLift content at https://github.com/favoyang/awesome-gameliftIf you like the idea, please star/watch it on the GitHub page.GameLift is still an emerging service. Contributions are always welcome! Please read the contribution guidelines first, then submit your PR🍻!FollowComment"

Answer: "0Cool! But it would be even better if it was possible to link the gamelift with the engine of the lumberyard engine and make lessons on this engineCommentSharerePost-User-0396919answered 2 years ago0If it's a library of lumberyard, it could be placed under the solutions > integrations, or solutions > lumberyard it has enough content to show. Other resources can be placed under Resources.PR is welcome, as long as the content is awesome and related to GameLift.CommentSharerePost-User-6332773answered 2 years ago"


Question: My instance constantly getting down every 10 - 14 days

"Hi everyone,Can anyone guide me why my instance is getting down so many time, i have started to use aws services since 2 3 months and facing this problem again and again.My instance is initiated with "WordPress by Bitnami". and hosted with EC2 Medium in London regionWhen it happened me first time, I have rebooted my instance and it just got started suddenly and the same thing happened again so initially it gone through with the rebooting then i have started getting an error of 503 & unreachability so I have done many things to resolve this like DNS updates, .html file update and etc.Today, again my website is down and i am wondering what's the actual reason behind and to how to resolve this. Just to remember site status and monitoring seems fine in AWS console.Looking forward to hearing from you guys soon.FollowComment"

Answer: "0Seems odd, it should not happen on its own. Can you check if there is any event rule setup which based on something is shutting down your instance?Also check in cloud trail if there is anything which can help, you can use the instance id to filter out the calls for it.CommentShareRishianswered 6 months ago"